These methods can change device state, serialize with others
similar ones like up/down
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
if (wil_fix_bcon(wil, bcon))
wil_dbg_misc(wil, "Fixed bcon\n");
if (wil_fix_bcon(wil, bcon))
wil_dbg_misc(wil, "Fixed bcon\n");
+ mutex_lock(&wil->mutex);
+
rc = wil_reset(wil);
if (rc)
rc = wil_reset(wil);
if (rc)
/* Rx VRING. */
rc = wil_rx_init(wil);
if (rc)
/* Rx VRING. */
rc = wil_rx_init(wil);
if (rc)
rc = wmi_set_ssid(wil, info->ssid_len, info->ssid);
if (rc)
rc = wmi_set_ssid(wil, info->ssid_len, info->ssid);
if (rc)
/* MAC address - pre-requisite for other commands */
wmi_set_mac_address(wil, ndev->dev_addr);
/* MAC address - pre-requisite for other commands */
wmi_set_mac_address(wil, ndev->dev_addr);
rc = wmi_pcp_start(wil, info->beacon_interval, wmi_nettype,
channel->hw_value);
if (rc)
rc = wmi_pcp_start(wil, info->beacon_interval, wmi_nettype,
channel->hw_value);
if (rc)
+out:
+ mutex_unlock(&wil->mutex);
int rc = 0;
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
int rc = 0;
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
+ mutex_lock(&wil->mutex);
+
+ mutex_unlock(&wil->mutex);
if (no_fw_recovery)
return;
if (no_fw_recovery)
return;
+ mutex_lock(&wil->mutex);
switch (wdev->iftype) {
case NL80211_IFTYPE_STATION:
case NL80211_IFTYPE_P2P_CLIENT:
switch (wdev->iftype) {
case NL80211_IFTYPE_STATION:
case NL80211_IFTYPE_P2P_CLIENT:
+ mutex_unlock(&wil->mutex);
}
static int wil_find_free_vring(struct wil6210_priv *wil)
}
static int wil_find_free_vring(struct wil6210_priv *wil)