diff options
author | Arik Nemtsov <arik@wizery.com> | 2012-07-27 03:11:33 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-31 10:11:03 -0400 |
commit | 2b2b64380785bdcaaa9a123e7e5829acc749c4ca (patch) | |
tree | bf2cb1a99e16cfb0573650db9e2df3f476706b89 /drivers/net/wireless/ti | |
parent | 930e1915e73dd12c5e3a0e6a5a4349bdb9ab0ab7 (diff) |
wlcore: op_tx: pass sta explicitly when inferring frame hlid
avoid using the skb CB for getting the appropriate sta.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/tx.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/tx.h | 4 |
3 files changed, 8 insertions, 13 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 72548609f711..5efd5919db3b 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -1197,7 +1197,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
1197 | mapping = skb_get_queue_mapping(skb); | 1197 | mapping = skb_get_queue_mapping(skb); |
1198 | q = wl1271_tx_get_queue(mapping); | 1198 | q = wl1271_tx_get_queue(mapping); |
1199 | 1199 | ||
1200 | hlid = wl12xx_tx_get_hlid(wl, wlvif, skb); | 1200 | hlid = wl12xx_tx_get_hlid(wl, wlvif, skb, info->control.sta); |
1201 | 1201 | ||
1202 | spin_lock_irqsave(&wl->wl_lock, flags); | 1202 | spin_lock_irqsave(&wl->wl_lock, flags); |
1203 | 1203 | ||
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index 6ec29df386e0..1a2f31c289c5 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c | |||
@@ -130,16 +130,13 @@ bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb) | |||
130 | } | 130 | } |
131 | EXPORT_SYMBOL(wl12xx_is_dummy_packet); | 131 | EXPORT_SYMBOL(wl12xx_is_dummy_packet); |
132 | 132 | ||
133 | u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 133 | static u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
134 | struct sk_buff *skb) | 134 | struct sk_buff *skb, struct ieee80211_sta *sta) |
135 | { | 135 | { |
136 | struct ieee80211_tx_info *control = IEEE80211_SKB_CB(skb); | 136 | if (sta) { |
137 | |||
138 | if (control->control.sta) { | ||
139 | struct wl1271_station *wl_sta; | 137 | struct wl1271_station *wl_sta; |
140 | 138 | ||
141 | wl_sta = (struct wl1271_station *) | 139 | wl_sta = (struct wl1271_station *)sta->drv_priv; |
142 | control->control.sta->drv_priv; | ||
143 | return wl_sta->hlid; | 140 | return wl_sta->hlid; |
144 | } else { | 141 | } else { |
145 | struct ieee80211_hdr *hdr; | 142 | struct ieee80211_hdr *hdr; |
@@ -156,7 +153,7 @@ u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
156 | } | 153 | } |
157 | 154 | ||
158 | u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 155 | u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
159 | struct sk_buff *skb) | 156 | struct sk_buff *skb, struct ieee80211_sta *sta) |
160 | { | 157 | { |
161 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 158 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
162 | 159 | ||
@@ -164,7 +161,7 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
164 | return wl->system_hlid; | 161 | return wl->system_hlid; |
165 | 162 | ||
166 | if (wlvif->bss_type == BSS_TYPE_AP_BSS) | 163 | if (wlvif->bss_type == BSS_TYPE_AP_BSS) |
167 | return wl12xx_tx_get_hlid_ap(wl, wlvif, skb); | 164 | return wl12xx_tx_get_hlid_ap(wl, wlvif, skb, sta); |
168 | 165 | ||
169 | if ((test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) || | 166 | if ((test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) || |
170 | test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags)) && | 167 | test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags)) && |
diff --git a/drivers/net/wireless/ti/wlcore/tx.h b/drivers/net/wireless/ti/wlcore/tx.h index 1e939b016155..349520d8b724 100644 --- a/drivers/net/wireless/ti/wlcore/tx.h +++ b/drivers/net/wireless/ti/wlcore/tx.h | |||
@@ -243,10 +243,8 @@ u8 wlcore_rate_to_idx(struct wl1271 *wl, u8 rate, enum ieee80211_band band); | |||
243 | u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set, | 243 | u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set, |
244 | enum ieee80211_band rate_band); | 244 | enum ieee80211_band rate_band); |
245 | u32 wl1271_tx_min_rate_get(struct wl1271 *wl, u32 rate_set); | 245 | u32 wl1271_tx_min_rate_get(struct wl1271 *wl, u32 rate_set); |
246 | u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif, | ||
247 | struct sk_buff *skb); | ||
248 | u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 246 | u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
249 | struct sk_buff *skb); | 247 | struct sk_buff *skb, struct ieee80211_sta *sta); |
250 | void wl1271_tx_reset_link_queues(struct wl1271 *wl, u8 hlid); | 248 | void wl1271_tx_reset_link_queues(struct wl1271 *wl, u8 hlid); |
251 | void wl1271_handle_tx_low_watermark(struct wl1271 *wl); | 249 | void wl1271_handle_tx_low_watermark(struct wl1271 *wl); |
252 | bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb); | 250 | bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb); |