aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c13
-rw-r--r--drivers/net/wireless/ti/wlcore/tx.c5
-rw-r--r--drivers/net/wireless/ti/wlcore/wlcore_i.h1
3 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index fed227c88a8a..ba9f0019f20e 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -1179,9 +1179,13 @@ static void wl1271_op_tx(struct ieee80211_hw *hw,
1179 int q, mapping; 1179 int q, mapping;
1180 u8 hlid; 1180 u8 hlid;
1181 1181
1182 if (vif) 1182 if (!vif) {
1183 wlvif = wl12xx_vif_to_data(vif); 1183 wl1271_debug(DEBUG_TX, "DROP skb with no vif");
1184 ieee80211_free_txskb(hw, skb);
1185 return;
1186 }
1184 1187
1188 wlvif = wl12xx_vif_to_data(vif);
1185 mapping = skb_get_queue_mapping(skb); 1189 mapping = skb_get_queue_mapping(skb);
1186 q = wl1271_tx_get_queue(mapping); 1190 q = wl1271_tx_get_queue(mapping);
1187 1191
@@ -1195,7 +1199,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw,
1195 * allow these packets through. 1199 * allow these packets through.
1196 */ 1200 */
1197 if (hlid == WL12XX_INVALID_LINK_ID || 1201 if (hlid == WL12XX_INVALID_LINK_ID ||
1198 (wlvif && !test_bit(hlid, wlvif->links_map)) || 1202 (!test_bit(hlid, wlvif->links_map)) ||
1199 (wlcore_is_queue_stopped(wl, q) && 1203 (wlcore_is_queue_stopped(wl, q) &&
1200 !wlcore_is_queue_stopped_by_reason(wl, q, 1204 !wlcore_is_queue_stopped_by_reason(wl, q,
1201 WLCORE_QUEUE_STOP_REASON_WATERMARK))) { 1205 WLCORE_QUEUE_STOP_REASON_WATERMARK))) {
@@ -1209,8 +1213,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw,
1209 skb_queue_tail(&wl->links[hlid].tx_queue[q], skb); 1213 skb_queue_tail(&wl->links[hlid].tx_queue[q], skb);
1210 1214
1211 wl->tx_queue_count[q]++; 1215 wl->tx_queue_count[q]++;
1212 if (wlvif) 1216 wlvif->tx_queue_count[q]++;
1213 wlvif->tx_queue_count[q]++;
1214 1217
1215 /* 1218 /*
1216 * The workqueue is slow to process the tx_queue and we need stop 1219 * The workqueue is slow to process the tx_queue and we need stop
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index fbda3cbca7e7..8f5ea89b03b1 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -157,9 +157,6 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
157{ 157{
158 struct ieee80211_tx_info *control; 158 struct ieee80211_tx_info *control;
159 159
160 if (!wlvif || wl12xx_is_dummy_packet(wl, skb))
161 return wl->system_hlid;
162
163 if (wlvif->bss_type == BSS_TYPE_AP_BSS) 160 if (wlvif->bss_type == BSS_TYPE_AP_BSS)
164 return wl12xx_tx_get_hlid_ap(wl, wlvif, skb, sta); 161 return wl12xx_tx_get_hlid_ap(wl, wlvif, skb, sta);
165 162
@@ -764,7 +761,7 @@ int wlcore_tx_work_locked(struct wl1271 *wl)
764 bool has_data = false; 761 bool has_data = false;
765 762
766 wlvif = NULL; 763 wlvif = NULL;
767 if (!wl12xx_is_dummy_packet(wl, skb) && info->control.vif) 764 if (!wl12xx_is_dummy_packet(wl, skb))
768 wlvif = wl12xx_vif_to_data(info->control.vif); 765 wlvif = wl12xx_vif_to_data(info->control.vif);
769 else 766 else
770 hlid = wl->system_hlid; 767 hlid = wl->system_hlid;
diff --git a/drivers/net/wireless/ti/wlcore/wlcore_i.h b/drivers/net/wireless/ti/wlcore/wlcore_i.h
index 0194f5575acf..1857b8ba87e4 100644
--- a/drivers/net/wireless/ti/wlcore/wlcore_i.h
+++ b/drivers/net/wireless/ti/wlcore/wlcore_i.h
@@ -451,6 +451,7 @@ struct wl12xx_vif {
451 451
452static inline struct wl12xx_vif *wl12xx_vif_to_data(struct ieee80211_vif *vif) 452static inline struct wl12xx_vif *wl12xx_vif_to_data(struct ieee80211_vif *vif)
453{ 453{
454 WARN_ON(!vif);
454 return (struct wl12xx_vif *)vif->drv_priv; 455 return (struct wl12xx_vif *)vif->drv_priv;
455} 456}
456 457