staging: wilc1000: use WLAN_PMKID_LEN macro from ieee80211.h header
authorAjay Singh <ajay.kathat@microchip.com>
Mon, 12 Nov 2018 05:45:06 +0000 (05:45 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Nov 2018 22:43:15 +0000 (14:43 -0800)
Make use of WLAN_PMKID_LEN macro provided by ieee80211.h header instead
of PMKID_LEN.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c
drivers/staging/wilc1000/host_interface.h
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
drivers/staging/wilc1000/wilc_wfi_netdevice.h

index eb13b412f5e418159f997fb14e0ed660e684ba50..c200d90a7077bfc5076a1e6e25fb362a327ffd61 100644 (file)
@@ -1460,7 +1460,7 @@ static int wilc_pmksa_key_copy(struct wilc_vif *vif, struct key_attr *hif_key)
                memcpy(key_buf + ((PMKSA_KEY_LEN * i) + 1),
                       hif_key->attr.pmkid.pmkidlist[i].bssid, ETH_ALEN);
                memcpy(key_buf + ((PMKSA_KEY_LEN * i) + ETH_ALEN + 1),
-                      hif_key->attr.pmkid.pmkidlist[i].pmkid, PMKID_LEN);
+                      hif_key->attr.pmkid.pmkidlist[i].pmkid, WLAN_PMKID_LEN);
        }
 
        wid.id = WID_PMKID_INFO;
@@ -2793,7 +2793,7 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,
                memcpy(msg->body.key_info.attr.pmkid.pmkidlist[i].bssid,
                       &pmkid->pmkidlist[i].bssid, ETH_ALEN);
                memcpy(msg->body.key_info.attr.pmkid.pmkidlist[i].pmkid,
-                      &pmkid->pmkidlist[i].pmkid, PMKID_LEN);
+                      &pmkid->pmkidlist[i].pmkid, WLAN_PMKID_LEN);
        }
 
        result = wilc_enqueue_work(msg);
index 0185fc6cd90dba78654ddb40ab3b0f82f142b0f3..3d3115310e3e6db9fb7d47417e5b434bdd1ea956 100644 (file)
@@ -46,7 +46,6 @@
 
 #define PMKSA_KEY_LEN                          22
 #define ETH_ALEN                               6
-#define PMKID_LEN                              16
 #define WILC_MAX_NUM_PMKIDS                    16
 #define WILC_ADD_STA_LENGTH                    40
 #define NUM_CONCURRENT_IFC                     2
@@ -128,7 +127,7 @@ enum host_if_state {
 
 struct host_if_pmkid {
        u8 bssid[ETH_ALEN];
-       u8 pmkid[PMKID_LEN];
+       u8 pmkid[WLAN_PMKID_LEN];
 };
 
 struct host_if_pmkid_attr {
index f92ecf6c19ba635055141444532cb3d6b1f6c32e..7b753c1b820644cbf81c1ee1e491d313eac13cba 100644 (file)
@@ -1217,7 +1217,7 @@ static int set_pmksa(struct wiphy *wiphy, struct net_device *netdev,
                memcpy(priv->pmkid_list.pmkidlist[i].bssid, pmksa->bssid,
                       ETH_ALEN);
                memcpy(priv->pmkid_list.pmkidlist[i].pmkid, pmksa->pmkid,
-                      PMKID_LEN);
+                      WLAN_PMKID_LEN);
                if (!(flag == PMKID_FOUND))
                        priv->pmkid_list.numpmkid++;
        } else {
@@ -1254,7 +1254,7 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev,
                               ETH_ALEN);
                        memcpy(priv->pmkid_list.pmkidlist[i].pmkid,
                               priv->pmkid_list.pmkidlist[i + 1].pmkid,
-                              PMKID_LEN);
+                              WLAN_PMKID_LEN);
                }
                priv->pmkid_list.numpmkid--;
        } else {
index 4f05a16c778e9c3f91782661de7fe4b5c4ed4f7d..6283d9e364c5185bbbe36404d5f2b8b6a1f0616d 100644 (file)
@@ -22,7 +22,6 @@
 #define FLOW_CONTROL_UPPER_THRESHOLD           256
 
 #define WILC_MAX_NUM_PMKIDS                    16
-#define PMKID_LEN                              16
 #define PMKID_FOUND                            1
 #define NUM_STA_ASSOCIATED                     8