aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath.h2
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c1
-rw-r--r--drivers/net/wireless/ath/ath9k/ani.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/calib.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c8
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c1
7 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
index 0582ee4a493..88654138f99 100644
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -19,6 +19,7 @@
19 19
20#include <linux/skbuff.h> 20#include <linux/skbuff.h>
21#include <linux/if_ether.h> 21#include <linux/if_ether.h>
22#include <net/mac80211.h>
22 23
23static const u8 ath_bcast_mac[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; 24static const u8 ath_bcast_mac[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
24 25
@@ -46,6 +47,7 @@ struct ath_ops {
46 47
47struct ath_common { 48struct ath_common {
48 void *ah; 49 void *ah;
50 struct ieee80211_hw *hw;
49 u16 cachelsz; 51 u16 cachelsz;
50 u16 curaid; 52 u16 curaid;
51 u8 macaddr[ETH_ALEN]; 53 u8 macaddr[ETH_ALEN];
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 1abbebc2bd2..70831f1bcf0 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -594,6 +594,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
594 common = ath5k_hw_common(sc->ah); 594 common = ath5k_hw_common(sc->ah);
595 common->ops = &ath5k_common_ops; 595 common->ops = &ath5k_common_ops;
596 common->ah = sc->ah; 596 common->ah = sc->ah;
597 common->hw = hw;
597 common->cachelsz = csz << 2; /* convert to bytes */ 598 common->cachelsz = csz << 2; /* convert to bytes */
598 599
599 /* Initialize device */ 600 /* Initialize device */
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index e4f9559d25b..9682c49ab45 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -271,7 +271,7 @@ static void ath9k_ani_restart(struct ath_hw *ah)
271 271
272static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah) 272static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
273{ 273{
274 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf; 274 struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
275 struct ar5416AniState *aniState; 275 struct ar5416AniState *aniState;
276 int32_t rssi; 276 int32_t rssi;
277 277
@@ -343,7 +343,7 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
343 343
344static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah) 344static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah)
345{ 345{
346 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf; 346 struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
347 struct ar5416AniState *aniState; 347 struct ar5416AniState *aniState;
348 int32_t rssi; 348 int32_t rssi;
349 349
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 30106f49322..bdd4a19f32b 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -278,7 +278,7 @@ static bool ath9k_hw_per_calibration(struct ath_hw *ah,
278static bool ath9k_hw_iscal_supported(struct ath_hw *ah, 278static bool ath9k_hw_iscal_supported(struct ath_hw *ah,
279 enum ath9k_cal_types calType) 279 enum ath9k_cal_types calType)
280{ 280{
281 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf; 281 struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
282 282
283 switch (calType & ah->supp_cals) { 283 switch (calType & ah->supp_cals) {
284 case IQ_MISMATCH_CAL: /* Both 2 GHz and 5 GHz support OFDM */ 284 case IQ_MISMATCH_CAL: /* Both 2 GHz and 5 GHz support OFDM */
@@ -555,7 +555,7 @@ static void ath9k_hw_adc_dccal_calibrate(struct ath_hw *ah, u8 numChains)
555/* This is done for the currently configured channel */ 555/* This is done for the currently configured channel */
556bool ath9k_hw_reset_calvalid(struct ath_hw *ah) 556bool ath9k_hw_reset_calvalid(struct ath_hw *ah)
557{ 557{
558 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf; 558 struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
559 struct ath9k_cal_list *currCal = ah->cal_list_curr; 559 struct ath9k_cal_list *currCal = ah->cal_list_curr;
560 560
561 if (!ah->curchan) 561 if (!ah->curchan)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 5fb94fa45ff..177244b2b6b 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -40,7 +40,7 @@ static void ath9k_hw_spur_mitigate(struct ath_hw *ah, struct ath9k_channel *chan
40 40
41static u32 ath9k_hw_mac_usec(struct ath_hw *ah, u32 clks) 41static u32 ath9k_hw_mac_usec(struct ath_hw *ah, u32 clks)
42{ 42{
43 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf; 43 struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
44 44
45 if (!ah->curchan) /* should really check for CCK instead */ 45 if (!ah->curchan) /* should really check for CCK instead */
46 return clks / ATH9K_CLOCK_RATE_CCK; 46 return clks / ATH9K_CLOCK_RATE_CCK;
@@ -52,7 +52,7 @@ static u32 ath9k_hw_mac_usec(struct ath_hw *ah, u32 clks)
52 52
53static u32 ath9k_hw_mac_to_usec(struct ath_hw *ah, u32 clks) 53static u32 ath9k_hw_mac_to_usec(struct ath_hw *ah, u32 clks)
54{ 54{
55 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf; 55 struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
56 56
57 if (conf_is_ht40(conf)) 57 if (conf_is_ht40(conf))
58 return ath9k_hw_mac_usec(ah, clks) / 2; 58 return ath9k_hw_mac_usec(ah, clks) / 2;
@@ -62,7 +62,7 @@ static u32 ath9k_hw_mac_to_usec(struct ath_hw *ah, u32 clks)
62 62
63static u32 ath9k_hw_mac_clks(struct ath_hw *ah, u32 usecs) 63static u32 ath9k_hw_mac_clks(struct ath_hw *ah, u32 usecs)
64{ 64{
65 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf; 65 struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
66 66
67 if (!ah->curchan) /* should really check for CCK instead */ 67 if (!ah->curchan) /* should really check for CCK instead */
68 return usecs *ATH9K_CLOCK_RATE_CCK; 68 return usecs *ATH9K_CLOCK_RATE_CCK;
@@ -73,7 +73,7 @@ static u32 ath9k_hw_mac_clks(struct ath_hw *ah, u32 usecs)
73 73
74static u32 ath9k_hw_mac_to_clks(struct ath_hw *ah, u32 usecs) 74static u32 ath9k_hw_mac_to_clks(struct ath_hw *ah, u32 usecs)
75{ 75{
76 struct ieee80211_conf *conf = &ah->ah_sc->hw->conf; 76 struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
77 77
78 if (conf_is_ht40(conf)) 78 if (conf_is_ht40(conf))
79 return ath9k_hw_mac_clks(ah, usecs) * 2; 79 return ath9k_hw_mac_clks(ah, usecs) * 2;
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index ae351a18341..1f6dece9b00 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -437,6 +437,7 @@ struct ath_gen_timer_table {
437}; 437};
438 438
439struct ath_hw { 439struct ath_hw {
440 struct ieee80211_hw *hw;
440 struct ath_softc *ah_sc; 441 struct ath_softc *ah_sc;
441 struct ath_common common; 442 struct ath_common common;
442 struct ath9k_hw_version hw_version; 443 struct ath9k_hw_version hw_version;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index d752b167f5a..693555728ea 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1571,6 +1571,7 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid)
1571 common = ath9k_hw_common(ah); 1571 common = ath9k_hw_common(ah);
1572 common->ops = &ath9k_common_ops; 1572 common->ops = &ath9k_common_ops;
1573 common->ah = ah; 1573 common->ah = ah;
1574 common->hw = sc->hw;
1574 1575
1575 /* 1576 /*
1576 * Cache line size is used to size and align various 1577 * Cache line size is used to size and align various