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

staging: wilc1000: move 'wilc_connecting' static variable to 'wilc_vif' struct

Move static variable 'wilc_connecting' as part of 'wilc_vif' private
struct. Remove "wilc_" prefix from name as its already part of wilc_vif
struct.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3124a1f7
...@@ -724,7 +724,7 @@ static void handle_scan(struct work_struct *work) ...@@ -724,7 +724,7 @@ static void handle_scan(struct work_struct *work)
goto error; goto error;
} }
if (vif->obtaining_ip || wilc_connecting) { if (vif->obtaining_ip || vif->connecting) {
netdev_err(vif->ndev, "Don't do obss scan\n"); netdev_err(vif->ndev, "Don't do obss scan\n");
result = -EBUSY; result = -EBUSY;
goto error; goto error;
...@@ -2330,7 +2330,7 @@ static int handle_remain_on_chan(struct wilc_vif *vif, ...@@ -2330,7 +2330,7 @@ static int handle_remain_on_chan(struct wilc_vif *vif,
goto error; goto error;
} }
if (vif->obtaining_ip || wilc_connecting) { if (vif->obtaining_ip || vif->connecting) {
result = -EBUSY; result = -EBUSY;
goto error; goto error;
} }
......
...@@ -361,6 +361,4 @@ int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power); ...@@ -361,6 +361,4 @@ int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power);
extern u8 wilc_connected_ssid[6]; extern u8 wilc_connected_ssid[6];
extern int wilc_connecting;
#endif #endif
...@@ -453,8 +453,6 @@ static inline bool wilc_cfg_scan_time_expired(struct wilc_priv *priv, int i) ...@@ -453,8 +453,6 @@ static inline bool wilc_cfg_scan_time_expired(struct wilc_priv *priv, int i)
return false; return false;
} }
int wilc_connecting;
static void cfg_connect_result(enum conn_event conn_disconn_evt, static void cfg_connect_result(enum conn_event conn_disconn_evt,
struct connect_info *conn_info, struct connect_info *conn_info,
u8 mac_status, u8 mac_status,
...@@ -468,7 +466,7 @@ static void cfg_connect_result(enum conn_event conn_disconn_evt, ...@@ -468,7 +466,7 @@ static void cfg_connect_result(enum conn_event conn_disconn_evt,
struct host_if_drv *wfi_drv = priv->hif_drv; struct host_if_drv *wfi_drv = priv->hif_drv;
u8 null_bssid[ETH_ALEN] = {0}; u8 null_bssid[ETH_ALEN] = {0};
wilc_connecting = 0; vif->connecting = false;
if (conn_disconn_evt == CONN_DISCONN_EVENT_CONN_RESP) { if (conn_disconn_evt == CONN_DISCONN_EVENT_CONN_RESP) {
u16 connect_status; u16 connect_status;
...@@ -666,7 +664,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -666,7 +664,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
enum authtype auth_type = ANY; enum authtype auth_type = ANY;
u32 cipher_group; u32 cipher_group;
wilc_connecting = 1; vif->connecting = true;
if (!(strncmp(sme->ssid, "DIRECT-", 7))) if (!(strncmp(sme->ssid, "DIRECT-", 7)))
wfi_drv->p2p_connect = 1; wfi_drv->p2p_connect = 1;
...@@ -698,7 +696,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -698,7 +696,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
nw_info = &priv->scanned_shadow[sel_bssi_idx]; nw_info = &priv->scanned_shadow[sel_bssi_idx];
} else { } else {
ret = -ENOENT; ret = -ENOENT;
wilc_connecting = 0; vif->connecting = false;
return ret; return ret;
} }
...@@ -741,7 +739,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -741,7 +739,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
ret = -ENOTSUPP; ret = -ENOTSUPP;
netdev_err(dev, "%s: Unsupported cipher\n", netdev_err(dev, "%s: Unsupported cipher\n",
__func__); __func__);
wilc_connecting = 0; vif->connecting = false;
return ret; return ret;
} }
} }
...@@ -792,7 +790,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -792,7 +790,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
if (ret != 0) { if (ret != 0) {
netdev_err(dev, "wilc_set_join_req(): Error\n"); netdev_err(dev, "wilc_set_join_req(): Error\n");
ret = -ENOENT; ret = -ENOENT;
wilc_connecting = 0; vif->connecting = false;
return ret; return ret;
} }
...@@ -809,7 +807,7 @@ static int disconnect(struct wiphy *wiphy, struct net_device *dev, ...@@ -809,7 +807,7 @@ static int disconnect(struct wiphy *wiphy, struct net_device *dev,
int ret; int ret;
u8 null_bssid[ETH_ALEN] = {0}; u8 null_bssid[ETH_ALEN] = {0};
wilc_connecting = 0; vif->connecting = false;
if (!wilc) if (!wilc)
return -EIO; return -EIO;
...@@ -1747,7 +1745,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, ...@@ -1747,7 +1745,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
switch (type) { switch (type) {
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
wilc_connecting = 0; vif->connecting = false;
dev->ieee80211_ptr->iftype = type; dev->ieee80211_ptr->iftype = type;
priv->wdev->iftype = type; priv->wdev->iftype = type;
vif->monitor_flag = 0; vif->monitor_flag = 0;
...@@ -1762,7 +1760,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, ...@@ -1762,7 +1760,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
break; break;
case NL80211_IFTYPE_P2P_CLIENT: case NL80211_IFTYPE_P2P_CLIENT:
wilc_connecting = 0; vif->connecting = false;
dev->ieee80211_ptr->iftype = type; dev->ieee80211_ptr->iftype = type;
priv->wdev->iftype = type; priv->wdev->iftype = type;
vif->monitor_flag = 0; vif->monitor_flag = 0;
......
...@@ -149,6 +149,7 @@ struct wilc_vif { ...@@ -149,6 +149,7 @@ struct wilc_vif {
struct timer_list periodic_rssi; struct timer_list periodic_rssi;
struct rf_info periodic_stat; struct rf_info periodic_stat;
struct tcp_ack_filter ack_filter; struct tcp_ack_filter ack_filter;
bool connecting;
}; };
struct wilc { struct wilc {
......
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