mwifiex: use common keyinfo bitmap for different key types
Instead of having separate key information definitions for
each type of key, a common key information bitmap is used.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h
index 2b93811..f8c008f 100644
--- a/drivers/net/wireless/mwifiex/fw.h
+++ b/drivers/net/wireless/mwifiex/fw.h
@@ -72,33 +72,12 @@
KEY_TYPE_ID_AES,
KEY_TYPE_ID_WAPI,
};
-
-enum KEY_INFO_WEP {
- KEY_INFO_WEP_MCAST = 0x01,
- KEY_INFO_WEP_UNICAST = 0x02,
- KEY_INFO_WEP_ENABLED = 0x04
-};
-
-enum KEY_INFO_TKIP {
- KEY_INFO_TKIP_MCAST = 0x01,
- KEY_INFO_TKIP_UNICAST = 0x02,
- KEY_INFO_TKIP_ENABLED = 0x04
-};
-
-enum KEY_INFO_AES {
- KEY_INFO_AES_MCAST = 0x01,
- KEY_INFO_AES_UNICAST = 0x02,
- KEY_INFO_AES_ENABLED = 0x04
-};
+#define KEY_MCAST BIT(0)
+#define KEY_UNICAST BIT(1)
+#define KEY_ENABLED BIT(2)
#define WAPI_KEY_LEN 50
-enum KEY_INFO_WAPI {
- KEY_INFO_WAPI_MCAST = 0x01,
- KEY_INFO_WAPI_UNICAST = 0x02,
- KEY_INFO_WAPI_ENABLED = 0x04
-};
-
#define MAX_POLL_TRIES 100
#define MAX_MULTI_INTERFACE_POLL_TRIES 1000