Commit 7e7e278f authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: use WLAN_PMKID_LEN macro from ieee80211.h header

Make use of WLAN_PMKID_LEN macro provided by ieee80211.h header instead
of PMKID_LEN.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2bae293a
......@@ -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);
......
......@@ -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 {
......
......@@ -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 {
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment