mwifiex: rename macro and variables related to API revision
authorAmitkumar Karwar <akarwar@marvell.com>
Tue, 19 Aug 2014 12:24:25 +0000 (08:24 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 28 Aug 2014 18:41:56 +0000 (14:41 -0400)
We will remove 'fw' prefix from these variable and macro
names and make them generic.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/cmdevt.c
drivers/net/wireless/mwifiex/fw.h
drivers/net/wireless/mwifiex/init.c
drivers/net/wireless/mwifiex/main.h
drivers/net/wireless/mwifiex/sta_cmd.c
drivers/net/wireless/mwifiex/sta_cmdresp.c
drivers/net/wireless/mwifiex/sta_ioctl.c

index 0c212394dc1fdf8dcf1b261d473c0d2e27318682..720e5198b437310034f2338e4963d27d70af005a 100644 (file)
@@ -1470,7 +1470,7 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
        struct host_cmd_ds_get_hw_spec *hw_spec = &resp->params.hw_spec;
        struct mwifiex_adapter *adapter = priv->adapter;
        struct mwifiex_ie_types_header *tlv;
-       struct hw_spec_fw_api_rev *api_rev;
+       struct hw_spec_api_rev *api_rev;
        u16 resp_size, api_id;
        int i, left_len, parsed_len = 0;
 
@@ -1538,23 +1538,23 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
                while (left_len > sizeof(struct mwifiex_ie_types_header)) {
                        tlv = (void *)&hw_spec->tlvs + parsed_len;
                        switch (le16_to_cpu(tlv->type)) {
-                       case TLV_TYPE_FW_API_REV:
-                               api_rev = (struct hw_spec_fw_api_rev *)tlv;
+                       case TLV_TYPE_API_REV:
+                               api_rev = (struct hw_spec_api_rev *)tlv;
                                api_id = le16_to_cpu(api_rev->api_id);
                                switch (api_id) {
                                case KEY_API_VER_ID:
-                                       adapter->fw_key_api_major_ver =
+                                       adapter->key_api_major_ver =
                                                        api_rev->major_ver;
-                                       adapter->fw_key_api_minor_ver =
+                                       adapter->key_api_minor_ver =
                                                        api_rev->minor_ver;
                                        dev_dbg(adapter->dev,
-                                               "fw_key_api v%d.%d\n",
-                                               adapter->fw_key_api_major_ver,
-                                               adapter->fw_key_api_minor_ver);
+                                               "key_api v%d.%d\n",
+                                               adapter->key_api_major_ver,
+                                               adapter->key_api_minor_ver);
                                        break;
                                default:
                                        dev_warn(adapter->dev,
-                                                "Unknown FW api_id: %d\n",
+                                                "Unknown api_id: %d\n",
                                                 api_id);
                                        break;
                                }
index 49da2d53d29455830fb9958bc4ab7dbbcd5d5666..adc47f3ea1224bf4187eb216aa2e29376155e549 100644 (file)
@@ -83,7 +83,7 @@ enum KEY_TYPE_ID {
 #define WPA_PN_SIZE            8
 #define KEY_PARAMS_FIXED_LEN   10
 #define KEY_INDEX_MASK         0xf
-#define FW_KEY_API_VER_MAJOR_V2        2
+#define KEY_API_VER_MAJOR_V2   2
 
 #define KEY_MCAST      BIT(0)
 #define KEY_UNICAST    BIT(1)
@@ -170,7 +170,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
 #define TLV_TYPE_COALESCE_RULE      (PROPRIETARY_TLV_BASE_ID + 154)
 #define TLV_TYPE_KEY_PARAM_V2       (PROPRIETARY_TLV_BASE_ID + 156)
 #define TLV_TYPE_TDLS_IDLE_TIMEOUT  (PROPRIETARY_TLV_BASE_ID + 194)
-#define TLV_TYPE_FW_API_REV         (PROPRIETARY_TLV_BASE_ID + 199)
+#define TLV_TYPE_API_REV           (PROPRIETARY_TLV_BASE_ID + 199)
 
 #define MWIFIEX_TX_DATA_BUF_SIZE_2K        2048
 
@@ -844,11 +844,11 @@ struct host_cmd_ds_802_11_ps_mode_enh {
        } params;
 } __packed;
 
-enum FW_API_VER_ID {
+enum API_VER_ID {
        KEY_API_VER_ID = 1,
 };
 
-struct hw_spec_fw_api_rev {
+struct hw_spec_api_rev {
        struct mwifiex_ie_types_header header;
        __le16 api_id;
        u8 major_ver;
index 269a277d0a2e6072c092f066c9b23943d8075419..80bda808750851affd881cdae62c93066d11d48a 100644 (file)
@@ -282,8 +282,8 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter)
        adapter->max_mgmt_ie_index = MAX_MGMT_IE_INDEX;
        adapter->empty_tx_q_cnt = 0;
        adapter->ext_scan = true;
-       adapter->fw_key_api_major_ver = 0;
-       adapter->fw_key_api_minor_ver = 0;
+       adapter->key_api_major_ver = 0;
+       adapter->key_api_minor_ver = 0;
 }
 
 /*
index a2733b1e63f9ec0374f38ba5908b18e52345dfd6..54399631599a7115db2a982aabe98455f8be984c 100644 (file)
@@ -833,7 +833,7 @@ struct mwifiex_adapter {
        struct semaphore *card_sem;
        bool ext_scan;
        u8 fw_api_ver;
-       u8 fw_key_api_major_ver, fw_key_api_minor_ver;
+       u8 key_api_major_ver, key_api_minor_ver;
        struct work_struct iface_work;
        unsigned long iface_work_flags;
        struct memory_type_mapping *mem_type_mapping_tbl;
index 733de92a4c611e39da93fb580a272203d269e54f..225f7498048b78315d74a7cfdd6b234350390531 100644 (file)
@@ -965,7 +965,7 @@ mwifiex_cmd_802_11_key_material(struct mwifiex_private *priv,
                                u16 cmd_action, u32 cmd_oid,
                                struct mwifiex_ds_encrypt_key *enc_key)
 {
-       if (priv->adapter->fw_key_api_major_ver == FW_KEY_API_VER_MAJOR_V2)
+       if (priv->adapter->key_api_major_ver == KEY_API_VER_MAJOR_V2)
                return mwifiex_cmd_802_11_key_material_v2(priv, cmd,
                                                          cmd_action, cmd_oid,
                                                          enc_key);
index 08b78baeb846d65ef18680e462991c226c94d5e3..62866b0f083015d66d703feb4bbebd0964f26e66 100644 (file)
@@ -637,7 +637,7 @@ static int mwifiex_ret_802_11_key_material_v2(struct mwifiex_private *priv,
 static int mwifiex_ret_802_11_key_material(struct mwifiex_private *priv,
                                           struct host_cmd_ds_command *resp)
 {
-       if (priv->adapter->fw_key_api_major_ver == FW_KEY_API_VER_MAJOR_V2)
+       if (priv->adapter->key_api_major_ver == KEY_API_VER_MAJOR_V2)
                return mwifiex_ret_802_11_key_material_v2(priv, resp);
        else
                return mwifiex_ret_802_11_key_material_v1(priv, resp);
index caae9738100aa732087e2d03477b063bc1534fe2..b95a29b868d1acef87c912c65c750e70bc3e896f 100644 (file)
@@ -877,7 +877,7 @@ static int mwifiex_sec_ioctl_set_wep_key(struct mwifiex_private *priv,
                        return -1;
                }
 
-               if (adapter->fw_key_api_major_ver == FW_KEY_API_VER_MAJOR_V2) {
+               if (adapter->key_api_major_ver == KEY_API_VER_MAJOR_V2) {
                        memcpy(encrypt_key->key_material,
                               wep_key->key_material, wep_key->key_length);
                        encrypt_key->key_len = wep_key->key_length;
@@ -903,7 +903,7 @@ static int mwifiex_sec_ioctl_set_wep_key(struct mwifiex_private *priv,
                        memset(&priv->wep_key[index], 0,
                               sizeof(struct mwifiex_wep_key));
 
-               if (adapter->fw_key_api_major_ver == FW_KEY_API_VER_MAJOR_V2)
+               if (adapter->key_api_major_ver == KEY_API_VER_MAJOR_V2)
                        enc_key = encrypt_key;
                else
                        enc_key = NULL;