Commit 4438aca9 authored by Eliad Peller's avatar Eliad Peller Committed by Luciano Coelho

wl12xx: move last_tx_hlid into wlvif

move last_tx_hlid into the per-interface data, rather than
being global.
Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 1d095475
...@@ -355,7 +355,6 @@ static ssize_t driver_state_read(struct file *file, char __user *user_buf, ...@@ -355,7 +355,6 @@ static ssize_t driver_state_read(struct file *file, char __user *user_buf,
DRIVER_STATE_PRINT_INT(sg_enabled); DRIVER_STATE_PRINT_INT(sg_enabled);
DRIVER_STATE_PRINT_INT(enable_11a); DRIVER_STATE_PRINT_INT(enable_11a);
DRIVER_STATE_PRINT_INT(noise); DRIVER_STATE_PRINT_INT(noise);
DRIVER_STATE_PRINT_INT(last_tx_hlid);
DRIVER_STATE_PRINT_HEX(ap_fw_ps_map); DRIVER_STATE_PRINT_HEX(ap_fw_ps_map);
DRIVER_STATE_PRINT_LHEX(ap_ps_map); DRIVER_STATE_PRINT_LHEX(ap_ps_map);
DRIVER_STATE_PRINT_HEX(quirks); DRIVER_STATE_PRINT_HEX(quirks);
......
...@@ -4901,7 +4901,6 @@ struct ieee80211_hw *wl1271_alloc_hw(void) ...@@ -4901,7 +4901,6 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
wl->flags = 0; wl->flags = 0;
wl->sg_enabled = true; wl->sg_enabled = true;
wl->hw_pg_ver = -1; wl->hw_pg_ver = -1;
wl->last_tx_hlid = 0;
wl->ap_ps_map = 0; wl->ap_ps_map = 0;
wl->ap_fw_ps_map = 0; wl->ap_fw_ps_map = 0;
wl->quirks = 0; wl->quirks = 0;
......
...@@ -570,7 +570,7 @@ static struct sk_buff *wl1271_ap_skb_dequeue(struct wl1271 *wl, ...@@ -570,7 +570,7 @@ static struct sk_buff *wl1271_ap_skb_dequeue(struct wl1271 *wl,
struct sk_buff_head *queue; struct sk_buff_head *queue;
/* start from the link after the last one */ /* start from the link after the last one */
start_hlid = (wl->last_tx_hlid + 1) % WL12XX_MAX_LINKS; start_hlid = (wlvif->last_tx_hlid + 1) % WL12XX_MAX_LINKS;
/* dequeue according to AC, round robin on each link */ /* dequeue according to AC, round robin on each link */
for (i = 0; i < WL12XX_MAX_LINKS; i++) { for (i = 0; i < WL12XX_MAX_LINKS; i++) {
...@@ -591,12 +591,12 @@ static struct sk_buff *wl1271_ap_skb_dequeue(struct wl1271 *wl, ...@@ -591,12 +591,12 @@ static struct sk_buff *wl1271_ap_skb_dequeue(struct wl1271 *wl,
if (skb) { if (skb) {
int q = wl1271_tx_get_queue(skb_get_queue_mapping(skb)); int q = wl1271_tx_get_queue(skb_get_queue_mapping(skb));
wl->last_tx_hlid = h; wlvif->last_tx_hlid = h;
spin_lock_irqsave(&wl->wl_lock, flags); spin_lock_irqsave(&wl->wl_lock, flags);
wl->tx_queue_count[q]--; wl->tx_queue_count[q]--;
spin_unlock_irqrestore(&wl->wl_lock, flags); spin_unlock_irqrestore(&wl->wl_lock, flags);
} else { } else {
wl->last_tx_hlid = 0; wlvif->last_tx_hlid = 0;
} }
return skb; return skb;
...@@ -641,7 +641,7 @@ static void wl1271_skb_queue_head(struct wl1271 *wl, struct ieee80211_vif *vif, ...@@ -641,7 +641,7 @@ static void wl1271_skb_queue_head(struct wl1271 *wl, struct ieee80211_vif *vif,
skb_queue_head(&wl->links[hlid].tx_queue[q], skb); skb_queue_head(&wl->links[hlid].tx_queue[q], skb);
/* make sure we dequeue the same packet next time */ /* make sure we dequeue the same packet next time */
wl->last_tx_hlid = (hlid + WL12XX_MAX_LINKS - 1) % wlvif->last_tx_hlid = (hlid + WL12XX_MAX_LINKS - 1) %
WL12XX_MAX_LINKS; WL12XX_MAX_LINKS;
} else { } else {
skb_queue_head(&wl->tx_queue[q], skb); skb_queue_head(&wl->tx_queue[q], skb);
...@@ -924,7 +924,7 @@ void wl1271_tx_reset(struct wl1271 *wl, bool reset_tx_queues) ...@@ -924,7 +924,7 @@ void wl1271_tx_reset(struct wl1271 *wl, bool reset_tx_queues)
wl->links[i].prev_freed_pkts = 0; wl->links[i].prev_freed_pkts = 0;
} }
wl->last_tx_hlid = 0; wlvif->last_tx_hlid = 0;
} else { } else {
for (i = 0; i < NUM_TX_QUEUES; i++) { for (i = 0; i < NUM_TX_QUEUES; i++) {
while ((skb = skb_dequeue(&wl->tx_queue[i]))) { while ((skb = skb_dequeue(&wl->tx_queue[i]))) {
......
...@@ -542,9 +542,6 @@ struct wl1271 { ...@@ -542,9 +542,6 @@ struct wl1271 {
*/ */
struct wl1271_link links[WL12XX_MAX_LINKS]; struct wl1271_link links[WL12XX_MAX_LINKS];
/* the hlid of the link where the last transmitted skb came from */
int last_tx_hlid;
/* AP-mode - a bitmap of links currently in PS mode according to FW */ /* AP-mode - a bitmap of links currently in PS mode according to FW */
u32 ap_fw_ps_map; u32 ap_fw_ps_map;
...@@ -596,6 +593,9 @@ struct wl12xx_vif { ...@@ -596,6 +593,9 @@ struct wl12xx_vif {
} ap; } ap;
}; };
/* the hlid of the last transmitted skb */
int last_tx_hlid;
unsigned long links_map[BITS_TO_LONGS(WL12XX_MAX_LINKS)]; unsigned long links_map[BITS_TO_LONGS(WL12XX_MAX_LINKS)];
u8 ssid[IEEE80211_MAX_SSID_LEN + 1]; u8 ssid[IEEE80211_MAX_SSID_LEN + 1];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment