summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
diff options
context:
space:
mode:
authorAjay Singh <ajay.kathat@microchip.com>2018-12-02 18:02:34 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-05 09:48:45 +0100
commit78c0c4e845bdc50a4b4d52284d57dd26d442308a (patch)
tree6ee2e44df52e344dbaaa168836d4e63baeee1af0 /drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
parentcf6d06002dadbafe3d3c83faaf698622247312d1 (diff)
staging: wilc1000: handle add and edit station from the cfg80211 context
Refactor the code to avoid handling of add/edit stations using work queue and now set the wid value from caller context. Avoid making an extra copy of buffer and directly copy the data in firmware expected format. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wfi_cfgoperations.c')
-rw-r--r--drivers/staging/wilc1000/wilc_wfi_cfgoperations.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 69b181ffbc6d..bbe68ba81138 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1818,28 +1818,13 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev,
{
int ret = 0;
struct wilc_priv *priv = wiphy_priv(wiphy);
- struct add_sta_param sta_params = { {0} };
struct wilc_vif *vif = netdev_priv(dev);
if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) {
- memcpy(sta_params.bssid, mac, ETH_ALEN);
memcpy(priv->assoc_stainfo.sta_associated_bss[params->aid], mac,
ETH_ALEN);
- sta_params.aid = params->aid;
- sta_params.rates_len = params->supported_rates_len;
- sta_params.rates = params->supported_rates;
- if (!params->ht_capa) {
- sta_params.ht_supported = false;
- } else {
- sta_params.ht_supported = true;
- sta_params.ht_capa = *params->ht_capa;
- }
-
- sta_params.flags_mask = params->sta_flags_mask;
- sta_params.flags_set = params->sta_flags_set;
-
- ret = wilc_add_station(vif, &sta_params);
+ ret = wilc_add_station(vif, mac, params);
if (ret)
netdev_err(dev, "Host add station fail\n");
}
@@ -1874,26 +1859,10 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac, struct station_parameters *params)
{
int ret = 0;
- struct add_sta_param sta_params = { {0} };
struct wilc_vif *vif = netdev_priv(dev);
if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) {
- memcpy(sta_params.bssid, mac, ETH_ALEN);
- sta_params.aid = params->aid;
- sta_params.rates_len = params->supported_rates_len;
- sta_params.rates = params->supported_rates;
-
- if (!params->ht_capa) {
- sta_params.ht_supported = false;
- } else {
- sta_params.ht_supported = true;
- sta_params.ht_capa = *params->ht_capa;
- }
-
- sta_params.flags_mask = params->sta_flags_mask;
- sta_params.flags_set = params->sta_flags_set;
-
- ret = wilc_edit_station(vif, &sta_params);
+ ret = wilc_edit_station(vif, mac, params);
if (ret)
netdev_err(dev, "Host edit station fail\n");
}