summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Lee <glen.lee@atmel.com>2016-01-25 10:35:14 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-04 02:25:40 +0300
commite32737e9da8d870006fa34a4374391d103d87eb6 (patch)
treeba67303ea3a4c1652973fde4fcf7aa59e93085c3
parent14823bf2ea000c8762ec38ed7b67ee049a2b6fbf (diff)
downloadlinux-e32737e9da8d870006fa34a4374391d103d87eb6.tar.xz
staging: wilc1000: remove wilc_set_machw_change_vir_if
wilc_set_machw_change_vir_if is not used anymore since we use one unified firmware. Instead, wilc_set_operation_mode is called when wilc_mac_open to let the wilc use the proper firmware. Remove wilc_set_machw_change_vir_if and it's functions calls. In the later patch, mac index will be passed to wilc device. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/wilc1000/linux_wlan.c3
-rw-r--r--drivers/staging/wilc1000/wilc_wfi_cfgoperations.c6
-rw-r--r--drivers/staging/wilc1000/wilc_wfi_netdevice.h1
-rw-r--r--drivers/staging/wilc1000/wilc_wlan.c32
4 files changed, 1 insertions, 41 deletions
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 006f75f7c675..08d2cb2c00b8 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1024,14 +1024,13 @@ int wilc_mac_open(struct net_device *ndev)
return ret;
}
- wilc_set_machw_change_vir_if(ndev, false);
-
wilc_get_mac_address(vif, mac_add);
PRINT_D(INIT_DBG, "Mac address: %pM\n", mac_add);
for (i = 0; i < wl->vif_num; i++) {
if (ndev == wl->vif[i]->ndev) {
memcpy(wl->vif[i]->src_addr, mac_add, ETH_ALEN);
+ wilc_set_operation_mode(vif, vif->iftype);
break;
}
}
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 0b6df6a95448..d2b7a8be484c 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1274,7 +1274,6 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
kfree(g_key_gtk_params.seq);
g_key_gtk_params.seq = NULL;
- wilc_set_machw_change_vir_if(netdev, false);
}
if (key_index >= 0 && key_index <= 3) {
@@ -2116,10 +2115,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
del_timer(&wilc_during_ip_timer);
PRINT_D(GENERIC_DBG, "Changing virtual interface, enable scan\n");
- if (g_ptk_keys_saved && g_gtk_keys_saved) {
- wilc_set_machw_change_vir_if(dev, true);
- }
-
switch (type) {
case NL80211_IFTYPE_STATION:
wilc_connecting = 0;
@@ -2261,7 +2256,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
}
refresh_scan(priv, 1, true);
- wilc_set_machw_change_vir_if(dev, false);
if (wl->initialized) {
for (i = 0; i < num_reg_frame; i++) {
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index cd3d21d61bed..0d851f863b91 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -235,7 +235,6 @@ int wilc_netdev_init(struct wilc **wilc, struct device *, int io_type, int gpio,
const struct wilc_hif_func *ops);
void wilc1000_wlan_deinit(struct net_device *dev);
void WILC_WFI_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size);
-u16 wilc_set_machw_change_vir_if(struct net_device *dev, bool value);
int wilc_wlan_get_firmware(struct net_device *dev);
int wilc_wlan_set_bssid(struct net_device *wilc_netdev, u8 *bssid);
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 36debb4d061c..5682581ebcc3 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1578,35 +1578,3 @@ _fail_:
return ret;
}
-
-u16 wilc_set_machw_change_vir_if(struct net_device *dev, bool value)
-{
- u16 ret;
- u32 reg;
- struct wilc_vif *vif;
- struct wilc *wilc;
-
- vif = netdev_priv(dev);
- wilc = vif->wilc;
-
- mutex_lock(&wilc->hif_cs);
- ret = wilc->hif_func->hif_read_reg(wilc, WILC_CHANGING_VIR_IF,
- &reg);
- if (!ret)
- PRINT_ER("Error while Reading reg WILC_CHANGING_VIR_IF\n");
-
- if (value)
- reg |= BIT(31);
- else
- reg &= ~BIT(31);
-
- ret = wilc->hif_func->hif_write_reg(wilc, WILC_CHANGING_VIR_IF,
- reg);
-
- if (!ret)
- PRINT_ER("Error while writing reg WILC_CHANGING_VIR_IF\n");
-
- mutex_unlock(&wilc->hif_cs);
-
- return ret;
-}