提交 1e0708a9 编写于 作者: A Arik Nemtsov 提交者: Luciano Coelho

wlcore: track wlvif inside per-link structure

This allows us to pass only the link as a parameter to various functions
and deduce the wlvif. Note that this member will be NULL for global
links.
Signed-off-by: NArik Nemtsov <arik@wizery.com>
Signed-off-by: NLuciano Coelho <coelho@ti.com>
上级 b50a62bb
...@@ -326,6 +326,7 @@ int wl12xx_allocate_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid) ...@@ -326,6 +326,7 @@ int wl12xx_allocate_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid)
/* take the last "freed packets" value from the current FW status */ /* take the last "freed packets" value from the current FW status */
wl->links[link].prev_freed_pkts = wl->links[link].prev_freed_pkts =
wl->fw_status_2->counters.tx_lnk_free_pkts[link]; wl->fw_status_2->counters.tx_lnk_free_pkts[link];
wl->links[link].wlvif = wlvif;
*hlid = link; *hlid = link;
return 0; return 0;
} }
...@@ -353,6 +354,7 @@ void wl12xx_free_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid) ...@@ -353,6 +354,7 @@ void wl12xx_free_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid)
* can purge them. * can purge them.
*/ */
wl1271_tx_reset_link_queues(wl, *hlid); wl1271_tx_reset_link_queues(wl, *hlid);
wl->links[*hlid].wlvif = NULL;
*hlid = WL12XX_INVALID_LINK_ID; *hlid = WL12XX_INVALID_LINK_ID;
} }
......
...@@ -249,6 +249,8 @@ enum wl12xx_vif_flags { ...@@ -249,6 +249,8 @@ enum wl12xx_vif_flags {
WLVIF_FLAG_IN_USE, WLVIF_FLAG_IN_USE,
}; };
struct wl12xx_vif;
struct wl1271_link { struct wl1271_link {
/* AP-mode - TX queue per AC in link */ /* AP-mode - TX queue per AC in link */
struct sk_buff_head tx_queue[NUM_TX_QUEUES]; struct sk_buff_head tx_queue[NUM_TX_QUEUES];
...@@ -261,6 +263,9 @@ struct wl1271_link { ...@@ -261,6 +263,9 @@ struct wl1271_link {
/* bitmap of TIDs where RX BA sessions are active for this link */ /* bitmap of TIDs where RX BA sessions are active for this link */
u8 ba_bitmap; u8 ba_bitmap;
/* The wlvif this link belongs to. Might be null for global links */
struct wl12xx_vif *wlvif;
}; };
#define WL1271_MAX_RX_FILTERS 5 #define WL1271_MAX_RX_FILTERS 5
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册