summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wlcore/tx.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2012-11-28 11:42:40 +0200
committerLuciano Coelho <coelho@ti.com>2012-12-11 12:25:18 +0200
commitf1626fd8983a5bc68ce2879865cce297eb96c0b4 (patch)
tree3e0ee557e1d9755db804e8f97d68c7e896eaa7f6 /drivers/net/wireless/ti/wlcore/tx.c
parentc91ec5f3ada86807ea4857fc5793a4efe99c9de3 (diff)
wlcore/wl18xx: change priority calculations for links
Update the 18xx FW status private part to include Tx related link priorities. Introduce new HW ops to determine link priority per chip family. For 18xx the changes are: - Suspended links are at most low priority and Tx for them is stopped beyond the suspend threshold. - Active links now get their thresholds directly from FW - There's a new "stop" threshold for active links, at which point a link stops receiving new packets. Update the min 18xx FW version required to make sure suspended links bitmap is advertised by the FW. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/tx.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/tx.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index 8f5ea89b03b1..25cfd35ab1a2 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -509,28 +509,16 @@ static struct sk_buff *wlcore_lnk_dequeue(struct wl1271 *wl,
return skb;
}
-static bool wlcore_lnk_high_prio(struct wl1271 *wl, u8 hlid,
- struct wl1271_link *lnk)
-{
- u8 thold;
-
- if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map))
- thold = wl->conf.tx.fast_link_thold;
- else
- thold = wl->conf.tx.slow_link_thold;
-
- return lnk->allocated_pkts < thold;
-}
-
static struct sk_buff *wlcore_lnk_dequeue_high_prio(struct wl1271 *wl,
u8 hlid, u8 ac,
u8 *low_prio_hlid)
{
struct wl1271_link *lnk = &wl->links[hlid];
- if (!wlcore_lnk_high_prio(wl, hlid, lnk)) {
+ if (!wlcore_hw_lnk_high_prio(wl, hlid, lnk)) {
if (*low_prio_hlid == WL12XX_INVALID_LINK_ID &&
- !skb_queue_empty(&lnk->tx_queue[ac]))
+ !skb_queue_empty(&lnk->tx_queue[ac]) &&
+ wlcore_hw_lnk_low_prio(wl, hlid, lnk))
/* we found the first non-empty low priority queue */
*low_prio_hlid = hlid;