diff options
author | Bing Zhao <bzhao@marvell.com> | 2014-02-27 22:35:12 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-02-28 14:33:40 -0500 |
commit | fa0ecbb9905d985a77e76801ba1153394ba593e8 (patch) | |
tree | 65b9a9e5fece3e020b82b14e4cf1479a0eec6372 | |
parent | 6b7dce12b3e810a107735ab9e701f2be4e75db29 (diff) |
mwifiex: remove global variable cmd_wait_q_required
There is a race condition while queuing synchronous command and
asynchronous command requested from different threads, because
the wait_q_enabled flag is set based on a global variable
cmd_wait_q_required.
The issue is fixed by removing this global variable and using a
unified function with an argument 'sync' passed into the
function.
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/mwifiex/11h.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/11n.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/11n_rxreorder.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 167 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/cmdevt.c | 36 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/ie.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/join.c | 37 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/main.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/main.h | 8 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/scan.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_cmd.c | 84 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_cmdresp.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_event.c | 38 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_ioctl.c | 117 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/tdls.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/uap_cmd.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/uap_event.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/util.c | 2 |
18 files changed, 255 insertions, 298 deletions
diff --git a/drivers/net/wireless/mwifiex/11h.c b/drivers/net/wireless/mwifiex/11h.c index 8d683070bdb3..e76b0db4e3e6 100644 --- a/drivers/net/wireless/mwifiex/11h.c +++ b/drivers/net/wireless/mwifiex/11h.c | |||
@@ -73,8 +73,8 @@ static int mwifiex_11h_activate(struct mwifiex_private *priv, bool flag) | |||
73 | { | 73 | { |
74 | u32 enable = flag; | 74 | u32 enable = flag; |
75 | 75 | ||
76 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_SNMP_MIB, | 76 | return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_SNMP_MIB, |
77 | HostCmd_ACT_GEN_SET, DOT11H_I, &enable); | 77 | HostCmd_ACT_GEN_SET, DOT11H_I, &enable, true); |
78 | } | 78 | } |
79 | 79 | ||
80 | /* This functions processes TLV buffer for a pending BSS Join command. | 80 | /* This functions processes TLV buffer for a pending BSS Join command. |
diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c index 37677af8d2fc..79ead928a64e 100644 --- a/drivers/net/wireless/mwifiex/11n.c +++ b/drivers/net/wireless/mwifiex/11n.c | |||
@@ -574,8 +574,8 @@ int mwifiex_send_addba(struct mwifiex_private *priv, int tid, u8 *peer_mac) | |||
574 | memcpy(&add_ba_req.peer_mac_addr, peer_mac, ETH_ALEN); | 574 | memcpy(&add_ba_req.peer_mac_addr, peer_mac, ETH_ALEN); |
575 | 575 | ||
576 | /* We don't wait for the response of this command */ | 576 | /* We don't wait for the response of this command */ |
577 | ret = mwifiex_send_cmd_async(priv, HostCmd_CMD_11N_ADDBA_REQ, | 577 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_11N_ADDBA_REQ, |
578 | 0, 0, &add_ba_req); | 578 | 0, 0, &add_ba_req, false); |
579 | 579 | ||
580 | return ret; | 580 | return ret; |
581 | } | 581 | } |
@@ -602,8 +602,8 @@ int mwifiex_send_delba(struct mwifiex_private *priv, int tid, u8 *peer_mac, | |||
602 | memcpy(&delba.peer_mac_addr, peer_mac, ETH_ALEN); | 602 | memcpy(&delba.peer_mac_addr, peer_mac, ETH_ALEN); |
603 | 603 | ||
604 | /* We don't wait for the response of this command */ | 604 | /* We don't wait for the response of this command */ |
605 | ret = mwifiex_send_cmd_async(priv, HostCmd_CMD_11N_DELBA, | 605 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_11N_DELBA, |
606 | HostCmd_ACT_GEN_SET, 0, &delba); | 606 | HostCmd_ACT_GEN_SET, 0, &delba, false); |
607 | 607 | ||
608 | return ret; | 608 | return ret; |
609 | } | 609 | } |
diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.c b/drivers/net/wireless/mwifiex/11n_rxreorder.c index 35329cfc9a9b..c3323c492614 100644 --- a/drivers/net/wireless/mwifiex/11n_rxreorder.c +++ b/drivers/net/wireless/mwifiex/11n_rxreorder.c | |||
@@ -650,7 +650,7 @@ void mwifiex_11n_ba_stream_timeout(struct mwifiex_private *priv, | |||
650 | delba.del_ba_param_set |= cpu_to_le16( | 650 | delba.del_ba_param_set |= cpu_to_le16( |
651 | (u16) event->origninator << DELBA_INITIATOR_POS); | 651 | (u16) event->origninator << DELBA_INITIATOR_POS); |
652 | delba.reason_code = cpu_to_le16(WLAN_REASON_QSTA_TIMEOUT); | 652 | delba.reason_code = cpu_to_le16(WLAN_REASON_QSTA_TIMEOUT); |
653 | mwifiex_send_cmd_async(priv, HostCmd_CMD_11N_DELBA, 0, 0, &delba); | 653 | mwifiex_send_cmd(priv, HostCmd_CMD_11N_DELBA, 0, 0, &delba, false); |
654 | } | 654 | } |
655 | 655 | ||
656 | /* | 656 | /* |
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 68c51a8e5bea..bfe9316e196c 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -252,9 +252,9 @@ mwifiex_cfg80211_mgmt_frame_register(struct wiphy *wiphy, | |||
252 | 252 | ||
253 | if (mask != priv->mgmt_frame_mask) { | 253 | if (mask != priv->mgmt_frame_mask) { |
254 | priv->mgmt_frame_mask = mask; | 254 | priv->mgmt_frame_mask = mask; |
255 | mwifiex_send_cmd_async(priv, HostCmd_CMD_MGMT_FRAME_REG, | 255 | mwifiex_send_cmd(priv, HostCmd_CMD_MGMT_FRAME_REG, |
256 | HostCmd_ACT_GEN_SET, 0, | 256 | HostCmd_ACT_GEN_SET, 0, |
257 | &priv->mgmt_frame_mask); | 257 | &priv->mgmt_frame_mask, false); |
258 | wiphy_dbg(wiphy, "info: mgmt frame registered\n"); | 258 | wiphy_dbg(wiphy, "info: mgmt frame registered\n"); |
259 | } | 259 | } |
260 | } | 260 | } |
@@ -515,8 +515,8 @@ static int mwifiex_send_domain_info_cmd_fw(struct wiphy *wiphy) | |||
515 | 515 | ||
516 | priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); | 516 | priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); |
517 | 517 | ||
518 | if (mwifiex_send_cmd_async(priv, HostCmd_CMD_802_11D_DOMAIN_INFO, | 518 | if (mwifiex_send_cmd(priv, HostCmd_CMD_802_11D_DOMAIN_INFO, |
519 | HostCmd_ACT_GEN_SET, 0, NULL)) { | 519 | HostCmd_ACT_GEN_SET, 0, NULL, false)) { |
520 | wiphy_err(wiphy, "11D: setting domain info in FW\n"); | 520 | wiphy_err(wiphy, "11D: setting domain info in FW\n"); |
521 | return -1; | 521 | return -1; |
522 | } | 522 | } |
@@ -580,9 +580,9 @@ mwifiex_set_frag(struct mwifiex_private *priv, u32 frag_thr) | |||
580 | frag_thr > MWIFIEX_FRAG_MAX_VALUE) | 580 | frag_thr > MWIFIEX_FRAG_MAX_VALUE) |
581 | frag_thr = MWIFIEX_FRAG_MAX_VALUE; | 581 | frag_thr = MWIFIEX_FRAG_MAX_VALUE; |
582 | 582 | ||
583 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_SNMP_MIB, | 583 | return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_SNMP_MIB, |
584 | HostCmd_ACT_GEN_SET, FRAG_THRESH_I, | 584 | HostCmd_ACT_GEN_SET, FRAG_THRESH_I, |
585 | &frag_thr); | 585 | &frag_thr, true); |
586 | } | 586 | } |
587 | 587 | ||
588 | /* | 588 | /* |
@@ -597,9 +597,9 @@ mwifiex_set_rts(struct mwifiex_private *priv, u32 rts_thr) | |||
597 | if (rts_thr < MWIFIEX_RTS_MIN_VALUE || rts_thr > MWIFIEX_RTS_MAX_VALUE) | 597 | if (rts_thr < MWIFIEX_RTS_MIN_VALUE || rts_thr > MWIFIEX_RTS_MAX_VALUE) |
598 | rts_thr = MWIFIEX_RTS_MAX_VALUE; | 598 | rts_thr = MWIFIEX_RTS_MAX_VALUE; |
599 | 599 | ||
600 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_SNMP_MIB, | 600 | return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_SNMP_MIB, |
601 | HostCmd_ACT_GEN_SET, RTS_THRESH_I, | 601 | HostCmd_ACT_GEN_SET, RTS_THRESH_I, |
602 | &rts_thr); | 602 | &rts_thr, true); |
603 | } | 603 | } |
604 | 604 | ||
605 | /* | 605 | /* |
@@ -637,20 +637,19 @@ mwifiex_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) | |||
637 | 637 | ||
638 | bss_started = priv->bss_started; | 638 | bss_started = priv->bss_started; |
639 | 639 | ||
640 | ret = mwifiex_send_cmd_sync(priv, | 640 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_UAP_BSS_STOP, |
641 | HostCmd_CMD_UAP_BSS_STOP, | 641 | HostCmd_ACT_GEN_SET, 0, |
642 | HostCmd_ACT_GEN_SET, 0, | 642 | NULL, true); |
643 | NULL); | ||
644 | if (ret) { | 643 | if (ret) { |
645 | wiphy_err(wiphy, "Failed to stop the BSS\n"); | 644 | wiphy_err(wiphy, "Failed to stop the BSS\n"); |
646 | kfree(bss_cfg); | 645 | kfree(bss_cfg); |
647 | return ret; | 646 | return ret; |
648 | } | 647 | } |
649 | 648 | ||
650 | ret = mwifiex_send_cmd_async(priv, | 649 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_UAP_SYS_CONFIG, |
651 | HostCmd_CMD_UAP_SYS_CONFIG, | 650 | HostCmd_ACT_GEN_SET, |
652 | HostCmd_ACT_GEN_SET, | 651 | UAP_BSS_PARAMS_I, bss_cfg, |
653 | UAP_BSS_PARAMS_I, bss_cfg); | 652 | false); |
654 | 653 | ||
655 | kfree(bss_cfg); | 654 | kfree(bss_cfg); |
656 | 655 | ||
@@ -662,10 +661,9 @@ mwifiex_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) | |||
662 | if (!bss_started) | 661 | if (!bss_started) |
663 | break; | 662 | break; |
664 | 663 | ||
665 | ret = mwifiex_send_cmd_async(priv, | 664 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_UAP_BSS_START, |
666 | HostCmd_CMD_UAP_BSS_START, | 665 | HostCmd_ACT_GEN_SET, 0, |
667 | HostCmd_ACT_GEN_SET, 0, | 666 | NULL, false); |
668 | NULL); | ||
669 | if (ret) { | 667 | if (ret) { |
670 | wiphy_err(wiphy, "Failed to start BSS\n"); | 668 | wiphy_err(wiphy, "Failed to start BSS\n"); |
671 | return ret; | 669 | return ret; |
@@ -700,8 +698,8 @@ mwifiex_cfg80211_deinit_p2p(struct mwifiex_private *priv) | |||
700 | if (GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_STA) | 698 | if (GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_STA) |
701 | mwifiex_set_bss_role(priv, MWIFIEX_BSS_ROLE_STA); | 699 | mwifiex_set_bss_role(priv, MWIFIEX_BSS_ROLE_STA); |
702 | 700 | ||
703 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_P2P_MODE_CFG, | 701 | if (mwifiex_send_cmd(priv, HostCmd_CMD_P2P_MODE_CFG, |
704 | HostCmd_ACT_GEN_SET, 0, &mode)) | 702 | HostCmd_ACT_GEN_SET, 0, &mode, true)) |
705 | return -1; | 703 | return -1; |
706 | 704 | ||
707 | return 0; | 705 | return 0; |
@@ -721,13 +719,13 @@ mwifiex_cfg80211_init_p2p_client(struct mwifiex_private *priv) | |||
721 | return -1; | 719 | return -1; |
722 | 720 | ||
723 | mode = P2P_MODE_DEVICE; | 721 | mode = P2P_MODE_DEVICE; |
724 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_P2P_MODE_CFG, | 722 | if (mwifiex_send_cmd(priv, HostCmd_CMD_P2P_MODE_CFG, |
725 | HostCmd_ACT_GEN_SET, 0, &mode)) | 723 | HostCmd_ACT_GEN_SET, 0, &mode, true)) |
726 | return -1; | 724 | return -1; |
727 | 725 | ||
728 | mode = P2P_MODE_CLIENT; | 726 | mode = P2P_MODE_CLIENT; |
729 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_P2P_MODE_CFG, | 727 | if (mwifiex_send_cmd(priv, HostCmd_CMD_P2P_MODE_CFG, |
730 | HostCmd_ACT_GEN_SET, 0, &mode)) | 728 | HostCmd_ACT_GEN_SET, 0, &mode, true)) |
731 | return -1; | 729 | return -1; |
732 | 730 | ||
733 | return 0; | 731 | return 0; |
@@ -747,13 +745,13 @@ mwifiex_cfg80211_init_p2p_go(struct mwifiex_private *priv) | |||
747 | return -1; | 745 | return -1; |
748 | 746 | ||
749 | mode = P2P_MODE_DEVICE; | 747 | mode = P2P_MODE_DEVICE; |
750 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_P2P_MODE_CFG, | 748 | if (mwifiex_send_cmd(priv, HostCmd_CMD_P2P_MODE_CFG, |
751 | HostCmd_ACT_GEN_SET, 0, &mode)) | 749 | HostCmd_ACT_GEN_SET, 0, &mode, true)) |
752 | return -1; | 750 | return -1; |
753 | 751 | ||
754 | mode = P2P_MODE_GO; | 752 | mode = P2P_MODE_GO; |
755 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_P2P_MODE_CFG, | 753 | if (mwifiex_send_cmd(priv, HostCmd_CMD_P2P_MODE_CFG, |
756 | HostCmd_ACT_GEN_SET, 0, &mode)) | 754 | HostCmd_ACT_GEN_SET, 0, &mode, true)) |
757 | return -1; | 755 | return -1; |
758 | 756 | ||
759 | if (GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_UAP) | 757 | if (GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_UAP) |
@@ -853,8 +851,8 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, | |||
853 | 851 | ||
854 | priv->sec_info.authentication_mode = NL80211_AUTHTYPE_OPEN_SYSTEM; | 852 | priv->sec_info.authentication_mode = NL80211_AUTHTYPE_OPEN_SYSTEM; |
855 | 853 | ||
856 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_SET_BSS_MODE, | 854 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_SET_BSS_MODE, |
857 | HostCmd_ACT_GEN_SET, 0, NULL); | 855 | HostCmd_ACT_GEN_SET, 0, NULL, true); |
858 | 856 | ||
859 | return ret; | 857 | return ret; |
860 | } | 858 | } |
@@ -942,8 +940,8 @@ mwifiex_dump_station_info(struct mwifiex_private *priv, | |||
942 | STATION_INFO_SIGNAL | STATION_INFO_SIGNAL_AVG; | 940 | STATION_INFO_SIGNAL | STATION_INFO_SIGNAL_AVG; |
943 | 941 | ||
944 | /* Get signal information from the firmware */ | 942 | /* Get signal information from the firmware */ |
945 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_RSSI_INFO, | 943 | if (mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO, |
946 | HostCmd_ACT_GEN_GET, 0, NULL)) { | 944 | HostCmd_ACT_GEN_GET, 0, NULL, true)) { |
947 | dev_err(priv->adapter->dev, "failed to get signal information\n"); | 945 | dev_err(priv->adapter->dev, "failed to get signal information\n"); |
948 | return -EFAULT; | 946 | return -EFAULT; |
949 | } | 947 | } |
@@ -954,9 +952,9 @@ mwifiex_dump_station_info(struct mwifiex_private *priv, | |||
954 | } | 952 | } |
955 | 953 | ||
956 | /* Get DTIM period information from firmware */ | 954 | /* Get DTIM period information from firmware */ |
957 | mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_SNMP_MIB, | 955 | mwifiex_send_cmd(priv, HostCmd_CMD_802_11_SNMP_MIB, |
958 | HostCmd_ACT_GEN_GET, DTIM_PERIOD_I, | 956 | HostCmd_ACT_GEN_GET, DTIM_PERIOD_I, |
959 | &priv->dtim_period); | 957 | &priv->dtim_period, true); |
960 | 958 | ||
961 | mwifiex_parse_htinfo(priv, priv->tx_htinfo, &sinfo->txrate); | 959 | mwifiex_parse_htinfo(priv, priv->tx_htinfo, &sinfo->txrate); |
962 | 960 | ||
@@ -1186,8 +1184,8 @@ static int mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy, | |||
1186 | if (priv->adapter->hw_dev_mcs_support == HT_STREAM_2X2) | 1184 | if (priv->adapter->hw_dev_mcs_support == HT_STREAM_2X2) |
1187 | bitmap_rates[2] |= mask->control[band].ht_mcs[1] << 8; | 1185 | bitmap_rates[2] |= mask->control[band].ht_mcs[1] << 8; |
1188 | 1186 | ||
1189 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_TX_RATE_CFG, | 1187 | return mwifiex_send_cmd(priv, HostCmd_CMD_TX_RATE_CFG, |
1190 | HostCmd_ACT_GEN_SET, 0, bitmap_rates); | 1188 | HostCmd_ACT_GEN_SET, 0, bitmap_rates, true); |
1191 | } | 1189 | } |
1192 | 1190 | ||
1193 | /* | 1191 | /* |
@@ -1216,14 +1214,14 @@ static int mwifiex_cfg80211_set_cqm_rssi_config(struct wiphy *wiphy, | |||
1216 | subsc_evt.bcn_h_rssi_cfg.abs_value = abs(rssi_thold); | 1214 | subsc_evt.bcn_h_rssi_cfg.abs_value = abs(rssi_thold); |
1217 | subsc_evt.bcn_l_rssi_cfg.evt_freq = 1; | 1215 | subsc_evt.bcn_l_rssi_cfg.evt_freq = 1; |
1218 | subsc_evt.bcn_h_rssi_cfg.evt_freq = 1; | 1216 | subsc_evt.bcn_h_rssi_cfg.evt_freq = 1; |
1219 | return mwifiex_send_cmd_sync(priv, | 1217 | return mwifiex_send_cmd(priv, |
1220 | HostCmd_CMD_802_11_SUBSCRIBE_EVENT, | 1218 | HostCmd_CMD_802_11_SUBSCRIBE_EVENT, |
1221 | 0, 0, &subsc_evt); | 1219 | 0, 0, &subsc_evt, true); |
1222 | } else { | 1220 | } else { |
1223 | subsc_evt.action = HostCmd_ACT_BITWISE_CLR; | 1221 | subsc_evt.action = HostCmd_ACT_BITWISE_CLR; |
1224 | return mwifiex_send_cmd_sync(priv, | 1222 | return mwifiex_send_cmd(priv, |
1225 | HostCmd_CMD_802_11_SUBSCRIBE_EVENT, | 1223 | HostCmd_CMD_802_11_SUBSCRIBE_EVENT, |
1226 | 0, 0, &subsc_evt); | 1224 | 0, 0, &subsc_evt, true); |
1227 | } | 1225 | } |
1228 | 1226 | ||
1229 | return 0; | 1227 | return 0; |
@@ -1276,10 +1274,9 @@ mwifiex_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev, | |||
1276 | if (!mac || is_broadcast_ether_addr(mac)) { | 1274 | if (!mac || is_broadcast_ether_addr(mac)) { |
1277 | wiphy_dbg(wiphy, "%s: NULL/broadcast mac address\n", __func__); | 1275 | wiphy_dbg(wiphy, "%s: NULL/broadcast mac address\n", __func__); |
1278 | list_for_each_entry(sta_node, &priv->sta_list, list) { | 1276 | list_for_each_entry(sta_node, &priv->sta_list, list) { |
1279 | if (mwifiex_send_cmd_sync(priv, | 1277 | if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_STA_DEAUTH, |
1280 | HostCmd_CMD_UAP_STA_DEAUTH, | 1278 | HostCmd_ACT_GEN_SET, 0, |
1281 | HostCmd_ACT_GEN_SET, 0, | 1279 | sta_node->mac_addr, true)) |
1282 | sta_node->mac_addr)) | ||
1283 | return -1; | 1280 | return -1; |
1284 | mwifiex_uap_del_sta_data(priv, sta_node); | 1281 | mwifiex_uap_del_sta_data(priv, sta_node); |
1285 | } | 1282 | } |
@@ -1289,10 +1286,9 @@ mwifiex_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev, | |||
1289 | sta_node = mwifiex_get_sta_entry(priv, mac); | 1286 | sta_node = mwifiex_get_sta_entry(priv, mac); |
1290 | spin_unlock_irqrestore(&priv->sta_list_spinlock, flags); | 1287 | spin_unlock_irqrestore(&priv->sta_list_spinlock, flags); |
1291 | if (sta_node) { | 1288 | if (sta_node) { |
1292 | if (mwifiex_send_cmd_sync(priv, | 1289 | if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_STA_DEAUTH, |
1293 | HostCmd_CMD_UAP_STA_DEAUTH, | 1290 | HostCmd_ACT_GEN_SET, 0, |
1294 | HostCmd_ACT_GEN_SET, 0, | 1291 | sta_node->mac_addr, true)) |
1295 | sta_node->mac_addr)) | ||
1296 | return -1; | 1292 | return -1; |
1297 | mwifiex_uap_del_sta_data(priv, sta_node); | 1293 | mwifiex_uap_del_sta_data(priv, sta_node); |
1298 | } | 1294 | } |
@@ -1333,8 +1329,8 @@ mwifiex_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant) | |||
1333 | ant_cfg.tx_ant = tx_ant; | 1329 | ant_cfg.tx_ant = tx_ant; |
1334 | ant_cfg.rx_ant = rx_ant; | 1330 | ant_cfg.rx_ant = rx_ant; |
1335 | 1331 | ||
1336 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_RF_ANTENNA, | 1332 | return mwifiex_send_cmd(priv, HostCmd_CMD_RF_ANTENNA, |
1337 | HostCmd_ACT_GEN_SET, 0, &ant_cfg); | 1333 | HostCmd_ACT_GEN_SET, 0, &ant_cfg, true); |
1338 | } | 1334 | } |
1339 | 1335 | ||
1340 | /* cfg80211 operation handler for stop ap. | 1336 | /* cfg80211 operation handler for stop ap. |
@@ -1349,8 +1345,8 @@ static int mwifiex_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *dev) | |||
1349 | 1345 | ||
1350 | priv->ap_11n_enabled = 0; | 1346 | priv->ap_11n_enabled = 0; |
1351 | 1347 | ||
1352 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_UAP_BSS_STOP, | 1348 | if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_BSS_STOP, |
1353 | HostCmd_ACT_GEN_SET, 0, NULL)) { | 1349 | HostCmd_ACT_GEN_SET, 0, NULL, true)) { |
1354 | wiphy_err(wiphy, "Failed to stop the BSS\n"); | 1350 | wiphy_err(wiphy, "Failed to stop the BSS\n"); |
1355 | return -1; | 1351 | return -1; |
1356 | } | 1352 | } |
@@ -1461,16 +1457,16 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy, | |||
1461 | bss_cfg->ps_sta_ao_timer = 10 * params->inactivity_timeout; | 1457 | bss_cfg->ps_sta_ao_timer = 10 * params->inactivity_timeout; |
1462 | } | 1458 | } |
1463 | 1459 | ||
1464 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_UAP_BSS_STOP, | 1460 | if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_BSS_STOP, |
1465 | HostCmd_ACT_GEN_SET, 0, NULL)) { | 1461 | HostCmd_ACT_GEN_SET, 0, NULL, true)) { |
1466 | wiphy_err(wiphy, "Failed to stop the BSS\n"); | 1462 | wiphy_err(wiphy, "Failed to stop the BSS\n"); |
1467 | kfree(bss_cfg); | 1463 | kfree(bss_cfg); |
1468 | return -1; | 1464 | return -1; |
1469 | } | 1465 | } |
1470 | 1466 | ||
1471 | if (mwifiex_send_cmd_async(priv, HostCmd_CMD_UAP_SYS_CONFIG, | 1467 | if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_SYS_CONFIG, |
1472 | HostCmd_ACT_GEN_SET, | 1468 | HostCmd_ACT_GEN_SET, |
1473 | UAP_BSS_PARAMS_I, bss_cfg)) { | 1469 | UAP_BSS_PARAMS_I, bss_cfg, false)) { |
1474 | wiphy_err(wiphy, "Failed to set the SSID\n"); | 1470 | wiphy_err(wiphy, "Failed to set the SSID\n"); |
1475 | kfree(bss_cfg); | 1471 | kfree(bss_cfg); |
1476 | return -1; | 1472 | return -1; |
@@ -1478,8 +1474,8 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy, | |||
1478 | 1474 | ||
1479 | kfree(bss_cfg); | 1475 | kfree(bss_cfg); |
1480 | 1476 | ||
1481 | if (mwifiex_send_cmd_async(priv, HostCmd_CMD_UAP_BSS_START, | 1477 | if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_BSS_START, |
1482 | HostCmd_ACT_GEN_SET, 0, NULL)) { | 1478 | HostCmd_ACT_GEN_SET, 0, NULL, false)) { |
1483 | wiphy_err(wiphy, "Failed to start the BSS\n"); | 1479 | wiphy_err(wiphy, "Failed to start the BSS\n"); |
1484 | return -1; | 1480 | return -1; |
1485 | } | 1481 | } |
@@ -1489,9 +1485,9 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy, | |||
1489 | else | 1485 | else |
1490 | priv->curr_pkt_filter &= ~HostCmd_ACT_MAC_WEP_ENABLE; | 1486 | priv->curr_pkt_filter &= ~HostCmd_ACT_MAC_WEP_ENABLE; |
1491 | 1487 | ||
1492 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_MAC_CONTROL, | 1488 | if (mwifiex_send_cmd(priv, HostCmd_CMD_MAC_CONTROL, |
1493 | HostCmd_ACT_GEN_SET, 0, | 1489 | HostCmd_ACT_GEN_SET, 0, |
1494 | &priv->curr_pkt_filter)) | 1490 | &priv->curr_pkt_filter, true)) |
1495 | return -1; | 1491 | return -1; |
1496 | 1492 | ||
1497 | return 0; | 1493 | return 0; |
@@ -2459,9 +2455,8 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy, | |||
2459 | MWIFIEX_CRITERIA_UNICAST | | 2455 | MWIFIEX_CRITERIA_UNICAST | |
2460 | MWIFIEX_CRITERIA_MULTICAST; | 2456 | MWIFIEX_CRITERIA_MULTICAST; |
2461 | 2457 | ||
2462 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_MEF_CFG, | 2458 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_MEF_CFG, |
2463 | HostCmd_ACT_GEN_SET, 0, | 2459 | HostCmd_ACT_GEN_SET, 0, &mef_cfg, true); |
2464 | &mef_cfg); | ||
2465 | 2460 | ||
2466 | kfree(mef_entry); | 2461 | kfree(mef_entry); |
2467 | return ret; | 2462 | return ret; |
@@ -2573,9 +2568,9 @@ static int mwifiex_cfg80211_set_coalesce(struct wiphy *wiphy, | |||
2573 | if (!coalesce) { | 2568 | if (!coalesce) { |
2574 | dev_dbg(adapter->dev, | 2569 | dev_dbg(adapter->dev, |
2575 | "Disable coalesce and reset all previous rules\n"); | 2570 | "Disable coalesce and reset all previous rules\n"); |
2576 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_COALESCE_CFG, | 2571 | return mwifiex_send_cmd(priv, HostCmd_CMD_COALESCE_CFG, |
2577 | HostCmd_ACT_GEN_SET, 0, | 2572 | HostCmd_ACT_GEN_SET, 0, |
2578 | &coalesce_cfg); | 2573 | &coalesce_cfg, true); |
2579 | } | 2574 | } |
2580 | 2575 | ||
2581 | coalesce_cfg.num_of_rules = coalesce->n_rules; | 2576 | coalesce_cfg.num_of_rules = coalesce->n_rules; |
@@ -2590,8 +2585,8 @@ static int mwifiex_cfg80211_set_coalesce(struct wiphy *wiphy, | |||
2590 | } | 2585 | } |
2591 | } | 2586 | } |
2592 | 2587 | ||
2593 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_COALESCE_CFG, | 2588 | return mwifiex_send_cmd(priv, HostCmd_CMD_COALESCE_CFG, |
2594 | HostCmd_ACT_GEN_SET, 0, &coalesce_cfg); | 2589 | HostCmd_ACT_GEN_SET, 0, &coalesce_cfg, true); |
2595 | } | 2590 | } |
2596 | 2591 | ||
2597 | /* cfg80211 ops handler for tdls_mgmt. | 2592 | /* cfg80211 ops handler for tdls_mgmt. |
@@ -2940,17 +2935,17 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter) | |||
2940 | country_code); | 2935 | country_code); |
2941 | } | 2936 | } |
2942 | 2937 | ||
2943 | mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_SNMP_MIB, | 2938 | mwifiex_send_cmd(priv, HostCmd_CMD_802_11_SNMP_MIB, |
2944 | HostCmd_ACT_GEN_GET, FRAG_THRESH_I, &thr); | 2939 | HostCmd_ACT_GEN_GET, FRAG_THRESH_I, &thr, true); |
2945 | wiphy->frag_threshold = thr; | 2940 | wiphy->frag_threshold = thr; |
2946 | mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_SNMP_MIB, | 2941 | mwifiex_send_cmd(priv, HostCmd_CMD_802_11_SNMP_MIB, |
2947 | HostCmd_ACT_GEN_GET, RTS_THRESH_I, &thr); | 2942 | HostCmd_ACT_GEN_GET, RTS_THRESH_I, &thr, true); |
2948 | wiphy->rts_threshold = thr; | 2943 | wiphy->rts_threshold = thr; |
2949 | mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_SNMP_MIB, | 2944 | mwifiex_send_cmd(priv, HostCmd_CMD_802_11_SNMP_MIB, |
2950 | HostCmd_ACT_GEN_GET, SHORT_RETRY_LIM_I, &retry); | 2945 | HostCmd_ACT_GEN_GET, SHORT_RETRY_LIM_I, &retry, true); |
2951 | wiphy->retry_short = (u8) retry; | 2946 | wiphy->retry_short = (u8) retry; |
2952 | mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_SNMP_MIB, | 2947 | mwifiex_send_cmd(priv, HostCmd_CMD_802_11_SNMP_MIB, |
2953 | HostCmd_ACT_GEN_GET, LONG_RETRY_LIM_I, &retry); | 2948 | HostCmd_ACT_GEN_GET, LONG_RETRY_LIM_I, &retry, true); |
2954 | wiphy->retry_long = (u8) retry; | 2949 | wiphy->retry_long = (u8) retry; |
2955 | 2950 | ||
2956 | adapter->wiphy = wiphy; | 2951 | adapter->wiphy = wiphy; |
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c index f4faeaf322be..64e708b79f0e 100644 --- a/drivers/net/wireless/mwifiex/cmdevt.c +++ b/drivers/net/wireless/mwifiex/cmdevt.c | |||
@@ -37,13 +37,12 @@ | |||
37 | static void | 37 | static void |
38 | mwifiex_init_cmd_node(struct mwifiex_private *priv, | 38 | mwifiex_init_cmd_node(struct mwifiex_private *priv, |
39 | struct cmd_ctrl_node *cmd_node, | 39 | struct cmd_ctrl_node *cmd_node, |
40 | u32 cmd_oid, void *data_buf) | 40 | u32 cmd_oid, void *data_buf, bool sync) |
41 | { | 41 | { |
42 | cmd_node->priv = priv; | 42 | cmd_node->priv = priv; |
43 | cmd_node->cmd_oid = cmd_oid; | 43 | cmd_node->cmd_oid = cmd_oid; |
44 | if (priv->adapter->cmd_wait_q_required) { | 44 | if (sync) { |
45 | cmd_node->wait_q_enabled = priv->adapter->cmd_wait_q_required; | 45 | cmd_node->wait_q_enabled = true; |
46 | priv->adapter->cmd_wait_q_required = false; | ||
47 | cmd_node->cmd_wait_q_woken = false; | 46 | cmd_node->cmd_wait_q_woken = false; |
48 | cmd_node->condition = &cmd_node->cmd_wait_q_woken; | 47 | cmd_node->condition = &cmd_node->cmd_wait_q_woken; |
49 | } | 48 | } |
@@ -480,28 +479,7 @@ int mwifiex_process_event(struct mwifiex_adapter *adapter) | |||
480 | } | 479 | } |
481 | 480 | ||
482 | /* | 481 | /* |
483 | * This function is used to send synchronous command to the firmware. | 482 | * This function prepares a command and send it to the firmware. |
484 | * | ||
485 | * it allocates a wait queue for the command and wait for the command | ||
486 | * response. | ||
487 | */ | ||
488 | int mwifiex_send_cmd_sync(struct mwifiex_private *priv, uint16_t cmd_no, | ||
489 | u16 cmd_action, u32 cmd_oid, void *data_buf) | ||
490 | { | ||
491 | int ret = 0; | ||
492 | struct mwifiex_adapter *adapter = priv->adapter; | ||
493 | |||
494 | adapter->cmd_wait_q_required = true; | ||
495 | |||
496 | ret = mwifiex_send_cmd_async(priv, cmd_no, cmd_action, cmd_oid, | ||
497 | data_buf); | ||
498 | |||
499 | return ret; | ||
500 | } | ||
501 | |||
502 | |||
503 | /* | ||
504 | * This function prepares a command and asynchronously send it to the firmware. | ||
505 | * | 483 | * |
506 | * Preparation includes - | 484 | * Preparation includes - |
507 | * - Sanity tests to make sure the card is still present or the FW | 485 | * - Sanity tests to make sure the card is still present or the FW |
@@ -511,8 +489,8 @@ int mwifiex_send_cmd_sync(struct mwifiex_private *priv, uint16_t cmd_no, | |||
511 | * - Fill up the non-default parameters and buffer pointers | 489 | * - Fill up the non-default parameters and buffer pointers |
512 | * - Add the command to pending queue | 490 | * - Add the command to pending queue |
513 | */ | 491 | */ |
514 | int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no, | 492 | int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no, |
515 | u16 cmd_action, u32 cmd_oid, void *data_buf) | 493 | u16 cmd_action, u32 cmd_oid, void *data_buf, bool sync) |
516 | { | 494 | { |
517 | int ret; | 495 | int ret; |
518 | struct mwifiex_adapter *adapter = priv->adapter; | 496 | struct mwifiex_adapter *adapter = priv->adapter; |
@@ -550,7 +528,7 @@ int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no, | |||
550 | } | 528 | } |
551 | 529 | ||
552 | /* Initialize the command node */ | 530 | /* Initialize the command node */ |
553 | mwifiex_init_cmd_node(priv, cmd_node, cmd_oid, data_buf); | 531 | mwifiex_init_cmd_node(priv, cmd_node, cmd_oid, data_buf, sync); |
554 | 532 | ||
555 | if (!cmd_node->cmd_skb) { | 533 | if (!cmd_node->cmd_skb) { |
556 | dev_err(adapter->dev, "PREP_CMD: no free cmd buf\n"); | 534 | dev_err(adapter->dev, "PREP_CMD: no free cmd buf\n"); |
diff --git a/drivers/net/wireless/mwifiex/ie.c b/drivers/net/wireless/mwifiex/ie.c index 81ac001ee741..3bf3d58bbc02 100644 --- a/drivers/net/wireless/mwifiex/ie.c +++ b/drivers/net/wireless/mwifiex/ie.c | |||
@@ -138,9 +138,9 @@ mwifiex_update_autoindex_ies(struct mwifiex_private *priv, | |||
138 | } | 138 | } |
139 | 139 | ||
140 | if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) | 140 | if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) |
141 | return mwifiex_send_cmd_async(priv, HostCmd_CMD_UAP_SYS_CONFIG, | 141 | return mwifiex_send_cmd(priv, HostCmd_CMD_UAP_SYS_CONFIG, |
142 | HostCmd_ACT_GEN_SET, | 142 | HostCmd_ACT_GEN_SET, |
143 | UAP_CUSTOM_IE_I, ie_list); | 143 | UAP_CUSTOM_IE_I, ie_list, false); |
144 | 144 | ||
145 | return 0; | 145 | return 0; |
146 | } | 146 | } |
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c index 34472ea53841..e9bd43526d80 100644 --- a/drivers/net/wireless/mwifiex/join.c +++ b/drivers/net/wireless/mwifiex/join.c | |||
@@ -901,9 +901,9 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, | |||
901 | mwifiex_get_active_data_rates(priv, adhoc_start->data_rate); | 901 | mwifiex_get_active_data_rates(priv, adhoc_start->data_rate); |
902 | if ((adapter->adhoc_start_band & BAND_G) && | 902 | if ((adapter->adhoc_start_band & BAND_G) && |
903 | (priv->curr_pkt_filter & HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON)) { | 903 | (priv->curr_pkt_filter & HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON)) { |
904 | if (mwifiex_send_cmd_async(priv, HostCmd_CMD_MAC_CONTROL, | 904 | if (mwifiex_send_cmd(priv, HostCmd_CMD_MAC_CONTROL, |
905 | HostCmd_ACT_GEN_SET, 0, | 905 | HostCmd_ACT_GEN_SET, 0, |
906 | &priv->curr_pkt_filter)) { | 906 | &priv->curr_pkt_filter, false)) { |
907 | dev_err(adapter->dev, | 907 | dev_err(adapter->dev, |
908 | "ADHOC_S_CMD: G Protection config failed\n"); | 908 | "ADHOC_S_CMD: G Protection config failed\n"); |
909 | return -1; | 909 | return -1; |
@@ -1073,9 +1073,9 @@ mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv, | |||
1073 | priv-> | 1073 | priv-> |
1074 | curr_pkt_filter | HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON; | 1074 | curr_pkt_filter | HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON; |
1075 | 1075 | ||
1076 | if (mwifiex_send_cmd_async(priv, HostCmd_CMD_MAC_CONTROL, | 1076 | if (mwifiex_send_cmd(priv, HostCmd_CMD_MAC_CONTROL, |
1077 | HostCmd_ACT_GEN_SET, 0, | 1077 | HostCmd_ACT_GEN_SET, 0, |
1078 | &curr_pkt_filter)) { | 1078 | &curr_pkt_filter, false)) { |
1079 | dev_err(priv->adapter->dev, | 1079 | dev_err(priv->adapter->dev, |
1080 | "ADHOC_J_CMD: G Protection config failed\n"); | 1080 | "ADHOC_J_CMD: G Protection config failed\n"); |
1081 | return -1; | 1081 | return -1; |
@@ -1312,8 +1312,8 @@ int mwifiex_associate(struct mwifiex_private *priv, | |||
1312 | retrieval */ | 1312 | retrieval */ |
1313 | priv->assoc_rsp_size = 0; | 1313 | priv->assoc_rsp_size = 0; |
1314 | 1314 | ||
1315 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_ASSOCIATE, | 1315 | return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_ASSOCIATE, |
1316 | HostCmd_ACT_GEN_SET, 0, bss_desc); | 1316 | HostCmd_ACT_GEN_SET, 0, bss_desc, true); |
1317 | } | 1317 | } |
1318 | 1318 | ||
1319 | /* | 1319 | /* |
@@ -1338,8 +1338,8 @@ mwifiex_adhoc_start(struct mwifiex_private *priv, | |||
1338 | else | 1338 | else |
1339 | mwifiex_set_ba_params(priv); | 1339 | mwifiex_set_ba_params(priv); |
1340 | 1340 | ||
1341 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_AD_HOC_START, | 1341 | return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_AD_HOC_START, |
1342 | HostCmd_ACT_GEN_SET, 0, adhoc_ssid); | 1342 | HostCmd_ACT_GEN_SET, 0, adhoc_ssid, true); |
1343 | } | 1343 | } |
1344 | 1344 | ||
1345 | /* | 1345 | /* |
@@ -1383,8 +1383,8 @@ int mwifiex_adhoc_join(struct mwifiex_private *priv, | |||
1383 | dev_dbg(priv->adapter->dev, "info: curr_bss_params.band = %c\n", | 1383 | dev_dbg(priv->adapter->dev, "info: curr_bss_params.band = %c\n", |
1384 | priv->curr_bss_params.band); | 1384 | priv->curr_bss_params.band); |
1385 | 1385 | ||
1386 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_AD_HOC_JOIN, | 1386 | return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_AD_HOC_JOIN, |
1387 | HostCmd_ACT_GEN_SET, 0, bss_desc); | 1387 | HostCmd_ACT_GEN_SET, 0, bss_desc, true); |
1388 | } | 1388 | } |
1389 | 1389 | ||
1390 | /* | 1390 | /* |
@@ -1403,8 +1403,8 @@ static int mwifiex_deauthenticate_infra(struct mwifiex_private *priv, u8 *mac) | |||
1403 | else | 1403 | else |
1404 | memcpy(mac_address, mac, ETH_ALEN); | 1404 | memcpy(mac_address, mac, ETH_ALEN); |
1405 | 1405 | ||
1406 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_DEAUTHENTICATE, | 1406 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_DEAUTHENTICATE, |
1407 | HostCmd_ACT_GEN_SET, 0, mac_address); | 1407 | HostCmd_ACT_GEN_SET, 0, mac_address, true); |
1408 | 1408 | ||
1409 | return ret; | 1409 | return ret; |
1410 | } | 1410 | } |
@@ -1432,12 +1432,11 @@ int mwifiex_deauthenticate(struct mwifiex_private *priv, u8 *mac) | |||
1432 | GFP_KERNEL); | 1432 | GFP_KERNEL); |
1433 | break; | 1433 | break; |
1434 | case NL80211_IFTYPE_ADHOC: | 1434 | case NL80211_IFTYPE_ADHOC: |
1435 | return mwifiex_send_cmd_sync(priv, | 1435 | return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_AD_HOC_STOP, |
1436 | HostCmd_CMD_802_11_AD_HOC_STOP, | 1436 | HostCmd_ACT_GEN_SET, 0, NULL, true); |
1437 | HostCmd_ACT_GEN_SET, 0, NULL); | ||
1438 | case NL80211_IFTYPE_AP: | 1437 | case NL80211_IFTYPE_AP: |
1439 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_UAP_BSS_STOP, | 1438 | return mwifiex_send_cmd(priv, HostCmd_CMD_UAP_BSS_STOP, |
1440 | HostCmd_ACT_GEN_SET, 0, NULL); | 1439 | HostCmd_ACT_GEN_SET, 0, NULL, true); |
1441 | default: | 1440 | default: |
1442 | break; | 1441 | break; |
1443 | } | 1442 | } |
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index f87ce28a8060..5397ee0ad652 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c | |||
@@ -678,8 +678,8 @@ mwifiex_set_mac_address(struct net_device *dev, void *addr) | |||
678 | memcpy(priv->curr_addr, hw_addr->sa_data, ETH_ALEN); | 678 | memcpy(priv->curr_addr, hw_addr->sa_data, ETH_ALEN); |
679 | 679 | ||
680 | /* Send request to firmware */ | 680 | /* Send request to firmware */ |
681 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_MAC_ADDRESS, | 681 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_MAC_ADDRESS, |
682 | HostCmd_ACT_GEN_SET, 0, NULL); | 682 | HostCmd_ACT_GEN_SET, 0, NULL, true); |
683 | 683 | ||
684 | if (!ret) | 684 | if (!ret) |
685 | memcpy(priv->netdev->dev_addr, priv->curr_addr, ETH_ALEN); | 685 | memcpy(priv->netdev->dev_addr, priv->curr_addr, ETH_ALEN); |
@@ -871,7 +871,6 @@ mwifiex_add_card(void *card, struct semaphore *sem, | |||
871 | adapter->is_suspended = false; | 871 | adapter->is_suspended = false; |
872 | adapter->hs_activated = false; | 872 | adapter->hs_activated = false; |
873 | init_waitqueue_head(&adapter->hs_activate_wait_q); | 873 | init_waitqueue_head(&adapter->hs_activate_wait_q); |
874 | adapter->cmd_wait_q_required = false; | ||
875 | init_waitqueue_head(&adapter->cmd_wait_q.wait); | 874 | init_waitqueue_head(&adapter->cmd_wait_q.wait); |
876 | adapter->cmd_wait_q.status = 0; | 875 | adapter->cmd_wait_q.status = 0; |
877 | adapter->scan_wait_q_woken = false; | 876 | adapter->scan_wait_q_woken = false; |
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h index cb1148f0de69..6c04baa5bcf9 100644 --- a/drivers/net/wireless/mwifiex/main.h +++ b/drivers/net/wireless/mwifiex/main.h | |||
@@ -779,7 +779,6 @@ struct mwifiex_adapter { | |||
779 | struct mwifiex_dbg dbg; | 779 | struct mwifiex_dbg dbg; |
780 | u8 arp_filter[ARP_FILTER_MAX_BUF_SIZE]; | 780 | u8 arp_filter[ARP_FILTER_MAX_BUF_SIZE]; |
781 | u32 arp_filter_size; | 781 | u32 arp_filter_size; |
782 | u16 cmd_wait_q_required; | ||
783 | struct mwifiex_wait_queue cmd_wait_q; | 782 | struct mwifiex_wait_queue cmd_wait_q; |
784 | u8 scan_wait_q_woken; | 783 | u8 scan_wait_q_woken; |
785 | spinlock_t queue_lock; /* lock for tx queues */ | 784 | spinlock_t queue_lock; /* lock for tx queues */ |
@@ -839,11 +838,8 @@ int mwifiex_process_event(struct mwifiex_adapter *adapter); | |||
839 | int mwifiex_complete_cmd(struct mwifiex_adapter *adapter, | 838 | int mwifiex_complete_cmd(struct mwifiex_adapter *adapter, |
840 | struct cmd_ctrl_node *cmd_node); | 839 | struct cmd_ctrl_node *cmd_node); |
841 | 840 | ||
842 | int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no, | 841 | int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no, |
843 | u16 cmd_action, u32 cmd_oid, void *data_buf); | 842 | u16 cmd_action, u32 cmd_oid, void *data_buf, bool sync); |
844 | |||
845 | int mwifiex_send_cmd_sync(struct mwifiex_private *priv, uint16_t cmd_no, | ||
846 | u16 cmd_action, u32 cmd_oid, void *data_buf); | ||
847 | 843 | ||
848 | void mwifiex_cmd_timeout_func(unsigned long function_context); | 844 | void mwifiex_cmd_timeout_func(unsigned long function_context); |
849 | 845 | ||
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index 92adbb1ebabc..0e8ca7bab3e7 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c | |||
@@ -738,8 +738,8 @@ mwifiex_scan_channel_list(struct mwifiex_private *priv, | |||
738 | else | 738 | else |
739 | cmd_no = HostCmd_CMD_802_11_SCAN; | 739 | cmd_no = HostCmd_CMD_802_11_SCAN; |
740 | 740 | ||
741 | ret = mwifiex_send_cmd_async(priv, cmd_no, HostCmd_ACT_GEN_SET, | 741 | ret = mwifiex_send_cmd(priv, cmd_no, HostCmd_ACT_GEN_SET, |
742 | 0, scan_cfg_out); | 742 | 0, scan_cfg_out, false); |
743 | 743 | ||
744 | /* rate IE is updated per scan command but same starting | 744 | /* rate IE is updated per scan command but same starting |
745 | * pointer is used each time so that rate IE from earlier | 745 | * pointer is used each time so that rate IE from earlier |
diff --git a/drivers/net/wireless/mwifiex/sta_cmd.c b/drivers/net/wireless/mwifiex/sta_cmd.c index 5aa3d39e48bc..4315a3ba3b92 100644 --- a/drivers/net/wireless/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/mwifiex/sta_cmd.c | |||
@@ -1411,9 +1411,9 @@ int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv, | |||
1411 | /* property header is 6 bytes, data must fit in cmd buffer */ | 1411 | /* property header is 6 bytes, data must fit in cmd buffer */ |
1412 | if (prop && prop->value && prop->length > 6 && | 1412 | if (prop && prop->value && prop->length > 6 && |
1413 | prop->length <= MWIFIEX_SIZE_OF_CMD_BUFFER - S_DS_GEN) { | 1413 | prop->length <= MWIFIEX_SIZE_OF_CMD_BUFFER - S_DS_GEN) { |
1414 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_CFG_DATA, | 1414 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_CFG_DATA, |
1415 | HostCmd_ACT_GEN_SET, 0, | 1415 | HostCmd_ACT_GEN_SET, 0, |
1416 | prop); | 1416 | prop, true); |
1417 | if (ret) | 1417 | if (ret) |
1418 | return ret; | 1418 | return ret; |
1419 | } | 1419 | } |
@@ -1912,15 +1912,16 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta) | |||
1912 | 1912 | ||
1913 | if (first_sta) { | 1913 | if (first_sta) { |
1914 | if (priv->adapter->iface_type == MWIFIEX_PCIE) { | 1914 | if (priv->adapter->iface_type == MWIFIEX_PCIE) { |
1915 | ret = mwifiex_send_cmd_sync(priv, | 1915 | ret = mwifiex_send_cmd(priv, |
1916 | HostCmd_CMD_PCIE_DESC_DETAILS, | 1916 | HostCmd_CMD_PCIE_DESC_DETAILS, |
1917 | HostCmd_ACT_GEN_SET, 0, NULL); | 1917 | HostCmd_ACT_GEN_SET, 0, NULL, |
1918 | true); | ||
1918 | if (ret) | 1919 | if (ret) |
1919 | return -1; | 1920 | return -1; |
1920 | } | 1921 | } |
1921 | 1922 | ||
1922 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_FUNC_INIT, | 1923 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_FUNC_INIT, |
1923 | HostCmd_ACT_GEN_SET, 0, NULL); | 1924 | HostCmd_ACT_GEN_SET, 0, NULL, true); |
1924 | if (ret) | 1925 | if (ret) |
1925 | return -1; | 1926 | return -1; |
1926 | 1927 | ||
@@ -1938,55 +1939,57 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta) | |||
1938 | } | 1939 | } |
1939 | 1940 | ||
1940 | if (adapter->cal_data) { | 1941 | if (adapter->cal_data) { |
1941 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_CFG_DATA, | 1942 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_CFG_DATA, |
1942 | HostCmd_ACT_GEN_SET, 0, NULL); | 1943 | HostCmd_ACT_GEN_SET, 0, NULL, |
1944 | true); | ||
1943 | if (ret) | 1945 | if (ret) |
1944 | return -1; | 1946 | return -1; |
1945 | } | 1947 | } |
1946 | 1948 | ||
1947 | /* Read MAC address from HW */ | 1949 | /* Read MAC address from HW */ |
1948 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_GET_HW_SPEC, | 1950 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_GET_HW_SPEC, |
1949 | HostCmd_ACT_GEN_GET, 0, NULL); | 1951 | HostCmd_ACT_GEN_GET, 0, NULL, true); |
1950 | if (ret) | 1952 | if (ret) |
1951 | return -1; | 1953 | return -1; |
1952 | 1954 | ||
1953 | /* Reconfigure tx buf size */ | 1955 | /* Reconfigure tx buf size */ |
1954 | ret = mwifiex_send_cmd_sync(priv, | 1956 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_RECONFIGURE_TX_BUFF, |
1955 | HostCmd_CMD_RECONFIGURE_TX_BUFF, | 1957 | HostCmd_ACT_GEN_SET, 0, |
1956 | HostCmd_ACT_GEN_SET, 0, | 1958 | &priv->adapter->tx_buf_size, true); |
1957 | &priv->adapter->tx_buf_size); | ||
1958 | if (ret) | 1959 | if (ret) |
1959 | return -1; | 1960 | return -1; |
1960 | 1961 | ||
1961 | if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) { | 1962 | if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) { |
1962 | /* Enable IEEE PS by default */ | 1963 | /* Enable IEEE PS by default */ |
1963 | priv->adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_PSP; | 1964 | priv->adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_PSP; |
1964 | ret = mwifiex_send_cmd_sync( | 1965 | ret = mwifiex_send_cmd(priv, |
1965 | priv, HostCmd_CMD_802_11_PS_MODE_ENH, | 1966 | HostCmd_CMD_802_11_PS_MODE_ENH, |
1966 | EN_AUTO_PS, BITMAP_STA_PS, NULL); | 1967 | EN_AUTO_PS, BITMAP_STA_PS, NULL, |
1968 | true); | ||
1967 | if (ret) | 1969 | if (ret) |
1968 | return -1; | 1970 | return -1; |
1969 | } | 1971 | } |
1970 | } | 1972 | } |
1971 | 1973 | ||
1972 | /* get tx rate */ | 1974 | /* get tx rate */ |
1973 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_TX_RATE_CFG, | 1975 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_TX_RATE_CFG, |
1974 | HostCmd_ACT_GEN_GET, 0, NULL); | 1976 | HostCmd_ACT_GEN_GET, 0, NULL, true); |
1975 | if (ret) | 1977 | if (ret) |
1976 | return -1; | 1978 | return -1; |
1977 | priv->data_rate = 0; | 1979 | priv->data_rate = 0; |
1978 | 1980 | ||
1979 | /* get tx power */ | 1981 | /* get tx power */ |
1980 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_RF_TX_PWR, | 1982 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_RF_TX_PWR, |
1981 | HostCmd_ACT_GEN_GET, 0, NULL); | 1983 | HostCmd_ACT_GEN_GET, 0, NULL, true); |
1982 | if (ret) | 1984 | if (ret) |
1983 | return -1; | 1985 | return -1; |
1984 | 1986 | ||
1985 | if (priv->bss_type == MWIFIEX_BSS_TYPE_STA) { | 1987 | if (priv->bss_type == MWIFIEX_BSS_TYPE_STA) { |
1986 | /* set ibss coalescing_status */ | 1988 | /* set ibss coalescing_status */ |
1987 | ret = mwifiex_send_cmd_sync( | 1989 | ret = mwifiex_send_cmd( |
1988 | priv, HostCmd_CMD_802_11_IBSS_COALESCING_STATUS, | 1990 | priv, |
1989 | HostCmd_ACT_GEN_SET, 0, &enable); | 1991 | HostCmd_CMD_802_11_IBSS_COALESCING_STATUS, |
1992 | HostCmd_ACT_GEN_SET, 0, &enable, true); | ||
1990 | if (ret) | 1993 | if (ret) |
1991 | return -1; | 1994 | return -1; |
1992 | } | 1995 | } |
@@ -1994,16 +1997,16 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta) | |||
1994 | memset(&amsdu_aggr_ctrl, 0, sizeof(amsdu_aggr_ctrl)); | 1997 | memset(&amsdu_aggr_ctrl, 0, sizeof(amsdu_aggr_ctrl)); |
1995 | amsdu_aggr_ctrl.enable = true; | 1998 | amsdu_aggr_ctrl.enable = true; |
1996 | /* Send request to firmware */ | 1999 | /* Send request to firmware */ |
1997 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_AMSDU_AGGR_CTRL, | 2000 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_AMSDU_AGGR_CTRL, |
1998 | HostCmd_ACT_GEN_SET, 0, | 2001 | HostCmd_ACT_GEN_SET, 0, |
1999 | &amsdu_aggr_ctrl); | 2002 | &amsdu_aggr_ctrl, true); |
2000 | if (ret) | 2003 | if (ret) |
2001 | return -1; | 2004 | return -1; |
2002 | /* MAC Control must be the last command in init_fw */ | 2005 | /* MAC Control must be the last command in init_fw */ |
2003 | /* set MAC Control */ | 2006 | /* set MAC Control */ |
2004 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_MAC_CONTROL, | 2007 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_MAC_CONTROL, |
2005 | HostCmd_ACT_GEN_SET, 0, | 2008 | HostCmd_ACT_GEN_SET, 0, |
2006 | &priv->curr_pkt_filter); | 2009 | &priv->curr_pkt_filter, true); |
2007 | if (ret) | 2010 | if (ret) |
2008 | return -1; | 2011 | return -1; |
2009 | 2012 | ||
@@ -2012,10 +2015,9 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta) | |||
2012 | /* Enable auto deep sleep */ | 2015 | /* Enable auto deep sleep */ |
2013 | auto_ds.auto_ds = DEEP_SLEEP_ON; | 2016 | auto_ds.auto_ds = DEEP_SLEEP_ON; |
2014 | auto_ds.idle_time = DEEP_SLEEP_IDLE_TIME; | 2017 | auto_ds.idle_time = DEEP_SLEEP_IDLE_TIME; |
2015 | ret = mwifiex_send_cmd_sync(priv, | 2018 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_PS_MODE_ENH, |
2016 | HostCmd_CMD_802_11_PS_MODE_ENH, | 2019 | EN_AUTO_PS, BITMAP_AUTO_DS, |
2017 | EN_AUTO_PS, BITMAP_AUTO_DS, | 2020 | &auto_ds, true); |
2018 | &auto_ds); | ||
2019 | if (ret) | 2021 | if (ret) |
2020 | return -1; | 2022 | return -1; |
2021 | } | 2023 | } |
@@ -2023,9 +2025,9 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta) | |||
2023 | if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) { | 2025 | if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) { |
2024 | /* Send cmd to FW to enable/disable 11D function */ | 2026 | /* Send cmd to FW to enable/disable 11D function */ |
2025 | state_11d = ENABLE_11D; | 2027 | state_11d = ENABLE_11D; |
2026 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_SNMP_MIB, | 2028 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_SNMP_MIB, |
2027 | HostCmd_ACT_GEN_SET, DOT11D_I, | 2029 | HostCmd_ACT_GEN_SET, DOT11D_I, |
2028 | &state_11d); | 2030 | &state_11d, true); |
2029 | if (ret) | 2031 | if (ret) |
2030 | dev_err(priv->adapter->dev, | 2032 | dev_err(priv->adapter->dev, |
2031 | "11D: failed to enable 11D\n"); | 2033 | "11D: failed to enable 11D\n"); |
@@ -2038,8 +2040,8 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta) | |||
2038 | * (Short GI, Channel BW, Green field support etc.) for transmit | 2040 | * (Short GI, Channel BW, Green field support etc.) for transmit |
2039 | */ | 2041 | */ |
2040 | tx_cfg.tx_htcap = MWIFIEX_FW_DEF_HTTXCFG; | 2042 | tx_cfg.tx_htcap = MWIFIEX_FW_DEF_HTTXCFG; |
2041 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_11N_CFG, | 2043 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_11N_CFG, |
2042 | HostCmd_ACT_GEN_SET, 0, &tx_cfg); | 2044 | HostCmd_ACT_GEN_SET, 0, &tx_cfg, true); |
2043 | 2045 | ||
2044 | ret = -EINPROGRESS; | 2046 | ret = -EINPROGRESS; |
2045 | 2047 | ||
diff --git a/drivers/net/wireless/mwifiex/sta_cmdresp.c b/drivers/net/wireless/mwifiex/sta_cmdresp.c index 1c5e18804074..a8f7d545e22a 100644 --- a/drivers/net/wireless/mwifiex/sta_cmdresp.c +++ b/drivers/net/wireless/mwifiex/sta_cmdresp.c | |||
@@ -158,8 +158,8 @@ static int mwifiex_ret_802_11_rssi_info(struct mwifiex_private *priv, | |||
158 | 158 | ||
159 | priv->subsc_evt_rssi_state = EVENT_HANDLED; | 159 | priv->subsc_evt_rssi_state = EVENT_HANDLED; |
160 | 160 | ||
161 | mwifiex_send_cmd_async(priv, HostCmd_CMD_802_11_SUBSCRIBE_EVENT, | 161 | mwifiex_send_cmd(priv, HostCmd_CMD_802_11_SUBSCRIBE_EVENT, |
162 | 0, 0, subsc_evt); | 162 | 0, 0, subsc_evt, false); |
163 | 163 | ||
164 | return 0; | 164 | return 0; |
165 | } | 165 | } |
@@ -317,9 +317,8 @@ static int mwifiex_ret_tx_rate_cfg(struct mwifiex_private *priv, | |||
317 | if (priv->is_data_rate_auto) | 317 | if (priv->is_data_rate_auto) |
318 | priv->data_rate = 0; | 318 | priv->data_rate = 0; |
319 | else | 319 | else |
320 | return mwifiex_send_cmd_async(priv, | 320 | return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_TX_RATE_QUERY, |
321 | HostCmd_CMD_802_11_TX_RATE_QUERY, | 321 | HostCmd_ACT_GEN_GET, 0, NULL, false); |
322 | HostCmd_ACT_GEN_GET, 0, NULL); | ||
323 | 322 | ||
324 | return 0; | 323 | return 0; |
325 | } | 324 | } |
diff --git a/drivers/net/wireless/mwifiex/sta_event.c b/drivers/net/wireless/mwifiex/sta_event.c index 92ff7b324b00..fd2a7165cfa5 100644 --- a/drivers/net/wireless/mwifiex/sta_event.c +++ b/drivers/net/wireless/mwifiex/sta_event.c | |||
@@ -293,9 +293,8 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv) | |||
293 | 293 | ||
294 | case EVENT_HS_ACT_REQ: | 294 | case EVENT_HS_ACT_REQ: |
295 | dev_dbg(adapter->dev, "event: HS_ACT_REQ\n"); | 295 | dev_dbg(adapter->dev, "event: HS_ACT_REQ\n"); |
296 | ret = mwifiex_send_cmd_async(priv, | 296 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_HS_CFG_ENH, |
297 | HostCmd_CMD_802_11_HS_CFG_ENH, | 297 | 0, 0, NULL, false); |
298 | 0, 0, NULL); | ||
299 | break; | 298 | break; |
300 | 299 | ||
301 | case EVENT_MIC_ERR_UNICAST: | 300 | case EVENT_MIC_ERR_UNICAST: |
@@ -326,9 +325,8 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv) | |||
326 | 325 | ||
327 | case EVENT_BG_SCAN_REPORT: | 326 | case EVENT_BG_SCAN_REPORT: |
328 | dev_dbg(adapter->dev, "event: BGS_REPORT\n"); | 327 | dev_dbg(adapter->dev, "event: BGS_REPORT\n"); |
329 | ret = mwifiex_send_cmd_async(priv, | 328 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_BG_SCAN_QUERY, |
330 | HostCmd_CMD_802_11_BG_SCAN_QUERY, | 329 | HostCmd_ACT_GEN_GET, 0, NULL, false); |
331 | HostCmd_ACT_GEN_GET, 0, NULL); | ||
332 | break; | 330 | break; |
333 | 331 | ||
334 | case EVENT_PORT_RELEASE: | 332 | case EVENT_PORT_RELEASE: |
@@ -345,16 +343,16 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv) | |||
345 | 343 | ||
346 | case EVENT_WMM_STATUS_CHANGE: | 344 | case EVENT_WMM_STATUS_CHANGE: |
347 | dev_dbg(adapter->dev, "event: WMM status changed\n"); | 345 | dev_dbg(adapter->dev, "event: WMM status changed\n"); |
348 | ret = mwifiex_send_cmd_async(priv, HostCmd_CMD_WMM_GET_STATUS, | 346 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_WMM_GET_STATUS, |
349 | 0, 0, NULL); | 347 | 0, 0, NULL, false); |
350 | break; | 348 | break; |
351 | 349 | ||
352 | case EVENT_RSSI_LOW: | 350 | case EVENT_RSSI_LOW: |
353 | cfg80211_cqm_rssi_notify(priv->netdev, | 351 | cfg80211_cqm_rssi_notify(priv->netdev, |
354 | NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, | 352 | NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, |
355 | GFP_KERNEL); | 353 | GFP_KERNEL); |
356 | mwifiex_send_cmd_async(priv, HostCmd_CMD_RSSI_INFO, | 354 | mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO, |
357 | HostCmd_ACT_GEN_GET, 0, NULL); | 355 | HostCmd_ACT_GEN_GET, 0, NULL, false); |
358 | priv->subsc_evt_rssi_state = RSSI_LOW_RECVD; | 356 | priv->subsc_evt_rssi_state = RSSI_LOW_RECVD; |
359 | dev_dbg(adapter->dev, "event: Beacon RSSI_LOW\n"); | 357 | dev_dbg(adapter->dev, "event: Beacon RSSI_LOW\n"); |
360 | break; | 358 | break; |
@@ -368,8 +366,8 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv) | |||
368 | cfg80211_cqm_rssi_notify(priv->netdev, | 366 | cfg80211_cqm_rssi_notify(priv->netdev, |
369 | NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, | 367 | NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, |
370 | GFP_KERNEL); | 368 | GFP_KERNEL); |
371 | mwifiex_send_cmd_async(priv, HostCmd_CMD_RSSI_INFO, | 369 | mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO, |
372 | HostCmd_ACT_GEN_GET, 0, NULL); | 370 | HostCmd_ACT_GEN_GET, 0, NULL, false); |
373 | priv->subsc_evt_rssi_state = RSSI_HIGH_RECVD; | 371 | priv->subsc_evt_rssi_state = RSSI_HIGH_RECVD; |
374 | dev_dbg(adapter->dev, "event: Beacon RSSI_HIGH\n"); | 372 | dev_dbg(adapter->dev, "event: Beacon RSSI_HIGH\n"); |
375 | break; | 373 | break; |
@@ -396,15 +394,15 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv) | |||
396 | break; | 394 | break; |
397 | case EVENT_IBSS_COALESCED: | 395 | case EVENT_IBSS_COALESCED: |
398 | dev_dbg(adapter->dev, "event: IBSS_COALESCED\n"); | 396 | dev_dbg(adapter->dev, "event: IBSS_COALESCED\n"); |
399 | ret = mwifiex_send_cmd_async(priv, | 397 | ret = mwifiex_send_cmd(priv, |
400 | HostCmd_CMD_802_11_IBSS_COALESCING_STATUS, | 398 | HostCmd_CMD_802_11_IBSS_COALESCING_STATUS, |
401 | HostCmd_ACT_GEN_GET, 0, NULL); | 399 | HostCmd_ACT_GEN_GET, 0, NULL, false); |
402 | break; | 400 | break; |
403 | case EVENT_ADDBA: | 401 | case EVENT_ADDBA: |
404 | dev_dbg(adapter->dev, "event: ADDBA Request\n"); | 402 | dev_dbg(adapter->dev, "event: ADDBA Request\n"); |
405 | mwifiex_send_cmd_async(priv, HostCmd_CMD_11N_ADDBA_RSP, | 403 | mwifiex_send_cmd(priv, HostCmd_CMD_11N_ADDBA_RSP, |
406 | HostCmd_ACT_GEN_SET, 0, | 404 | HostCmd_ACT_GEN_SET, 0, |
407 | adapter->event_body); | 405 | adapter->event_body, false); |
408 | break; | 406 | break; |
409 | case EVENT_DELBA: | 407 | case EVENT_DELBA: |
410 | dev_dbg(adapter->dev, "event: DELBA Request\n"); | 408 | dev_dbg(adapter->dev, "event: DELBA Request\n"); |
@@ -455,10 +453,10 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv) | |||
455 | priv->csa_expire_time = | 453 | priv->csa_expire_time = |
456 | jiffies + msecs_to_jiffies(DFS_CHAN_MOVE_TIME); | 454 | jiffies + msecs_to_jiffies(DFS_CHAN_MOVE_TIME); |
457 | priv->csa_chan = priv->curr_bss_params.bss_descriptor.channel; | 455 | priv->csa_chan = priv->curr_bss_params.bss_descriptor.channel; |
458 | ret = mwifiex_send_cmd_async(priv, | 456 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_DEAUTHENTICATE, |
459 | HostCmd_CMD_802_11_DEAUTHENTICATE, | ||
460 | HostCmd_ACT_GEN_SET, 0, | 457 | HostCmd_ACT_GEN_SET, 0, |
461 | priv->curr_bss_params.bss_descriptor.mac_address); | 458 | priv->curr_bss_params.bss_descriptor.mac_address, |
459 | false); | ||
462 | break; | 460 | break; |
463 | 461 | ||
464 | default: | 462 | default: |
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index b393d55b3aa0..33170af150f6 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c | |||
@@ -108,19 +108,19 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv, | |||
108 | "info: Set multicast list=%d\n", | 108 | "info: Set multicast list=%d\n", |
109 | mcast_list->num_multicast_addr); | 109 | mcast_list->num_multicast_addr); |
110 | /* Send multicast addresses to firmware */ | 110 | /* Send multicast addresses to firmware */ |
111 | ret = mwifiex_send_cmd_async(priv, | 111 | ret = mwifiex_send_cmd(priv, |
112 | HostCmd_CMD_MAC_MULTICAST_ADR, | 112 | HostCmd_CMD_MAC_MULTICAST_ADR, |
113 | HostCmd_ACT_GEN_SET, 0, | 113 | HostCmd_ACT_GEN_SET, 0, |
114 | mcast_list); | 114 | mcast_list, false); |
115 | } | 115 | } |
116 | } | 116 | } |
117 | dev_dbg(priv->adapter->dev, | 117 | dev_dbg(priv->adapter->dev, |
118 | "info: old_pkt_filter=%#x, curr_pkt_filter=%#x\n", | 118 | "info: old_pkt_filter=%#x, curr_pkt_filter=%#x\n", |
119 | old_pkt_filter, priv->curr_pkt_filter); | 119 | old_pkt_filter, priv->curr_pkt_filter); |
120 | if (old_pkt_filter != priv->curr_pkt_filter) { | 120 | if (old_pkt_filter != priv->curr_pkt_filter) { |
121 | ret = mwifiex_send_cmd_async(priv, HostCmd_CMD_MAC_CONTROL, | 121 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_MAC_CONTROL, |
122 | HostCmd_ACT_GEN_SET, | 122 | HostCmd_ACT_GEN_SET, |
123 | 0, &priv->curr_pkt_filter); | 123 | 0, &priv->curr_pkt_filter, false); |
124 | } | 124 | } |
125 | 125 | ||
126 | return ret; | 126 | return ret; |
@@ -237,8 +237,8 @@ static int mwifiex_process_country_ie(struct mwifiex_private *priv, | |||
237 | 237 | ||
238 | rcu_read_unlock(); | 238 | rcu_read_unlock(); |
239 | 239 | ||
240 | if (mwifiex_send_cmd_async(priv, HostCmd_CMD_802_11D_DOMAIN_INFO, | 240 | if (mwifiex_send_cmd(priv, HostCmd_CMD_802_11D_DOMAIN_INFO, |
241 | HostCmd_ACT_GEN_SET, 0, NULL)) { | 241 | HostCmd_ACT_GEN_SET, 0, NULL, false)) { |
242 | wiphy_err(priv->adapter->wiphy, | 242 | wiphy_err(priv->adapter->wiphy, |
243 | "11D: setting domain info in FW\n"); | 243 | "11D: setting domain info in FW\n"); |
244 | return -1; | 244 | return -1; |
@@ -429,16 +429,13 @@ static int mwifiex_set_hs_params(struct mwifiex_private *priv, u16 action, | |||
429 | status = -1; | 429 | status = -1; |
430 | break; | 430 | break; |
431 | } | 431 | } |
432 | if (cmd_type == MWIFIEX_SYNC_CMD) | 432 | |
433 | status = mwifiex_send_cmd_sync(priv, | 433 | status = mwifiex_send_cmd(priv, |
434 | HostCmd_CMD_802_11_HS_CFG_ENH, | 434 | HostCmd_CMD_802_11_HS_CFG_ENH, |
435 | HostCmd_ACT_GEN_SET, 0, | 435 | HostCmd_ACT_GEN_SET, 0, |
436 | &adapter->hs_cfg); | 436 | &adapter->hs_cfg, |
437 | else | 437 | cmd_type == MWIFIEX_SYNC_CMD); |
438 | status = mwifiex_send_cmd_async(priv, | 438 | |
439 | HostCmd_CMD_802_11_HS_CFG_ENH, | ||
440 | HostCmd_ACT_GEN_SET, 0, | ||
441 | &adapter->hs_cfg); | ||
442 | if (hs_cfg->conditions == HS_CFG_CANCEL) | 439 | if (hs_cfg->conditions == HS_CFG_CANCEL) |
443 | /* Restore previous condition */ | 440 | /* Restore previous condition */ |
444 | adapter->hs_cfg.conditions = | 441 | adapter->hs_cfg.conditions = |
@@ -586,8 +583,8 @@ int mwifiex_disable_auto_ds(struct mwifiex_private *priv) | |||
586 | 583 | ||
587 | auto_ds.auto_ds = DEEP_SLEEP_OFF; | 584 | auto_ds.auto_ds = DEEP_SLEEP_OFF; |
588 | 585 | ||
589 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_PS_MODE_ENH, | 586 | return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_PS_MODE_ENH, |
590 | DIS_AUTO_PS, BITMAP_AUTO_DS, &auto_ds); | 587 | DIS_AUTO_PS, BITMAP_AUTO_DS, &auto_ds, true); |
591 | } | 588 | } |
592 | EXPORT_SYMBOL_GPL(mwifiex_disable_auto_ds); | 589 | EXPORT_SYMBOL_GPL(mwifiex_disable_auto_ds); |
593 | 590 | ||
@@ -601,8 +598,8 @@ int mwifiex_drv_get_data_rate(struct mwifiex_private *priv, u32 *rate) | |||
601 | { | 598 | { |
602 | int ret; | 599 | int ret; |
603 | 600 | ||
604 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_TX_RATE_QUERY, | 601 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_TX_RATE_QUERY, |
605 | HostCmd_ACT_GEN_GET, 0, NULL); | 602 | HostCmd_ACT_GEN_GET, 0, NULL, true); |
606 | 603 | ||
607 | if (!ret) { | 604 | if (!ret) { |
608 | if (priv->is_data_rate_auto) | 605 | if (priv->is_data_rate_auto) |
@@ -698,8 +695,8 @@ int mwifiex_set_tx_power(struct mwifiex_private *priv, | |||
698 | pg->power_max = (s8) dbm; | 695 | pg->power_max = (s8) dbm; |
699 | pg->ht_bandwidth = HT_BW_40; | 696 | pg->ht_bandwidth = HT_BW_40; |
700 | } | 697 | } |
701 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_TXPWR_CFG, | 698 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_TXPWR_CFG, |
702 | HostCmd_ACT_GEN_SET, 0, buf); | 699 | HostCmd_ACT_GEN_SET, 0, buf, true); |
703 | 700 | ||
704 | kfree(buf); | 701 | kfree(buf); |
705 | return ret; | 702 | return ret; |
@@ -722,12 +719,11 @@ int mwifiex_drv_set_power(struct mwifiex_private *priv, u32 *ps_mode) | |||
722 | else | 719 | else |
723 | adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_CAM; | 720 | adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_CAM; |
724 | sub_cmd = (*ps_mode) ? EN_AUTO_PS : DIS_AUTO_PS; | 721 | sub_cmd = (*ps_mode) ? EN_AUTO_PS : DIS_AUTO_PS; |
725 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_PS_MODE_ENH, | 722 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_PS_MODE_ENH, |
726 | sub_cmd, BITMAP_STA_PS, NULL); | 723 | sub_cmd, BITMAP_STA_PS, NULL, true); |
727 | if ((!ret) && (sub_cmd == DIS_AUTO_PS)) | 724 | if ((!ret) && (sub_cmd == DIS_AUTO_PS)) |
728 | ret = mwifiex_send_cmd_async(priv, | 725 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_PS_MODE_ENH, |
729 | HostCmd_CMD_802_11_PS_MODE_ENH, | 726 | GET_PS, 0, NULL, false); |
730 | GET_PS, 0, NULL); | ||
731 | 727 | ||
732 | return ret; | 728 | return ret; |
733 | } | 729 | } |
@@ -851,9 +847,9 @@ static int mwifiex_sec_ioctl_set_wapi_key(struct mwifiex_private *priv, | |||
851 | struct mwifiex_ds_encrypt_key *encrypt_key) | 847 | struct mwifiex_ds_encrypt_key *encrypt_key) |
852 | { | 848 | { |
853 | 849 | ||
854 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_KEY_MATERIAL, | 850 | return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_KEY_MATERIAL, |
855 | HostCmd_ACT_GEN_SET, KEY_INFO_ENABLED, | 851 | HostCmd_ACT_GEN_SET, KEY_INFO_ENABLED, |
856 | encrypt_key); | 852 | encrypt_key, true); |
857 | } | 853 | } |
858 | 854 | ||
859 | /* | 855 | /* |
@@ -917,9 +913,8 @@ static int mwifiex_sec_ioctl_set_wep_key(struct mwifiex_private *priv, | |||
917 | enc_key = NULL; | 913 | enc_key = NULL; |
918 | 914 | ||
919 | /* Send request to firmware */ | 915 | /* Send request to firmware */ |
920 | ret = mwifiex_send_cmd_async(priv, | 916 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_KEY_MATERIAL, |
921 | HostCmd_CMD_802_11_KEY_MATERIAL, | 917 | HostCmd_ACT_GEN_SET, 0, enc_key, false); |
922 | HostCmd_ACT_GEN_SET, 0, enc_key); | ||
923 | if (ret) | 918 | if (ret) |
924 | return ret; | 919 | return ret; |
925 | } | 920 | } |
@@ -929,9 +924,9 @@ static int mwifiex_sec_ioctl_set_wep_key(struct mwifiex_private *priv, | |||
929 | else | 924 | else |
930 | priv->curr_pkt_filter &= ~HostCmd_ACT_MAC_WEP_ENABLE; | 925 | priv->curr_pkt_filter &= ~HostCmd_ACT_MAC_WEP_ENABLE; |
931 | 926 | ||
932 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_MAC_CONTROL, | 927 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_MAC_CONTROL, |
933 | HostCmd_ACT_GEN_SET, 0, | 928 | HostCmd_ACT_GEN_SET, 0, |
934 | &priv->curr_pkt_filter); | 929 | &priv->curr_pkt_filter, true); |
935 | 930 | ||
936 | return ret; | 931 | return ret; |
937 | } | 932 | } |
@@ -966,10 +961,9 @@ static int mwifiex_sec_ioctl_set_wpa_key(struct mwifiex_private *priv, | |||
966 | */ | 961 | */ |
967 | /* Send the key as PTK to firmware */ | 962 | /* Send the key as PTK to firmware */ |
968 | encrypt_key->key_index = MWIFIEX_KEY_INDEX_UNICAST; | 963 | encrypt_key->key_index = MWIFIEX_KEY_INDEX_UNICAST; |
969 | ret = mwifiex_send_cmd_async(priv, | 964 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_KEY_MATERIAL, |
970 | HostCmd_CMD_802_11_KEY_MATERIAL, | 965 | HostCmd_ACT_GEN_SET, |
971 | HostCmd_ACT_GEN_SET, | 966 | KEY_INFO_ENABLED, encrypt_key, false); |
972 | KEY_INFO_ENABLED, encrypt_key); | ||
973 | if (ret) | 967 | if (ret) |
974 | return ret; | 968 | return ret; |
975 | 969 | ||
@@ -993,15 +987,13 @@ static int mwifiex_sec_ioctl_set_wpa_key(struct mwifiex_private *priv, | |||
993 | encrypt_key->key_index = MWIFIEX_KEY_INDEX_UNICAST; | 987 | encrypt_key->key_index = MWIFIEX_KEY_INDEX_UNICAST; |
994 | 988 | ||
995 | if (remove_key) | 989 | if (remove_key) |
996 | ret = mwifiex_send_cmd_sync(priv, | 990 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_KEY_MATERIAL, |
997 | HostCmd_CMD_802_11_KEY_MATERIAL, | 991 | HostCmd_ACT_GEN_SET, |
998 | HostCmd_ACT_GEN_SET, | 992 | !KEY_INFO_ENABLED, encrypt_key, true); |
999 | !KEY_INFO_ENABLED, encrypt_key); | ||
1000 | else | 993 | else |
1001 | ret = mwifiex_send_cmd_sync(priv, | 994 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_KEY_MATERIAL, |
1002 | HostCmd_CMD_802_11_KEY_MATERIAL, | 995 | HostCmd_ACT_GEN_SET, |
1003 | HostCmd_ACT_GEN_SET, | 996 | KEY_INFO_ENABLED, encrypt_key, true); |
1004 | KEY_INFO_ENABLED, encrypt_key); | ||
1005 | 997 | ||
1006 | return ret; | 998 | return ret; |
1007 | } | 999 | } |
@@ -1105,8 +1097,8 @@ mwifiex_get_ver_ext(struct mwifiex_private *priv) | |||
1105 | struct mwifiex_ver_ext ver_ext; | 1097 | struct mwifiex_ver_ext ver_ext; |
1106 | 1098 | ||
1107 | memset(&ver_ext, 0, sizeof(struct host_cmd_ds_version_ext)); | 1099 | memset(&ver_ext, 0, sizeof(struct host_cmd_ds_version_ext)); |
1108 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_VERSION_EXT, | 1100 | if (mwifiex_send_cmd(priv, HostCmd_CMD_VERSION_EXT, |
1109 | HostCmd_ACT_GEN_GET, 0, &ver_ext)) | 1101 | HostCmd_ACT_GEN_GET, 0, &ver_ext, true)) |
1110 | return -1; | 1102 | return -1; |
1111 | 1103 | ||
1112 | return 0; | 1104 | return 0; |
@@ -1131,8 +1123,8 @@ mwifiex_remain_on_chan_cfg(struct mwifiex_private *priv, u16 action, | |||
1131 | ieee80211_frequency_to_channel(chan->center_freq); | 1123 | ieee80211_frequency_to_channel(chan->center_freq); |
1132 | roc_cfg.duration = cpu_to_le32(duration); | 1124 | roc_cfg.duration = cpu_to_le32(duration); |
1133 | } | 1125 | } |
1134 | if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_REMAIN_ON_CHAN, | 1126 | if (mwifiex_send_cmd(priv, HostCmd_CMD_REMAIN_ON_CHAN, |
1135 | action, 0, &roc_cfg)) { | 1127 | action, 0, &roc_cfg, true)) { |
1136 | dev_err(priv->adapter->dev, "failed to remain on channel\n"); | 1128 | dev_err(priv->adapter->dev, "failed to remain on channel\n"); |
1137 | return -1; | 1129 | return -1; |
1138 | } | 1130 | } |
@@ -1164,8 +1156,8 @@ mwifiex_set_bss_role(struct mwifiex_private *priv, u8 bss_role) | |||
1164 | break; | 1156 | break; |
1165 | } | 1157 | } |
1166 | 1158 | ||
1167 | mwifiex_send_cmd_sync(priv, HostCmd_CMD_SET_BSS_MODE, | 1159 | mwifiex_send_cmd(priv, HostCmd_CMD_SET_BSS_MODE, |
1168 | HostCmd_ACT_GEN_SET, 0, NULL); | 1160 | HostCmd_ACT_GEN_SET, 0, NULL, true); |
1169 | 1161 | ||
1170 | return mwifiex_sta_init_cmd(priv, false); | 1162 | return mwifiex_sta_init_cmd(priv, false); |
1171 | } | 1163 | } |
@@ -1180,8 +1172,8 @@ int | |||
1180 | mwifiex_get_stats_info(struct mwifiex_private *priv, | 1172 | mwifiex_get_stats_info(struct mwifiex_private *priv, |
1181 | struct mwifiex_ds_get_stats *log) | 1173 | struct mwifiex_ds_get_stats *log) |
1182 | { | 1174 | { |
1183 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_GET_LOG, | 1175 | return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_GET_LOG, |
1184 | HostCmd_ACT_GEN_GET, 0, log); | 1176 | HostCmd_ACT_GEN_GET, 0, log, true); |
1185 | } | 1177 | } |
1186 | 1178 | ||
1187 | /* | 1179 | /* |
@@ -1223,8 +1215,7 @@ static int mwifiex_reg_mem_ioctl_reg_rw(struct mwifiex_private *priv, | |||
1223 | return -1; | 1215 | return -1; |
1224 | } | 1216 | } |
1225 | 1217 | ||
1226 | return mwifiex_send_cmd_sync(priv, cmd_no, action, 0, reg_rw); | 1218 | return mwifiex_send_cmd(priv, cmd_no, action, 0, reg_rw, true); |
1227 | |||
1228 | } | 1219 | } |
1229 | 1220 | ||
1230 | /* | 1221 | /* |
@@ -1289,8 +1280,8 @@ mwifiex_eeprom_read(struct mwifiex_private *priv, u16 offset, u16 bytes, | |||
1289 | rd_eeprom.byte_count = cpu_to_le16((u16) bytes); | 1280 | rd_eeprom.byte_count = cpu_to_le16((u16) bytes); |
1290 | 1281 | ||
1291 | /* Send request to firmware */ | 1282 | /* Send request to firmware */ |
1292 | ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_EEPROM_ACCESS, | 1283 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_EEPROM_ACCESS, |
1293 | HostCmd_ACT_GEN_GET, 0, &rd_eeprom); | 1284 | HostCmd_ACT_GEN_GET, 0, &rd_eeprom, true); |
1294 | 1285 | ||
1295 | if (!ret) | 1286 | if (!ret) |
1296 | memcpy(value, rd_eeprom.value, MAX_EEPROM_DATA); | 1287 | memcpy(value, rd_eeprom.value, MAX_EEPROM_DATA); |
diff --git a/drivers/net/wireless/mwifiex/tdls.c b/drivers/net/wireless/mwifiex/tdls.c index 1ba2a16ee471..8cec6e4ba8c4 100644 --- a/drivers/net/wireless/mwifiex/tdls.c +++ b/drivers/net/wireless/mwifiex/tdls.c | |||
@@ -864,8 +864,8 @@ mwifiex_tdls_process_config_link(struct mwifiex_private *priv, u8 *peer) | |||
864 | 864 | ||
865 | memcpy(&tdls_oper.peer_mac, peer, ETH_ALEN); | 865 | memcpy(&tdls_oper.peer_mac, peer, ETH_ALEN); |
866 | tdls_oper.tdls_action = MWIFIEX_TDLS_CONFIG_LINK; | 866 | tdls_oper.tdls_action = MWIFIEX_TDLS_CONFIG_LINK; |
867 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_TDLS_OPER, | 867 | return mwifiex_send_cmd(priv, HostCmd_CMD_TDLS_OPER, |
868 | HostCmd_ACT_GEN_SET, 0, &tdls_oper); | 868 | HostCmd_ACT_GEN_SET, 0, &tdls_oper, true); |
869 | } | 869 | } |
870 | 870 | ||
871 | static int | 871 | static int |
@@ -891,8 +891,8 @@ mwifiex_tdls_process_create_link(struct mwifiex_private *priv, u8 *peer) | |||
891 | mwifiex_hold_tdls_packets(priv, peer); | 891 | mwifiex_hold_tdls_packets(priv, peer); |
892 | memcpy(&tdls_oper.peer_mac, peer, ETH_ALEN); | 892 | memcpy(&tdls_oper.peer_mac, peer, ETH_ALEN); |
893 | tdls_oper.tdls_action = MWIFIEX_TDLS_CREATE_LINK; | 893 | tdls_oper.tdls_action = MWIFIEX_TDLS_CREATE_LINK; |
894 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_TDLS_OPER, | 894 | return mwifiex_send_cmd(priv, HostCmd_CMD_TDLS_OPER, |
895 | HostCmd_ACT_GEN_SET, 0, &tdls_oper); | 895 | HostCmd_ACT_GEN_SET, 0, &tdls_oper, true); |
896 | } | 896 | } |
897 | 897 | ||
898 | static int | 898 | static int |
@@ -920,8 +920,8 @@ mwifiex_tdls_process_disable_link(struct mwifiex_private *priv, u8 *peer) | |||
920 | mwifiex_restore_tdls_packets(priv, peer, TDLS_LINK_TEARDOWN); | 920 | mwifiex_restore_tdls_packets(priv, peer, TDLS_LINK_TEARDOWN); |
921 | memcpy(&tdls_oper.peer_mac, peer, ETH_ALEN); | 921 | memcpy(&tdls_oper.peer_mac, peer, ETH_ALEN); |
922 | tdls_oper.tdls_action = MWIFIEX_TDLS_DISABLE_LINK; | 922 | tdls_oper.tdls_action = MWIFIEX_TDLS_DISABLE_LINK; |
923 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_TDLS_OPER, | 923 | return mwifiex_send_cmd(priv, HostCmd_CMD_TDLS_OPER, |
924 | HostCmd_ACT_GEN_SET, 0, &tdls_oper); | 924 | HostCmd_ACT_GEN_SET, 0, &tdls_oper, true); |
925 | } | 925 | } |
926 | 926 | ||
927 | static int | 927 | static int |
@@ -1033,8 +1033,8 @@ void mwifiex_disable_all_tdls_links(struct mwifiex_private *priv) | |||
1033 | TDLS_LINK_TEARDOWN); | 1033 | TDLS_LINK_TEARDOWN); |
1034 | memcpy(&tdls_oper.peer_mac, sta_ptr->mac_addr, ETH_ALEN); | 1034 | memcpy(&tdls_oper.peer_mac, sta_ptr->mac_addr, ETH_ALEN); |
1035 | tdls_oper.tdls_action = MWIFIEX_TDLS_DISABLE_LINK; | 1035 | tdls_oper.tdls_action = MWIFIEX_TDLS_DISABLE_LINK; |
1036 | if (mwifiex_send_cmd_async(priv, HostCmd_CMD_TDLS_OPER, | 1036 | if (mwifiex_send_cmd(priv, HostCmd_CMD_TDLS_OPER, |
1037 | HostCmd_ACT_GEN_SET, 0, &tdls_oper)) | 1037 | HostCmd_ACT_GEN_SET, 0, &tdls_oper, false)) |
1038 | dev_warn(priv->adapter->dev, | 1038 | dev_warn(priv->adapter->dev, |
1039 | "Disable link failed for TDLS peer %pM", | 1039 | "Disable link failed for TDLS peer %pM", |
1040 | sta_ptr->mac_addr); | 1040 | sta_ptr->mac_addr); |
diff --git a/drivers/net/wireless/mwifiex/uap_cmd.c b/drivers/net/wireless/mwifiex/uap_cmd.c index 64424c81b44f..a6a6a53cda40 100644 --- a/drivers/net/wireless/mwifiex/uap_cmd.c +++ b/drivers/net/wireless/mwifiex/uap_cmd.c | |||
@@ -226,8 +226,8 @@ void mwifiex_set_vht_width(struct mwifiex_private *priv, | |||
226 | if (ap_11ac_enable && width >= NL80211_CHAN_WIDTH_80) | 226 | if (ap_11ac_enable && width >= NL80211_CHAN_WIDTH_80) |
227 | vht_cfg.misc_config |= VHT_BW_80_160_80P80; | 227 | vht_cfg.misc_config |= VHT_BW_80_160_80P80; |
228 | 228 | ||
229 | mwifiex_send_cmd_sync(priv, HostCmd_CMD_11AC_CFG, | 229 | mwifiex_send_cmd(priv, HostCmd_CMD_11AC_CFG, |
230 | HostCmd_ACT_GEN_SET, 0, &vht_cfg); | 230 | HostCmd_ACT_GEN_SET, 0, &vht_cfg, true); |
231 | 231 | ||
232 | return; | 232 | return; |
233 | } | 233 | } |
diff --git a/drivers/net/wireless/mwifiex/uap_event.c b/drivers/net/wireless/mwifiex/uap_event.c index 2d47ba70225c..ae50e916d8f2 100644 --- a/drivers/net/wireless/mwifiex/uap_event.c +++ b/drivers/net/wireless/mwifiex/uap_event.c | |||
@@ -150,9 +150,9 @@ int mwifiex_process_uap_event(struct mwifiex_private *priv) | |||
150 | case EVENT_ADDBA: | 150 | case EVENT_ADDBA: |
151 | dev_dbg(adapter->dev, "event: ADDBA Request\n"); | 151 | dev_dbg(adapter->dev, "event: ADDBA Request\n"); |
152 | if (priv->media_connected) | 152 | if (priv->media_connected) |
153 | mwifiex_send_cmd_async(priv, HostCmd_CMD_11N_ADDBA_RSP, | 153 | mwifiex_send_cmd(priv, HostCmd_CMD_11N_ADDBA_RSP, |
154 | HostCmd_ACT_GEN_SET, 0, | 154 | HostCmd_ACT_GEN_SET, 0, |
155 | adapter->event_body); | 155 | adapter->event_body, false); |
156 | break; | 156 | break; |
157 | case EVENT_DELBA: | 157 | case EVENT_DELBA: |
158 | dev_dbg(adapter->dev, "event: DELBA Request\n"); | 158 | dev_dbg(adapter->dev, "event: DELBA Request\n"); |
diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c index 8d37bfc578bd..098de8810729 100644 --- a/drivers/net/wireless/mwifiex/util.c +++ b/drivers/net/wireless/mwifiex/util.c | |||
@@ -72,7 +72,7 @@ int mwifiex_init_shutdown_fw(struct mwifiex_private *priv, | |||
72 | return -1; | 72 | return -1; |
73 | } | 73 | } |
74 | 74 | ||
75 | return mwifiex_send_cmd_sync(priv, cmd, HostCmd_ACT_GEN_SET, 0, NULL); | 75 | return mwifiex_send_cmd(priv, cmd, HostCmd_ACT_GEN_SET, 0, NULL, true); |
76 | } | 76 | } |
77 | EXPORT_SYMBOL_GPL(mwifiex_init_shutdown_fw); | 77 | EXPORT_SYMBOL_GPL(mwifiex_init_shutdown_fw); |
78 | 78 | ||