From patchwork Sat Apr 23 04:48:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Chadd X-Patchwork-Id: 728871 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3N4n9N6029438 for ; Sat, 23 Apr 2011 04:49:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750934Ab1DWEsz (ORCPT ); Sat, 23 Apr 2011 00:48:55 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:60102 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750876Ab1DWEsz (ORCPT ); Sat, 23 Apr 2011 00:48:55 -0400 Received: by wwa36 with SMTP id 36so1117746wwa.1 for ; Fri, 22 Apr 2011 21:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to:cc :content-type; bh=OKRbDVFCxLOKCZ5Eeb0pSle4IFdPBHT6F+OuMlCpsZI=; b=mlMpBR0RjOyYcC85/0AnEl5s2ipzrPtW4MqaOq1QYGQ3Le083K6dmU/xng8wlsn24k FVfYQaMtN3ZKGwhiwEvDmmnHbaAt/+JYa/cWBZafr9njaSzGz2DAV4Y0zcUiiFwHZnLk /u8AwT9VoIeo+75pSduYsAq1T4p940LHlb8S4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=ut5L6PrpAzfpDJ1vmNFeCEOsFB6h9cUU6kZB/VwmIC7Xxlooyq3MYOBx031EKiSgs0 MXmSX8nUOLLTQAsUphprC28NZqIsAXGj7EpL5w2v90yA3CabwuDH94jVFxNDGpZCuHyt 07CdlFyw/3O8mjDE+EOndrEv2Wbmd6xIsb74Q= MIME-Version: 1.0 Received: by 10.227.63.6 with SMTP id z6mr234785wbh.53.1303534133762; Fri, 22 Apr 2011 21:48:53 -0700 (PDT) Received: by 10.227.174.13 with HTTP; Fri, 22 Apr 2011 21:48:53 -0700 (PDT) Date: Sat, 23 Apr 2011 12:48:53 +0800 Message-ID: Subject: [PATCH] ath9k: fix AR9160 xpaBiasLvlFreq endianness handling From: Adrian Chadd To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, ath9k-devel Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 23 Apr 2011 04:49:29 +0000 (UTC) The xpaBiasLvlFreq parameter array is made up of 16 bit words which aren't byte-swapped like the other 16-bit eeprom parameters are. It's only used by the AR9160. Signed-off-by: Adrian Chadd --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c index 995949d..c031854 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c @@ -231,6 +231,10 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) integer = swab32(pModal->antCtrlChain[i]); pModal->antCtrlChain[i] = integer; } + for (i = 0; i < 3; i++) { + word = swab16(pModal->xpaBiasLvlFreq[i]); + pModal->xpaBiasLvlFreq[i] = word; + } for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { word = swab16(pModal->spurChans[i].spurChan);