Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
authorJohn W. Linville <linville@tuxdriver.com>
Wed, 29 Feb 2012 19:53:21 +0000 (14:53 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 29 Feb 2012 19:53:21 +0000 (14:53 -0500)
1  2 
drivers/net/wireless/ath/ath9k/ar9002_hw.c
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/carl9170/tx.c
drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
drivers/net/wireless/iwlwifi/iwl-agn-sta.c
drivers/net/wireless/mwifiex/cfg80211.c
drivers/net/wireless/rt2x00/rt2x00dev.c
net/mac80211/iface.c
net/mac80211/rate.c

@@@ -128,19 -171,34 +128,38 @@@ static void ar9002_hw_init_mode_regs(st
                               ARRAY_SIZE(ar5416Bank2), 2);
                INIT_INI_ARRAY(&ah->iniBank3, ar5416Bank3,
                               ARRAY_SIZE(ar5416Bank3), 3);
 -              INIT_INI_ARRAY(&ah->iniBank6, ar5416Bank6,
 -                             ARRAY_SIZE(ar5416Bank6), 3);
 -              INIT_INI_ARRAY(&ah->iniBank6TPC, ar5416Bank6TPC,
 -                             ARRAY_SIZE(ar5416Bank6TPC), 3);
                INIT_INI_ARRAY(&ah->iniBank7, ar5416Bank7,
                               ARRAY_SIZE(ar5416Bank7), 2);
 -              INIT_INI_ARRAY(&ah->iniAddac, ar5416Addac,
 -                             ARRAY_SIZE(ar5416Addac), 2);
 +
 +              /* Common for AR5416, AR9160 */
 +              if (!AR_SREV_9100(ah))
 +                      INIT_INI_ARRAY(&ah->iniBank6, ar5416Bank6,
 +                                     ARRAY_SIZE(ar5416Bank6), 3);
 +
 +              /* Common for AR913x, AR9160 */
 +              if (!AR_SREV_5416(ah))
 +                      INIT_INI_ARRAY(&ah->iniBank6TPC, ar5416Bank6TPC_9100,
 +                                     ARRAY_SIZE(ar5416Bank6TPC_9100), 3);
        }
+       /* iniAddac needs to be modified for these chips */
+       if (AR_SREV_9160(ah) || !AR_SREV_5416_22_OR_LATER(ah)) {
+               struct ar5416IniArray *addac = &ah->iniAddac;
+               u32 size = sizeof(u32) * addac->ia_rows * addac->ia_columns;
+               u32 *data;
+               data = kmalloc(size, GFP_KERNEL);
+               if (!data)
+                       return;
+               memcpy(data, addac->ia_array, size);
+               addac->ia_array = data;
+               if (!AR_SREV_5416_22_OR_LATER(ah)) {
+                       /* override CLKDRV value */
+                       INI_RA(addac, 31,1) = 0;
+               }
+       }
  }
  
  /* Support for Japan ch.14 (2484) spread */
Simple merge
Simple merge
Simple merge