linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] wlcore: use psd_type indexing according to spec
@ 2012-05-08 11:02 Yoni Divinsky
  2012-05-08 11:02 ` [PATCH 2/4] wl12xx: set the irq polarity before loading the fw Yoni Divinsky
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Yoni Divinsky @ 2012-05-08 11:02 UTC (permalink / raw)
  To: linux-wireless; +Cc: arik, coelho

In ieee80211.h the uapsd bit mask is defined such that
VO=BIT(0), VI=BIT(1), BK=BIT(2), BE=BIT(3).
The firmware uses the indexing as defined in the ieee80211
spec, meaning that VO=3, VI=2, BK=1, BE=0.

In AP mode when adding peer wlcore needs to convert
the indexing accordingly.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
---
 drivers/net/wireless/ti/wlcore/cmd.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
index 5b128a9..576c5bc 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.c
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
@@ -1346,9 +1346,12 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	for (i = 0; i < NUM_ACCESS_CATEGORIES_COPY; i++)
 		if (sta->wme && (sta->uapsd_queues & BIT(i)))
-			cmd->psd_type[i] = WL1271_PSD_UPSD_TRIGGER;
+			cmd->psd_type[NUM_ACCESS_CATEGORIES_COPY-1-i] =
+					WL1271_PSD_UPSD_TRIGGER;
 		else
-			cmd->psd_type[i] = WL1271_PSD_LEGACY;
+			cmd->psd_type[NUM_ACCESS_CATEGORIES_COPY-1-i] =
+					WL1271_PSD_LEGACY;
+
 
 	sta_rates = sta->supp_rates[wlvif->band];
 	if (sta->ht_cap.ht_supported)
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-06  8:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-08 11:02 [PATCH 1/4] wlcore: use psd_type indexing according to spec Yoni Divinsky
2012-05-08 11:02 ` [PATCH 2/4] wl12xx: set the irq polarity before loading the fw Yoni Divinsky
2012-05-08 11:02 ` [PATCH 3/4] wlcore: do not send stop fwlog cmd if fw is hanged Yoni Divinsky
2012-05-11  7:46   ` Arik Nemtsov
2012-05-08 11:02 ` [PATCH 4/4] wlcore: fix the CONF_TX_AC_ANY_TID to be 0xff Yoni Divinsky
2012-06-06  8:17 ` [PATCH 1/4] wlcore: use psd_type indexing according to spec Luciano Coelho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).