mwifiex: change width of MAC control variable
authorAmitkumar Karwar <akarwar@marvell.com>
Fri, 16 Dec 2016 07:25:44 +0000 (12:55 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 30 Dec 2016 11:25:58 +0000 (13:25 +0200)
Firmware has started making use of reserved field.
Accordingly change curr_pkt_filter from u16 to u32.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/fw.h
drivers/net/wireless/marvell/mwifiex/main.h
drivers/net/wireless/marvell/mwifiex/sta_cmd.c

index ea455948a68aaddc69a96a9454b697e66605cb12..f48247cfc548fd0b410dff71d3d6b57dbb4d5697 100644 (file)
@@ -434,14 +434,13 @@ enum mwifiex_channel_flags {
 #define HostCmd_ACT_BITWISE_SET               0x0002
 #define HostCmd_ACT_BITWISE_CLR               0x0003
 #define HostCmd_RESULT_OK                     0x0000
-
-#define HostCmd_ACT_MAC_RX_ON                 0x0001
-#define HostCmd_ACT_MAC_TX_ON                 0x0002
-#define HostCmd_ACT_MAC_WEP_ENABLE            0x0008
-#define HostCmd_ACT_MAC_ETHERNETII_ENABLE     0x0010
-#define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE    0x0080
-#define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE  0x0100
-#define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON     0x2000
+#define HostCmd_ACT_MAC_RX_ON                 BIT(0)
+#define HostCmd_ACT_MAC_TX_ON                 BIT(1)
+#define HostCmd_ACT_MAC_WEP_ENABLE            BIT(3)
+#define HostCmd_ACT_MAC_ETHERNETII_ENABLE     BIT(4)
+#define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE    BIT(7)
+#define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE  BIT(8)
+#define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON BIT(13)
 
 #define HostCmd_BSS_MODE_IBSS               0x0002
 #define HostCmd_BSS_MODE_ANY                0x0003
@@ -1084,8 +1083,7 @@ struct host_cmd_ds_802_11_mac_address {
 };
 
 struct host_cmd_ds_mac_control {
-       __le16 action;
-       __le16 reserved;
+       __le32 action;
 };
 
 struct host_cmd_ds_mac_multicast_adr {
index 5c9bd944b6ea9a6c476aed143f306d4e17744c86..d552a9d104d08f0adacb01adaf5d72fba2aa9553 100644 (file)
@@ -530,7 +530,7 @@ struct mwifiex_private {
        u8 tx_timeout_cnt;
        struct net_device *netdev;
        struct net_device_stats stats;
-       u16 curr_pkt_filter;
+       u32 curr_pkt_filter;
        u32 bss_mode;
        u32 pkt_tx_ctrl;
        u16 tx_power_level;
index ad2dfd8135b8ba2afe5cda75f6a3cb07f35ef62f..2f1f4d190b28429c43dc61770f53f81a09353616 100644 (file)
@@ -76,7 +76,7 @@ mwifiex_cmd_802_11_rssi_info(struct mwifiex_private *priv,
  */
 static int mwifiex_cmd_mac_control(struct mwifiex_private *priv,
                                   struct host_cmd_ds_command *cmd,
-                                  u16 cmd_action, u16 *action)
+                                  u16 cmd_action, u32 *action)
 {
        struct host_cmd_ds_mac_control *mac_ctrl = &cmd->params.mac_ctrl;
 
@@ -89,7 +89,7 @@ static int mwifiex_cmd_mac_control(struct mwifiex_private *priv,
        cmd->command = cpu_to_le16(HostCmd_CMD_MAC_CONTROL);
        cmd->size =
                cpu_to_le16(sizeof(struct host_cmd_ds_mac_control) + S_DS_GEN);
-       mac_ctrl->action = cpu_to_le16(*action);
+       mac_ctrl->action = cpu_to_le32(*action);
 
        return 0;
 }