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

staging: wilc1000: handle key related cfg operation from cfg80211 context

Refactor add/delete key operation to handle directly from cfg80211
context. Also, avoid an extra copy of the information in hif layer and
directly fill the buffer in firmware format.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 98651ca0
This diff is collapsed.
...@@ -117,15 +117,15 @@ enum host_if_state { ...@@ -117,15 +117,15 @@ enum host_if_state {
HOST_IF_FORCE_32BIT = 0xFFFFFFFF HOST_IF_FORCE_32BIT = 0xFFFFFFFF
}; };
struct host_if_pmkid { struct wilc_pmkid {
u8 bssid[ETH_ALEN]; u8 bssid[ETH_ALEN];
u8 pmkid[WLAN_PMKID_LEN]; u8 pmkid[WLAN_PMKID_LEN];
}; } __packed;
struct host_if_pmkid_attr { struct wilc_pmkid_attr {
u8 numpmkid; u8 numpmkid;
struct host_if_pmkid pmkidlist[WILC_MAX_NUM_PMKIDS]; struct wilc_pmkid pmkidlist[WILC_MAX_NUM_PMKIDS];
}; } __packed;
struct cfg_param_attr { struct cfg_param_attr {
u32 flag; u32 flag;
...@@ -288,8 +288,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len, ...@@ -288,8 +288,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len,
u8 index, u32 key_rsc_len, const u8 *key_rsc, u8 index, u32 key_rsc_len, const u8 *key_rsc,
const u8 *rx_mic, const u8 *tx_mic, u8 mode, const u8 *rx_mic, const u8 *tx_mic, u8 mode,
u8 cipher_mode); u8 cipher_mode);
int wilc_set_pmkid_info(struct wilc_vif *vif, int wilc_set_pmkid_info(struct wilc_vif *vif, struct wilc_pmkid_attr *pmkid);
struct host_if_pmkid_attr *pmkid);
int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr); int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr);
int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
size_t ssid_len, const u8 *ies, size_t ies_len, size_t ssid_len, const u8 *ies, size_t ies_len,
......
...@@ -1171,7 +1171,7 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev, ...@@ -1171,7 +1171,7 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev,
if (!memcmp(pmksa->bssid, priv->pmkid_list.pmkidlist[i].bssid, if (!memcmp(pmksa->bssid, priv->pmkid_list.pmkidlist[i].bssid,
ETH_ALEN)) { ETH_ALEN)) {
memset(&priv->pmkid_list.pmkidlist[i], 0, memset(&priv->pmkid_list.pmkidlist[i], 0,
sizeof(struct host_if_pmkid)); sizeof(struct wilc_pmkid));
break; break;
} }
} }
...@@ -1197,7 +1197,7 @@ static int flush_pmksa(struct wiphy *wiphy, struct net_device *netdev) ...@@ -1197,7 +1197,7 @@ static int flush_pmksa(struct wiphy *wiphy, struct net_device *netdev)
{ {
struct wilc_priv *priv = wiphy_priv(wiphy); struct wilc_priv *priv = wiphy_priv(wiphy);
memset(&priv->pmkid_list, 0, sizeof(struct host_if_pmkid_attr)); memset(&priv->pmkid_list, 0, sizeof(struct wilc_pmkid_attr));
return 0; return 0;
} }
......
...@@ -144,7 +144,7 @@ struct wilc_priv { ...@@ -144,7 +144,7 @@ struct wilc_priv {
struct sk_buff *skb; struct sk_buff *skb;
struct net_device *dev; struct net_device *dev;
struct host_if_drv *hif_drv; struct host_if_drv *hif_drv;
struct host_if_pmkid_attr pmkid_list; struct wilc_pmkid_attr pmkid_list;
u8 wep_key[4][WLAN_KEY_LEN_WEP104]; u8 wep_key[4][WLAN_KEY_LEN_WEP104];
u8 wep_key_len[4]; u8 wep_key_len[4];
/* The real interface that the monitor is on */ /* The real interface that the monitor is on */
......
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