return container_of(hw, struct ieee80211_local, hw);
}
-static inline struct ieee80211_hw *local_to_hw(
- struct ieee80211_local *local)
-{
- return &local->hw;
-}
-
static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)
{
/* Clear skb->pkt_type in order to not confuse kernel
* netstack. */
skb->pkt_type = 0;
- ieee80211_rx(local_to_hw(local), skb);
+ ieee80211_rx(&local->hw, skb);
break;
case IEEE80211_TX_STATUS_MSG:
skb->pkt_type = 0;
- ieee80211_tx_status(local_to_hw(local), skb);
+ ieee80211_tx_status(&local->hw, skb);
break;
case IEEE80211_EOSP_MSG:
eosp_data = (void *)skb->cb;
ieee80211_hw_roc_setup(local);
- return local_to_hw(local);
+ return &local->hw;
}
EXPORT_SYMBOL(ieee80211_alloc_hw);
tx->local->hw.wiphy->frag_threshold);
/* set up the tx rate control struct we give the RC algo */
- txrc.hw = local_to_hw(tx->local);
+ txrc.hw = &tx->local->hw;
txrc.sband = sband;
txrc.bss_conf = &tx->sdata->vif.bss_conf;
txrc.skb = tx->skb;
use_11b = (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ) &&
!(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE);
- for (queue = 0; queue < local_to_hw(local)->queues; queue++) {
+ for (queue = 0; queue < local->hw.queues; queue++) {
/* Set defaults according to 802.11-2007 Table 7-37 */
aCWmax = 1023;
if (use_11b)