summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx/queue.h
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-01-15 13:55:15 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-16 20:59:52 +0100
commitd6aeba575f277104a95125584981d37c8f7cf762 (patch)
tree3a52e9a8cbc9725330ae4033d6b55c3100ac6ac5 /drivers/staging/wfx/queue.h
parent36cbb5d2a7db063879fc92e8496db9c0b7f84d7d (diff)
staging: wfx: simplify the link-id allocation
The "link-id" is a slot number provided to the chip. A link-id is allocated to every station associated with the chip (mainly when the chip is in AP mode). It is more or less the same thing than the association ID, but it is limited to 14 values. Firmware uses the link-id to track the power save status of the stations. The current code try to associate a link-id as soon as data are exchanged with station. It is far easier to rely on sta_add() and sta_remove(). Until now the value WFX_LINK_ID_NO_ASSOC, was only used when no more link-id was available. Now, we also use this value for not-yet-associated stations (that was its primary behavior). Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200115135338.14374-51-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/queue.h')
-rw-r--r--drivers/staging/wfx/queue.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/wfx/queue.h b/drivers/staging/wfx/queue.h
index 21566e48b2c2..813c2d09e034 100644
--- a/drivers/staging/wfx/queue.h
+++ b/drivers/staging/wfx/queue.h
@@ -13,9 +13,10 @@
#include "hif_api_cmd.h"
#define WFX_MAX_STA_IN_AP_MODE 14
-#define WFX_LINK_ID_AFTER_DTIM (WFX_MAX_STA_IN_AP_MODE + 1)
-#define WFX_LINK_ID_UAPSD (WFX_MAX_STA_IN_AP_MODE + 2)
-#define WFX_LINK_ID_MAX (WFX_MAX_STA_IN_AP_MODE + 3)
+#define WFX_LINK_ID_NO_ASSOC 15
+#define WFX_LINK_ID_AFTER_DTIM (WFX_LINK_ID_NO_ASSOC + 1)
+#define WFX_LINK_ID_UAPSD (WFX_LINK_ID_NO_ASSOC + 2)
+#define WFX_LINK_ID_MAX (WFX_LINK_ID_NO_ASSOC + 3)
struct wfx_dev;
struct wfx_vif;