wl12xx: use round-robin policy for tx
Currently, a single vif might starve all the other vifs. Save the last vif we dequeued a packet from, and continue with the following one using a round-robin policy. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
committed by
Luciano Coelho
parent
f750c82045
commit
e4120df982
@@ -2282,6 +2282,8 @@ deinit:
|
|||||||
|
|
||||||
wl12xx_tx_reset_wlvif(wl, wlvif);
|
wl12xx_tx_reset_wlvif(wl, wlvif);
|
||||||
wl1271_free_ap_keys(wl, wlvif);
|
wl1271_free_ap_keys(wl, wlvif);
|
||||||
|
if (wl->last_wlvif == wlvif)
|
||||||
|
wl->last_wlvif = NULL;
|
||||||
list_del(&wlvif->list);
|
list_del(&wlvif->list);
|
||||||
memset(wlvif->ap.sta_hlid_map, 0, sizeof(wlvif->ap.sta_hlid_map));
|
memset(wlvif->ap.sta_hlid_map, 0, sizeof(wlvif->ap.sta_hlid_map));
|
||||||
wlvif->role_id = WL12XX_INVALID_ROLE_ID;
|
wlvif->role_id = WL12XX_INVALID_ROLE_ID;
|
||||||
|
@@ -590,14 +590,28 @@ static struct sk_buff *wl12xx_vif_skb_dequeue(struct wl1271 *wl,
|
|||||||
static struct sk_buff *wl1271_skb_dequeue(struct wl1271 *wl)
|
static struct sk_buff *wl1271_skb_dequeue(struct wl1271 *wl)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct wl12xx_vif *wlvif;
|
struct wl12xx_vif *wlvif = wl->last_wlvif;
|
||||||
struct sk_buff *skb = NULL;
|
struct sk_buff *skb = NULL;
|
||||||
|
|
||||||
/* TODO: rememeber last vif and consider it */
|
if (wlvif) {
|
||||||
wl12xx_for_each_wlvif(wl, wlvif) {
|
wl12xx_for_each_wlvif_continue(wl, wlvif) {
|
||||||
skb = wl12xx_vif_skb_dequeue(wl, wlvif);
|
skb = wl12xx_vif_skb_dequeue(wl, wlvif);
|
||||||
if (skb)
|
if (skb) {
|
||||||
break;
|
wl->last_wlvif = wlvif;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* do another pass */
|
||||||
|
if (!skb) {
|
||||||
|
wl12xx_for_each_wlvif(wl, wlvif) {
|
||||||
|
skb = wl12xx_vif_skb_dequeue(wl, wlvif);
|
||||||
|
if (skb) {
|
||||||
|
wl->last_wlvif = wlvif;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!skb &&
|
if (!skb &&
|
||||||
|
@@ -552,6 +552,9 @@ struct wl1271 {
|
|||||||
|
|
||||||
/* AP-mode - number of currently connected stations */
|
/* AP-mode - number of currently connected stations */
|
||||||
int active_sta_count;
|
int active_sta_count;
|
||||||
|
|
||||||
|
/* last wlvif we transmitted from */
|
||||||
|
struct wl12xx_vif *last_wlvif;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wl1271_station {
|
struct wl1271_station {
|
||||||
@@ -693,6 +696,9 @@ struct ieee80211_vif *wl12xx_wlvif_to_vif(struct wl12xx_vif *wlvif)
|
|||||||
#define wl12xx_for_each_wlvif(wl, wlvif) \
|
#define wl12xx_for_each_wlvif(wl, wlvif) \
|
||||||
list_for_each_entry(wlvif, &wl->wlvif_list, list)
|
list_for_each_entry(wlvif, &wl->wlvif_list, list)
|
||||||
|
|
||||||
|
#define wl12xx_for_each_wlvif_continue(wl, wlvif) \
|
||||||
|
list_for_each_entry_continue(wlvif, &wl->wlvif_list, list)
|
||||||
|
|
||||||
#define wl12xx_for_each_wlvif_bss_type(wl, wlvif, _bss_type) \
|
#define wl12xx_for_each_wlvif_bss_type(wl, wlvif, _bss_type) \
|
||||||
wl12xx_for_each_wlvif(wl, wlvif) \
|
wl12xx_for_each_wlvif(wl, wlvif) \
|
||||||
if (wlvif->bss_type == _bss_type)
|
if (wlvif->bss_type == _bss_type)
|
||||||
|
Reference in New Issue
Block a user