diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-02-26 05:24:35 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-27 14:06:42 -0500 |
commit | 005e472b45131250fe09c194f8b872b86fd266c1 (patch) | |
tree | dbeb7fe7ee8fdf8ff39c4ded9e647942ad15e639 /net | |
parent | 3431683759596409427b6726e582f3ee66082728 (diff) |
mac80211: remove local_to_hw
That's a lot longer than open-coding it and
doesn't really add value, so just remove it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 6 | ||||
-rw-r--r-- | net/mac80211/main.c | 6 | ||||
-rw-r--r-- | net/mac80211/tx.c | 2 | ||||
-rw-r--r-- | net/mac80211/util.c | 2 |
4 files changed, 5 insertions, 11 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 4a722b10b4dd..4d1682950a60 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1128,12 +1128,6 @@ static inline struct ieee80211_local *hw_to_local( | |||
1128 | return container_of(hw, struct ieee80211_local, hw); | 1128 | return container_of(hw, struct ieee80211_local, hw); |
1129 | } | 1129 | } |
1130 | 1130 | ||
1131 | static inline struct ieee80211_hw *local_to_hw( | ||
1132 | struct ieee80211_local *local) | ||
1133 | { | ||
1134 | return &local->hw; | ||
1135 | } | ||
1136 | |||
1137 | 1131 | ||
1138 | static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr) | 1132 | static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr) |
1139 | { | 1133 | { |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 2306d7514fff..36fa8051296c 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -286,11 +286,11 @@ static void ieee80211_tasklet_handler(unsigned long data) | |||
286 | /* Clear skb->pkt_type in order to not confuse kernel | 286 | /* Clear skb->pkt_type in order to not confuse kernel |
287 | * netstack. */ | 287 | * netstack. */ |
288 | skb->pkt_type = 0; | 288 | skb->pkt_type = 0; |
289 | ieee80211_rx(local_to_hw(local), skb); | 289 | ieee80211_rx(&local->hw, skb); |
290 | break; | 290 | break; |
291 | case IEEE80211_TX_STATUS_MSG: | 291 | case IEEE80211_TX_STATUS_MSG: |
292 | skb->pkt_type = 0; | 292 | skb->pkt_type = 0; |
293 | ieee80211_tx_status(local_to_hw(local), skb); | 293 | ieee80211_tx_status(&local->hw, skb); |
294 | break; | 294 | break; |
295 | case IEEE80211_EOSP_MSG: | 295 | case IEEE80211_EOSP_MSG: |
296 | eosp_data = (void *)skb->cb; | 296 | eosp_data = (void *)skb->cb; |
@@ -668,7 +668,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
668 | 668 | ||
669 | ieee80211_hw_roc_setup(local); | 669 | ieee80211_hw_roc_setup(local); |
670 | 670 | ||
671 | return local_to_hw(local); | 671 | return &local->hw; |
672 | } | 672 | } |
673 | EXPORT_SYMBOL(ieee80211_alloc_hw); | 673 | EXPORT_SYMBOL(ieee80211_alloc_hw); |
674 | 674 | ||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index c6eadac9ca4e..7c021f255716 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -625,7 +625,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) | |||
625 | tx->local->hw.wiphy->frag_threshold); | 625 | tx->local->hw.wiphy->frag_threshold); |
626 | 626 | ||
627 | /* set up the tx rate control struct we give the RC algo */ | 627 | /* set up the tx rate control struct we give the RC algo */ |
628 | txrc.hw = local_to_hw(tx->local); | 628 | txrc.hw = &tx->local->hw; |
629 | txrc.sband = sband; | 629 | txrc.sband = sband; |
630 | txrc.bss_conf = &tx->sdata->vif.bss_conf; | 630 | txrc.bss_conf = &tx->sdata->vif.bss_conf; |
631 | txrc.skb = tx->skb; | 631 | txrc.skb = tx->skb; |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 264397aee811..f6e4cef92021 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -753,7 +753,7 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata) | |||
753 | use_11b = (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ) && | 753 | use_11b = (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ) && |
754 | !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE); | 754 | !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE); |
755 | 755 | ||
756 | for (queue = 0; queue < local_to_hw(local)->queues; queue++) { | 756 | for (queue = 0; queue < local->hw.queues; queue++) { |
757 | /* Set defaults according to 802.11-2007 Table 7-37 */ | 757 | /* Set defaults according to 802.11-2007 Table 7-37 */ |
758 | aCWmax = 1023; | 758 | aCWmax = 1023; |
759 | if (use_11b) | 759 | if (use_11b) |