diff options
author | YueHaibing <yuehaibing@huawei.com> | 2020-09-02 17:08:46 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-09-07 11:31:52 +0300 |
commit | d56ee19a148edaa9972ca12f817e395ba436078b (patch) | |
tree | a6b30249833434a96f592711ef6e1f966ac54ad6 /drivers/net/wireless/marvell/mwifiex/wmm.c | |
parent | 8f8b8aa62e68adae226797eeda3d88c4c65e9f87 (diff) | |
download | linux-d56ee19a148edaa9972ca12f817e395ba436078b.tar.xz |
mwifiex: wmm: Fix -Wunused-const-variable warnings
In file included from drivers/net/wireless/marvell/mwifiex//cmdevt.c:26:0:
drivers/net/wireless/marvell/mwifiex//wmm.h:41:17: warning: ‘tos_to_tid_inv’ defined but not used [-Wunused-const-variable=]
static const u8 tos_to_tid_inv[] = {
^~~~~~~~~~~~~~
drivers/net/wireless/marvell/mwifiex//wmm.h:34:18: warning: ‘mwifiex_1d_to_wmm_queue’ defined but not used [-Wunused-const-variable=]
static const u16 mwifiex_1d_to_wmm_queue[8] = { 1, 0, 0, 1, 2, 2, 3, 3 };
^~~~~~~~~~~~~~~~~~~~~~~
move the variables definition to .c file, and leave declarations
in the header file to fix these warnings.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200902140846.29024-1-yuehaibing@huawei.com
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/wmm.c')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/wmm.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/wmm.c b/drivers/net/wireless/marvell/mwifiex/wmm.c index a06fff199ea3..b8f19ca73414 100644 --- a/drivers/net/wireless/marvell/mwifiex/wmm.c +++ b/drivers/net/wireless/marvell/mwifiex/wmm.c @@ -40,6 +40,21 @@ static bool disable_tx_amsdu; module_param(disable_tx_amsdu, bool, 0644); +/* This table inverses the tos_to_tid operation to get a priority + * which is in sequential order, and can be compared. + * Use this to compare the priority of two different TIDs. + */ +const u8 tos_to_tid_inv[] = { + 0x02, /* from tos_to_tid[2] = 0 */ + 0x00, /* from tos_to_tid[0] = 1 */ + 0x01, /* from tos_to_tid[1] = 2 */ + 0x03, + 0x04, + 0x05, + 0x06, + 0x07 +}; + /* WMM information IE */ static const u8 wmm_info_ie[] = { WLAN_EID_VENDOR_SPECIFIC, 0x07, 0x00, 0x50, 0xf2, 0x02, |