diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2011-10-25 10:04:12 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-11-11 05:58:48 -0500 |
commit | 334234b51453fe5def250bd60ea63b1f04a8e0d2 (patch) | |
tree | 02767138ce4b82161af2f6bb8c15d9842666caaa | |
parent | b95907a744fb2afe282cebd9b58371533818fbae (diff) |
ath6kl: Maintain firmware interface index in struct ath6kl_vif
Pass this index to target in wmi commands to specify the interface
for which the command needs to be handled.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 125 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/debug.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/main.c | 42 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/sdio.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/txrx.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 172 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.h | 63 |
10 files changed, 243 insertions, 180 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index aa40d39e5ce1..54679f22377e 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -269,9 +269,10 @@ static bool ath6kl_is_rsn_ie(const u8 *pos) | |||
269 | return pos[0] == WLAN_EID_RSN; | 269 | return pos[0] == WLAN_EID_RSN; |
270 | } | 270 | } |
271 | 271 | ||
272 | static int ath6kl_set_assoc_req_ies(struct ath6kl *ar, const u8 *ies, | 272 | static int ath6kl_set_assoc_req_ies(struct ath6kl_vif *vif, const u8 *ies, |
273 | size_t ies_len) | 273 | size_t ies_len) |
274 | { | 274 | { |
275 | struct ath6kl *ar = vif->ar; | ||
275 | const u8 *pos; | 276 | const u8 *pos; |
276 | u8 *buf = NULL; | 277 | u8 *buf = NULL; |
277 | size_t len = 0; | 278 | size_t len = 0; |
@@ -298,8 +299,8 @@ static int ath6kl_set_assoc_req_ies(struct ath6kl *ar, const u8 *ies, | |||
298 | } | 299 | } |
299 | } | 300 | } |
300 | 301 | ||
301 | ret = ath6kl_wmi_set_appie_cmd(ar->wmi, WMI_FRAME_ASSOC_REQ, | 302 | ret = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx, |
302 | buf, len); | 303 | WMI_FRAME_ASSOC_REQ, buf, len); |
303 | kfree(buf); | 304 | kfree(buf); |
304 | return ret; | 305 | return ret; |
305 | } | 306 | } |
@@ -354,7 +355,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
354 | } | 355 | } |
355 | 356 | ||
356 | if (sme->ie && (sme->ie_len > 0)) { | 357 | if (sme->ie && (sme->ie_len > 0)) { |
357 | status = ath6kl_set_assoc_req_ies(ar, sme->ie, sme->ie_len); | 358 | status = ath6kl_set_assoc_req_ies(vif, sme->ie, sme->ie_len); |
358 | if (status) | 359 | if (status) |
359 | return status; | 360 | return status; |
360 | } | 361 | } |
@@ -363,7 +364,8 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
363 | vif->ssid_len == sme->ssid_len && | 364 | vif->ssid_len == sme->ssid_len && |
364 | !memcmp(vif->ssid, sme->ssid, vif->ssid_len)) { | 365 | !memcmp(vif->ssid, sme->ssid, vif->ssid_len)) { |
365 | vif->reconnect_flag = true; | 366 | vif->reconnect_flag = true; |
366 | status = ath6kl_wmi_reconnect_cmd(ar->wmi, vif->req_bssid, | 367 | status = ath6kl_wmi_reconnect_cmd(ar->wmi, vif->fw_vif_idx, |
368 | vif->req_bssid, | ||
367 | vif->ch_hint); | 369 | vif->ch_hint); |
368 | 370 | ||
369 | up(&ar->sem); | 371 | up(&ar->sem); |
@@ -374,7 +376,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
374 | return 0; | 376 | return 0; |
375 | } else if (vif->ssid_len == sme->ssid_len && | 377 | } else if (vif->ssid_len == sme->ssid_len && |
376 | !memcmp(vif->ssid, sme->ssid, vif->ssid_len)) { | 378 | !memcmp(vif->ssid, sme->ssid, vif->ssid_len)) { |
377 | ath6kl_disconnect(ar); | 379 | ath6kl_disconnect(ar, vif->fw_vif_idx); |
378 | } | 380 | } |
379 | 381 | ||
380 | memset(vif->ssid, 0, sizeof(vif->ssid)); | 382 | memset(vif->ssid, 0, sizeof(vif->ssid)); |
@@ -425,7 +427,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
425 | key->cipher = vif->prwise_crypto; | 427 | key->cipher = vif->prwise_crypto; |
426 | vif->def_txkey_index = sme->key_idx; | 428 | vif->def_txkey_index = sme->key_idx; |
427 | 429 | ||
428 | ath6kl_wmi_addkey_cmd(ar->wmi, sme->key_idx, | 430 | ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, sme->key_idx, |
429 | vif->prwise_crypto, | 431 | vif->prwise_crypto, |
430 | GROUP_USAGE | TX_USAGE, | 432 | GROUP_USAGE | TX_USAGE, |
431 | key->key_len, | 433 | key->key_len, |
@@ -455,7 +457,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
455 | vif->grp_crypto_len, vif->ch_hint); | 457 | vif->grp_crypto_len, vif->ch_hint); |
456 | 458 | ||
457 | vif->reconnect_flag = 0; | 459 | vif->reconnect_flag = 0; |
458 | status = ath6kl_wmi_connect_cmd(ar->wmi, vif->nw_type, | 460 | status = ath6kl_wmi_connect_cmd(ar->wmi, vif->fw_vif_idx, vif->nw_type, |
459 | vif->dot11_auth_mode, vif->auth_mode, | 461 | vif->dot11_auth_mode, vif->auth_mode, |
460 | vif->prwise_crypto, | 462 | vif->prwise_crypto, |
461 | vif->prwise_crypto_len, | 463 | vif->prwise_crypto_len, |
@@ -639,7 +641,7 @@ static int ath6kl_cfg80211_disconnect(struct wiphy *wiphy, | |||
639 | } | 641 | } |
640 | 642 | ||
641 | vif->reconnect_flag = 0; | 643 | vif->reconnect_flag = 0; |
642 | ath6kl_disconnect(ar); | 644 | ath6kl_disconnect(ar, vif->fw_vif_idx); |
643 | memset(vif->ssid, 0, sizeof(vif->ssid)); | 645 | memset(vif->ssid, 0, sizeof(vif->ssid)); |
644 | vif->ssid_len = 0; | 646 | vif->ssid_len = 0; |
645 | 647 | ||
@@ -695,7 +697,7 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason, | |||
695 | */ | 697 | */ |
696 | 698 | ||
697 | if (reason != DISCONNECT_CMD) { | 699 | if (reason != DISCONNECT_CMD) { |
698 | ath6kl_wmi_disconnect_cmd(ar->wmi); | 700 | ath6kl_wmi_disconnect_cmd(ar->wmi, vif->fw_vif_idx); |
699 | return; | 701 | return; |
700 | } | 702 | } |
701 | 703 | ||
@@ -747,14 +749,15 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, | |||
747 | request->n_ssids = MAX_PROBED_SSID_INDEX - 1; | 749 | request->n_ssids = MAX_PROBED_SSID_INDEX - 1; |
748 | 750 | ||
749 | for (i = 0; i < request->n_ssids; i++) | 751 | for (i = 0; i < request->n_ssids; i++) |
750 | ath6kl_wmi_probedssid_cmd(ar->wmi, i + 1, | 752 | ath6kl_wmi_probedssid_cmd(ar->wmi, vif->fw_vif_idx, |
751 | SPECIFIC_SSID_FLAG, | 753 | i + 1, SPECIFIC_SSID_FLAG, |
752 | request->ssids[i].ssid_len, | 754 | request->ssids[i].ssid_len, |
753 | request->ssids[i].ssid); | 755 | request->ssids[i].ssid); |
754 | } | 756 | } |
755 | 757 | ||
756 | if (request->ie) { | 758 | if (request->ie) { |
757 | ret = ath6kl_wmi_set_appie_cmd(ar->wmi, WMI_FRAME_PROBE_REQ, | 759 | ret = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx, |
760 | WMI_FRAME_PROBE_REQ, | ||
758 | request->ie, request->ie_len); | 761 | request->ie, request->ie_len); |
759 | if (ret) { | 762 | if (ret) { |
760 | ath6kl_err("failed to set Probe Request appie for " | 763 | ath6kl_err("failed to set Probe Request appie for " |
@@ -788,8 +791,9 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, | |||
788 | if (test_bit(CONNECTED, &vif->flags)) | 791 | if (test_bit(CONNECTED, &vif->flags)) |
789 | force_fg_scan = 1; | 792 | force_fg_scan = 1; |
790 | 793 | ||
791 | ret = ath6kl_wmi_startscan_cmd(ar->wmi, WMI_LONG_SCAN, force_fg_scan, | 794 | ret = ath6kl_wmi_startscan_cmd(ar->wmi, vif->fw_vif_idx, WMI_LONG_SCAN, |
792 | false, 0, 0, n_channels, channels); | 795 | force_fg_scan, false, 0, 0, n_channels, |
796 | channels); | ||
793 | if (ret) | 797 | if (ret) |
794 | ath6kl_err("wmi_startscan_cmd failed\n"); | 798 | ath6kl_err("wmi_startscan_cmd failed\n"); |
795 | else | 799 | else |
@@ -820,8 +824,8 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl *ar, int status) | |||
820 | 824 | ||
821 | if (vif->scan_req->n_ssids && vif->scan_req->ssids[0].ssid_len) { | 825 | if (vif->scan_req->n_ssids && vif->scan_req->ssids[0].ssid_len) { |
822 | for (i = 0; i < vif->scan_req->n_ssids; i++) { | 826 | for (i = 0; i < vif->scan_req->n_ssids; i++) { |
823 | ath6kl_wmi_probedssid_cmd(ar->wmi, i + 1, | 827 | ath6kl_wmi_probedssid_cmd(ar->wmi, vif->fw_vif_idx, |
824 | DISABLE_SSID_FLAG, | 828 | i + 1, DISABLE_SSID_FLAG, |
825 | 0, NULL); | 829 | 0, NULL); |
826 | } | 830 | } |
827 | } | 831 | } |
@@ -942,7 +946,8 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, | |||
942 | return 0; | 946 | return 0; |
943 | } | 947 | } |
944 | 948 | ||
945 | status = ath6kl_wmi_addkey_cmd(ar->wmi, vif->def_txkey_index, | 949 | status = ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, |
950 | vif->def_txkey_index, | ||
946 | key_type, key_usage, key->key_len, | 951 | key_type, key_usage, key->key_len, |
947 | key->seq, key->key, KEY_OP_INIT_VAL, | 952 | key->seq, key->key, KEY_OP_INIT_VAL, |
948 | (u8 *) mac_addr, SYNC_BOTH_WMIFLAG); | 953 | (u8 *) mac_addr, SYNC_BOTH_WMIFLAG); |
@@ -980,7 +985,7 @@ static int ath6kl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev, | |||
980 | 985 | ||
981 | vif->keys[key_index].key_len = 0; | 986 | vif->keys[key_index].key_len = 0; |
982 | 987 | ||
983 | return ath6kl_wmi_deletekey_cmd(ar->wmi, key_index); | 988 | return ath6kl_wmi_deletekey_cmd(ar->wmi, vif->fw_vif_idx, key_index); |
984 | } | 989 | } |
985 | 990 | ||
986 | static int ath6kl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev, | 991 | static int ath6kl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev, |
@@ -1062,7 +1067,8 @@ static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy, | |||
1062 | if (vif->next_mode == AP_NETWORK && !test_bit(CONNECTED, &vif->flags)) | 1067 | if (vif->next_mode == AP_NETWORK && !test_bit(CONNECTED, &vif->flags)) |
1063 | return 0; /* Delay until AP mode has been started */ | 1068 | return 0; /* Delay until AP mode has been started */ |
1064 | 1069 | ||
1065 | status = ath6kl_wmi_addkey_cmd(ar->wmi, vif->def_txkey_index, | 1070 | status = ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, |
1071 | vif->def_txkey_index, | ||
1066 | key_type, key_usage, | 1072 | key_type, key_usage, |
1067 | key->key_len, key->seq, key->key, | 1073 | key->key_len, key->seq, key->key, |
1068 | KEY_OP_INIT_VAL, NULL, | 1074 | KEY_OP_INIT_VAL, NULL, |
@@ -1179,6 +1185,7 @@ static int ath6kl_cfg80211_set_power_mgmt(struct wiphy *wiphy, | |||
1179 | { | 1185 | { |
1180 | struct ath6kl *ar = ath6kl_priv(dev); | 1186 | struct ath6kl *ar = ath6kl_priv(dev); |
1181 | struct wmi_power_mode_cmd mode; | 1187 | struct wmi_power_mode_cmd mode; |
1188 | struct ath6kl_vif *vif = netdev_priv(dev); | ||
1182 | 1189 | ||
1183 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: pmgmt %d, timeout %d\n", | 1190 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: pmgmt %d, timeout %d\n", |
1184 | __func__, pmgmt, timeout); | 1191 | __func__, pmgmt, timeout); |
@@ -1194,7 +1201,8 @@ static int ath6kl_cfg80211_set_power_mgmt(struct wiphy *wiphy, | |||
1194 | mode.pwr_mode = MAX_PERF_POWER; | 1201 | mode.pwr_mode = MAX_PERF_POWER; |
1195 | } | 1202 | } |
1196 | 1203 | ||
1197 | if (ath6kl_wmi_powermode_cmd(ar->wmi, mode.pwr_mode) != 0) { | 1204 | if (ath6kl_wmi_powermode_cmd(ar->wmi, vif->fw_vif_idx, |
1205 | mode.pwr_mode) != 0) { | ||
1198 | ath6kl_err("wmi_powermode_cmd failed\n"); | 1206 | ath6kl_err("wmi_powermode_cmd failed\n"); |
1199 | return -EIO; | 1207 | return -EIO; |
1200 | } | 1208 | } |
@@ -1299,7 +1307,7 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy, | |||
1299 | vif->prwise_crypto_len, vif->grp_crypto, | 1307 | vif->prwise_crypto_len, vif->grp_crypto, |
1300 | vif->grp_crypto_len, vif->ch_hint); | 1308 | vif->grp_crypto_len, vif->ch_hint); |
1301 | 1309 | ||
1302 | status = ath6kl_wmi_connect_cmd(ar->wmi, vif->nw_type, | 1310 | status = ath6kl_wmi_connect_cmd(ar->wmi, vif->fw_vif_idx, vif->nw_type, |
1303 | vif->dot11_auth_mode, vif->auth_mode, | 1311 | vif->dot11_auth_mode, vif->auth_mode, |
1304 | vif->prwise_crypto, | 1312 | vif->prwise_crypto, |
1305 | vif->prwise_crypto_len, | 1313 | vif->prwise_crypto_len, |
@@ -1321,7 +1329,7 @@ static int ath6kl_cfg80211_leave_ibss(struct wiphy *wiphy, | |||
1321 | if (!ath6kl_cfg80211_ready(ar)) | 1329 | if (!ath6kl_cfg80211_ready(ar)) |
1322 | return -EIO; | 1330 | return -EIO; |
1323 | 1331 | ||
1324 | ath6kl_disconnect(ar); | 1332 | ath6kl_disconnect(ar, vif->fw_vif_idx); |
1325 | memset(vif->ssid, 0, sizeof(vif->ssid)); | 1333 | memset(vif->ssid, 0, sizeof(vif->ssid)); |
1326 | vif->ssid_len = 0; | 1334 | vif->ssid_len = 0; |
1327 | 1335 | ||
@@ -1416,7 +1424,7 @@ static int ath6kl_get_station(struct wiphy *wiphy, struct net_device *dev, | |||
1416 | 1424 | ||
1417 | set_bit(STATS_UPDATE_PEND, &vif->flags); | 1425 | set_bit(STATS_UPDATE_PEND, &vif->flags); |
1418 | 1426 | ||
1419 | ret = ath6kl_wmi_get_stats_cmd(ar->wmi); | 1427 | ret = ath6kl_wmi_get_stats_cmd(ar->wmi, vif->fw_vif_idx); |
1420 | 1428 | ||
1421 | if (ret != 0) { | 1429 | if (ret != 0) { |
1422 | up(&ar->sem); | 1430 | up(&ar->sem); |
@@ -1500,7 +1508,9 @@ static int ath6kl_set_pmksa(struct wiphy *wiphy, struct net_device *netdev, | |||
1500 | struct cfg80211_pmksa *pmksa) | 1508 | struct cfg80211_pmksa *pmksa) |
1501 | { | 1509 | { |
1502 | struct ath6kl *ar = ath6kl_priv(netdev); | 1510 | struct ath6kl *ar = ath6kl_priv(netdev); |
1503 | return ath6kl_wmi_setpmkid_cmd(ar->wmi, pmksa->bssid, | 1511 | struct ath6kl_vif *vif = netdev_priv(netdev); |
1512 | |||
1513 | return ath6kl_wmi_setpmkid_cmd(ar->wmi, vif->fw_vif_idx, pmksa->bssid, | ||
1504 | pmksa->pmkid, true); | 1514 | pmksa->pmkid, true); |
1505 | } | 1515 | } |
1506 | 1516 | ||
@@ -1508,7 +1518,9 @@ static int ath6kl_del_pmksa(struct wiphy *wiphy, struct net_device *netdev, | |||
1508 | struct cfg80211_pmksa *pmksa) | 1518 | struct cfg80211_pmksa *pmksa) |
1509 | { | 1519 | { |
1510 | struct ath6kl *ar = ath6kl_priv(netdev); | 1520 | struct ath6kl *ar = ath6kl_priv(netdev); |
1511 | return ath6kl_wmi_setpmkid_cmd(ar->wmi, pmksa->bssid, | 1521 | struct ath6kl_vif *vif = netdev_priv(netdev); |
1522 | |||
1523 | return ath6kl_wmi_setpmkid_cmd(ar->wmi, vif->fw_vif_idx, pmksa->bssid, | ||
1512 | pmksa->pmkid, false); | 1524 | pmksa->pmkid, false); |
1513 | } | 1525 | } |
1514 | 1526 | ||
@@ -1518,8 +1530,8 @@ static int ath6kl_flush_pmksa(struct wiphy *wiphy, struct net_device *netdev) | |||
1518 | struct ath6kl_vif *vif = netdev_priv(netdev); | 1530 | struct ath6kl_vif *vif = netdev_priv(netdev); |
1519 | 1531 | ||
1520 | if (test_bit(CONNECTED, &vif->flags)) | 1532 | if (test_bit(CONNECTED, &vif->flags)) |
1521 | return ath6kl_wmi_setpmkid_cmd(ar->wmi, vif->bssid, | 1533 | return ath6kl_wmi_setpmkid_cmd(ar->wmi, vif->fw_vif_idx, |
1522 | NULL, false); | 1534 | vif->bssid, NULL, false); |
1523 | return 0; | 1535 | return 0; |
1524 | } | 1536 | } |
1525 | 1537 | ||
@@ -1564,9 +1576,10 @@ static bool ath6kl_is_p2p_ie(const u8 *pos) | |||
1564 | pos[4] == 0x9a && pos[5] == 0x09; | 1576 | pos[4] == 0x9a && pos[5] == 0x09; |
1565 | } | 1577 | } |
1566 | 1578 | ||
1567 | static int ath6kl_set_ap_probe_resp_ies(struct ath6kl *ar, const u8 *ies, | 1579 | static int ath6kl_set_ap_probe_resp_ies(struct ath6kl_vif *vif, |
1568 | size_t ies_len) | 1580 | const u8 *ies, size_t ies_len) |
1569 | { | 1581 | { |
1582 | struct ath6kl *ar = vif->ar; | ||
1570 | const u8 *pos; | 1583 | const u8 *pos; |
1571 | u8 *buf = NULL; | 1584 | u8 *buf = NULL; |
1572 | size_t len = 0; | 1585 | size_t len = 0; |
@@ -1593,8 +1606,8 @@ static int ath6kl_set_ap_probe_resp_ies(struct ath6kl *ar, const u8 *ies, | |||
1593 | } | 1606 | } |
1594 | } | 1607 | } |
1595 | 1608 | ||
1596 | ret = ath6kl_wmi_set_appie_cmd(ar->wmi, WMI_FRAME_PROBE_RESP, | 1609 | ret = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx, |
1597 | buf, len); | 1610 | WMI_FRAME_PROBE_RESP, buf, len); |
1598 | kfree(buf); | 1611 | kfree(buf); |
1599 | return ret; | 1612 | return ret; |
1600 | } | 1613 | } |
@@ -1620,20 +1633,22 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev, | |||
1620 | return -EOPNOTSUPP; | 1633 | return -EOPNOTSUPP; |
1621 | 1634 | ||
1622 | if (info->beacon_ies) { | 1635 | if (info->beacon_ies) { |
1623 | res = ath6kl_wmi_set_appie_cmd(ar->wmi, WMI_FRAME_BEACON, | 1636 | res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx, |
1637 | WMI_FRAME_BEACON, | ||
1624 | info->beacon_ies, | 1638 | info->beacon_ies, |
1625 | info->beacon_ies_len); | 1639 | info->beacon_ies_len); |
1626 | if (res) | 1640 | if (res) |
1627 | return res; | 1641 | return res; |
1628 | } | 1642 | } |
1629 | if (info->proberesp_ies) { | 1643 | if (info->proberesp_ies) { |
1630 | res = ath6kl_set_ap_probe_resp_ies(ar, info->proberesp_ies, | 1644 | res = ath6kl_set_ap_probe_resp_ies(vif, info->proberesp_ies, |
1631 | info->proberesp_ies_len); | 1645 | info->proberesp_ies_len); |
1632 | if (res) | 1646 | if (res) |
1633 | return res; | 1647 | return res; |
1634 | } | 1648 | } |
1635 | if (info->assocresp_ies) { | 1649 | if (info->assocresp_ies) { |
1636 | res = ath6kl_wmi_set_appie_cmd(ar->wmi, WMI_FRAME_ASSOC_RESP, | 1650 | res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx, |
1651 | WMI_FRAME_ASSOC_RESP, | ||
1637 | info->assocresp_ies, | 1652 | info->assocresp_ies, |
1638 | info->assocresp_ies_len); | 1653 | info->assocresp_ies_len); |
1639 | if (res) | 1654 | if (res) |
@@ -1734,7 +1749,7 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev, | |||
1734 | p.dot11_auth_mode = vif->dot11_auth_mode; | 1749 | p.dot11_auth_mode = vif->dot11_auth_mode; |
1735 | p.ch = cpu_to_le16(vif->next_chan); | 1750 | p.ch = cpu_to_le16(vif->next_chan); |
1736 | 1751 | ||
1737 | res = ath6kl_wmi_ap_profile_commit(ar->wmi, &p); | 1752 | res = ath6kl_wmi_ap_profile_commit(ar->wmi, vif->fw_vif_idx, &p); |
1738 | if (res < 0) | 1753 | if (res < 0) |
1739 | return res; | 1754 | return res; |
1740 | 1755 | ||
@@ -1763,7 +1778,7 @@ static int ath6kl_del_beacon(struct wiphy *wiphy, struct net_device *dev) | |||
1763 | if (!test_bit(CONNECTED, &vif->flags)) | 1778 | if (!test_bit(CONNECTED, &vif->flags)) |
1764 | return -ENOTCONN; | 1779 | return -ENOTCONN; |
1765 | 1780 | ||
1766 | ath6kl_wmi_disconnect_cmd(ar->wmi); | 1781 | ath6kl_wmi_disconnect_cmd(ar->wmi, vif->fw_vif_idx); |
1767 | clear_bit(CONNECTED, &vif->flags); | 1782 | clear_bit(CONNECTED, &vif->flags); |
1768 | 1783 | ||
1769 | return 0; | 1784 | return 0; |
@@ -1783,10 +1798,10 @@ static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev, | |||
1783 | return -EOPNOTSUPP; | 1798 | return -EOPNOTSUPP; |
1784 | 1799 | ||
1785 | if (params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED)) | 1800 | if (params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED)) |
1786 | return ath6kl_wmi_ap_set_mlme(ar->wmi, WMI_AP_MLME_AUTHORIZE, | 1801 | return ath6kl_wmi_ap_set_mlme(ar->wmi, vif->fw_vif_idx, |
1787 | mac, 0); | 1802 | WMI_AP_MLME_AUTHORIZE, mac, 0); |
1788 | return ath6kl_wmi_ap_set_mlme(ar->wmi, WMI_AP_MLME_UNAUTHORIZE, mac, | 1803 | return ath6kl_wmi_ap_set_mlme(ar->wmi, vif->fw_vif_idx, |
1789 | 0); | 1804 | WMI_AP_MLME_UNAUTHORIZE, mac, 0); |
1790 | } | 1805 | } |
1791 | 1806 | ||
1792 | static int ath6kl_remain_on_channel(struct wiphy *wiphy, | 1807 | static int ath6kl_remain_on_channel(struct wiphy *wiphy, |
@@ -1797,13 +1812,14 @@ static int ath6kl_remain_on_channel(struct wiphy *wiphy, | |||
1797 | u64 *cookie) | 1812 | u64 *cookie) |
1798 | { | 1813 | { |
1799 | struct ath6kl *ar = ath6kl_priv(dev); | 1814 | struct ath6kl *ar = ath6kl_priv(dev); |
1815 | struct ath6kl_vif *vif = netdev_priv(dev); | ||
1800 | 1816 | ||
1801 | /* TODO: if already pending or ongoing remain-on-channel, | 1817 | /* TODO: if already pending or ongoing remain-on-channel, |
1802 | * return -EBUSY */ | 1818 | * return -EBUSY */ |
1803 | *cookie = 1; /* only a single pending request is supported */ | 1819 | *cookie = 1; /* only a single pending request is supported */ |
1804 | 1820 | ||
1805 | return ath6kl_wmi_remain_on_chnl_cmd(ar->wmi, chan->center_freq, | 1821 | return ath6kl_wmi_remain_on_chnl_cmd(ar->wmi, vif->fw_vif_idx, |
1806 | duration); | 1822 | chan->center_freq, duration); |
1807 | } | 1823 | } |
1808 | 1824 | ||
1809 | static int ath6kl_cancel_remain_on_channel(struct wiphy *wiphy, | 1825 | static int ath6kl_cancel_remain_on_channel(struct wiphy *wiphy, |
@@ -1811,16 +1827,19 @@ static int ath6kl_cancel_remain_on_channel(struct wiphy *wiphy, | |||
1811 | u64 cookie) | 1827 | u64 cookie) |
1812 | { | 1828 | { |
1813 | struct ath6kl *ar = ath6kl_priv(dev); | 1829 | struct ath6kl *ar = ath6kl_priv(dev); |
1830 | struct ath6kl_vif *vif = netdev_priv(dev); | ||
1814 | 1831 | ||
1815 | if (cookie != 1) | 1832 | if (cookie != 1) |
1816 | return -ENOENT; | 1833 | return -ENOENT; |
1817 | 1834 | ||
1818 | return ath6kl_wmi_cancel_remain_on_chnl_cmd(ar->wmi); | 1835 | return ath6kl_wmi_cancel_remain_on_chnl_cmd(ar->wmi, vif->fw_vif_idx); |
1819 | } | 1836 | } |
1820 | 1837 | ||
1821 | static int ath6kl_send_go_probe_resp(struct ath6kl *ar, const u8 *buf, | 1838 | static int ath6kl_send_go_probe_resp(struct ath6kl_vif *vif, |
1822 | size_t len, unsigned int freq) | 1839 | const u8 *buf, size_t len, |
1840 | unsigned int freq) | ||
1823 | { | 1841 | { |
1842 | struct ath6kl *ar = vif->ar; | ||
1824 | const u8 *pos; | 1843 | const u8 *pos; |
1825 | u8 *p2p; | 1844 | u8 *p2p; |
1826 | int p2p_len; | 1845 | int p2p_len; |
@@ -1847,8 +1866,8 @@ static int ath6kl_send_go_probe_resp(struct ath6kl *ar, const u8 *buf, | |||
1847 | pos += 2 + pos[1]; | 1866 | pos += 2 + pos[1]; |
1848 | } | 1867 | } |
1849 | 1868 | ||
1850 | ret = ath6kl_wmi_send_probe_response_cmd(ar->wmi, freq, mgmt->da, | 1869 | ret = ath6kl_wmi_send_probe_response_cmd(ar->wmi, vif->fw_vif_idx, freq, |
1851 | p2p, p2p_len); | 1870 | mgmt->da, p2p, p2p_len); |
1852 | kfree(p2p); | 1871 | kfree(p2p); |
1853 | return ret; | 1872 | return ret; |
1854 | } | 1873 | } |
@@ -1874,7 +1893,7 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | |||
1874 | * command to allow the target to fill in the generic IEs. | 1893 | * command to allow the target to fill in the generic IEs. |
1875 | */ | 1894 | */ |
1876 | *cookie = 0; /* TX status not supported */ | 1895 | *cookie = 0; /* TX status not supported */ |
1877 | return ath6kl_send_go_probe_resp(ar, buf, len, | 1896 | return ath6kl_send_go_probe_resp(vif, buf, len, |
1878 | chan->center_freq); | 1897 | chan->center_freq); |
1879 | } | 1898 | } |
1880 | 1899 | ||
@@ -1888,7 +1907,8 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | |||
1888 | } | 1907 | } |
1889 | 1908 | ||
1890 | *cookie = id; | 1909 | *cookie = id; |
1891 | return ath6kl_wmi_send_action_cmd(ar->wmi, id, chan->center_freq, wait, | 1910 | return ath6kl_wmi_send_action_cmd(ar->wmi, vif->fw_vif_idx, id, |
1911 | chan->center_freq, wait, | ||
1892 | buf, len); | 1912 | buf, len); |
1893 | } | 1913 | } |
1894 | 1914 | ||
@@ -2093,7 +2113,7 @@ void ath6kl_deinit_if_data(struct ath6kl_vif *vif) | |||
2093 | } | 2113 | } |
2094 | 2114 | ||
2095 | struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name, | 2115 | struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name, |
2096 | enum nl80211_iftype type) | 2116 | enum nl80211_iftype type, u8 fw_vif_idx) |
2097 | { | 2117 | { |
2098 | struct net_device *ndev; | 2118 | struct net_device *ndev; |
2099 | struct ath6kl_vif *vif; | 2119 | struct ath6kl_vif *vif; |
@@ -2111,6 +2131,7 @@ struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name, | |||
2111 | SET_NETDEV_DEV(ndev, wiphy_dev(vif->wdev.wiphy)); | 2131 | SET_NETDEV_DEV(ndev, wiphy_dev(vif->wdev.wiphy)); |
2112 | vif->wdev.netdev = ndev; | 2132 | vif->wdev.netdev = ndev; |
2113 | vif->wdev.iftype = type; | 2133 | vif->wdev.iftype = type; |
2134 | vif->fw_vif_idx = fw_vif_idx; | ||
2114 | ar->wdev = &vif->wdev; | 2135 | ar->wdev = &vif->wdev; |
2115 | ar->net_dev = ndev; | 2136 | ar->net_dev = ndev; |
2116 | 2137 | ||
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.h b/drivers/net/wireless/ath/ath6kl/cfg80211.h index 5daf6859d691..033e7423a2bd 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.h +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.h | |||
@@ -18,7 +18,8 @@ | |||
18 | #define ATH6KL_CFG80211_H | 18 | #define ATH6KL_CFG80211_H |
19 | 19 | ||
20 | struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name, | 20 | struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name, |
21 | enum nl80211_iftype type); | 21 | enum nl80211_iftype type, |
22 | u8 fw_vif_idx); | ||
22 | int ath6kl_register_ieee80211_hw(struct ath6kl *ar); | 23 | int ath6kl_register_ieee80211_hw(struct ath6kl *ar); |
23 | struct ath6kl *ath6kl_core_alloc(struct device *dev); | 24 | struct ath6kl *ath6kl_core_alloc(struct device *dev); |
24 | void ath6kl_deinit_ieee80211_hw(struct ath6kl *ar); | 25 | void ath6kl_deinit_ieee80211_hw(struct ath6kl *ar); |
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 41d6ae0ee225..f21d7776d748 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
@@ -380,6 +380,8 @@ struct ath6kl_req_key { | |||
380 | u8 key_len; | 380 | u8 key_len; |
381 | }; | 381 | }; |
382 | 382 | ||
383 | #define MAX_NUM_VIF 1 | ||
384 | |||
383 | /* vif flags info */ | 385 | /* vif flags info */ |
384 | enum ath6kl_vif_state { | 386 | enum ath6kl_vif_state { |
385 | CONNECTED, | 387 | CONNECTED, |
@@ -398,6 +400,7 @@ struct ath6kl_vif { | |||
398 | struct wireless_dev wdev; | 400 | struct wireless_dev wdev; |
399 | struct net_device *ndev; | 401 | struct net_device *ndev; |
400 | struct ath6kl *ar; | 402 | struct ath6kl *ar; |
403 | u8 fw_vif_idx; | ||
401 | unsigned long flags; | 404 | unsigned long flags; |
402 | int ssid_len; | 405 | int ssid_len; |
403 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 406 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
@@ -647,7 +650,7 @@ enum htc_endpoint_id ath6kl_ac2_endpoint_id(void *devt, u8 ac); | |||
647 | void ath6kl_pspoll_event(struct ath6kl *ar, u8 aid); | 650 | void ath6kl_pspoll_event(struct ath6kl *ar, u8 aid); |
648 | 651 | ||
649 | void ath6kl_dtimexpiry_event(struct ath6kl *ar); | 652 | void ath6kl_dtimexpiry_event(struct ath6kl *ar); |
650 | void ath6kl_disconnect(struct ath6kl *ar); | 653 | void ath6kl_disconnect(struct ath6kl *ar, u8 if_idx); |
651 | void ath6kl_deep_sleep_enable(struct ath6kl *ar); | 654 | void ath6kl_deep_sleep_enable(struct ath6kl *ar); |
652 | void aggr_recv_delba_req_evt(struct ath6kl *ar, u8 tid); | 655 | void aggr_recv_delba_req_evt(struct ath6kl *ar, u8 tid); |
653 | void aggr_recv_addba_req_evt(struct ath6kl *ar, u8 tid, u16 seq_no, | 656 | void aggr_recv_addba_req_evt(struct ath6kl *ar, u8 tid, u16 seq_no, |
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c index 9a89b42a7f43..870e9b1b1f43 100644 --- a/drivers/net/wireless/ath/ath6kl/debug.c +++ b/drivers/net/wireless/ath/ath6kl/debug.c | |||
@@ -417,7 +417,7 @@ static ssize_t read_file_tgt_stats(struct file *file, char __user *user_buf, | |||
417 | 417 | ||
418 | set_bit(STATS_UPDATE_PEND, &vif->flags); | 418 | set_bit(STATS_UPDATE_PEND, &vif->flags); |
419 | 419 | ||
420 | if (ath6kl_wmi_get_stats_cmd(ar->wmi)) { | 420 | if (ath6kl_wmi_get_stats_cmd(ar->wmi, 0)) { |
421 | up(&ar->sem); | 421 | up(&ar->sem); |
422 | kfree(buf); | 422 | kfree(buf); |
423 | return -EIO; | 423 | return -EIO; |
@@ -1477,7 +1477,7 @@ static ssize_t ath6kl_bgscan_int_write(struct file *file, | |||
1477 | if (bgscan_int == 0) | 1477 | if (bgscan_int == 0) |
1478 | bgscan_int = 0xffff; | 1478 | bgscan_int = 0xffff; |
1479 | 1479 | ||
1480 | ath6kl_wmi_scanparams_cmd(ar->wmi, 0, 0, bgscan_int, 0, 0, 0, 3, | 1480 | ath6kl_wmi_scanparams_cmd(ar->wmi, 0, 0, 0, bgscan_int, 0, 0, 0, 3, |
1481 | 0, 0, 0); | 1481 | 0, 0, 0); |
1482 | 1482 | ||
1483 | return count; | 1483 | return count; |
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index dd63408abb58..957bfb0c3ce7 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c | |||
@@ -1407,7 +1407,7 @@ static int ath6kl_init(struct ath6kl *ar) | |||
1407 | } | 1407 | } |
1408 | 1408 | ||
1409 | /* Add an initial station interface */ | 1409 | /* Add an initial station interface */ |
1410 | ndev = ath6kl_interface_add(ar, "wlan%d", NL80211_IFTYPE_STATION); | 1410 | ndev = ath6kl_interface_add(ar, "wlan%d", NL80211_IFTYPE_STATION, 0); |
1411 | if (!ndev) { | 1411 | if (!ndev) { |
1412 | ath6kl_err("Failed to instantiate a network device\n"); | 1412 | ath6kl_err("Failed to instantiate a network device\n"); |
1413 | status = -ENOMEM; | 1413 | status = -ENOMEM; |
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index fff1f4a57c17..992990192cd9 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c | |||
@@ -441,7 +441,7 @@ void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile, | |||
441 | if (test_bit(WMI_READY, &ar->flag)) { | 441 | if (test_bit(WMI_READY, &ar->flag)) { |
442 | discon_issued = (test_bit(CONNECTED, &vif->flags) || | 442 | discon_issued = (test_bit(CONNECTED, &vif->flags) || |
443 | test_bit(CONNECT_PEND, &vif->flags)); | 443 | test_bit(CONNECT_PEND, &vif->flags)); |
444 | ath6kl_disconnect(ar); | 444 | ath6kl_disconnect(ar, vif->fw_vif_idx); |
445 | if (!keep_profile) | 445 | if (!keep_profile) |
446 | ath6kl_init_profile_info(ar); | 446 | ath6kl_init_profile_info(ar); |
447 | 447 | ||
@@ -511,7 +511,7 @@ static void ath6kl_install_static_wep_keys(struct ath6kl *ar) | |||
511 | if (index == vif->def_txkey_index) | 511 | if (index == vif->def_txkey_index) |
512 | keyusage |= TX_USAGE; | 512 | keyusage |= TX_USAGE; |
513 | 513 | ||
514 | ath6kl_wmi_addkey_cmd(ar->wmi, | 514 | ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, |
515 | index, | 515 | index, |
516 | WEP_CRYPT, | 516 | WEP_CRYPT, |
517 | keyusage, | 517 | keyusage, |
@@ -551,7 +551,7 @@ void ath6kl_connect_ap_mode_bss(struct ath6kl *ar, u16 channel) | |||
551 | "the initial group key for AP mode\n"); | 551 | "the initial group key for AP mode\n"); |
552 | memset(key_rsc, 0, sizeof(key_rsc)); | 552 | memset(key_rsc, 0, sizeof(key_rsc)); |
553 | res = ath6kl_wmi_addkey_cmd( | 553 | res = ath6kl_wmi_addkey_cmd( |
554 | ar->wmi, ik->key_index, ik->key_type, | 554 | ar->wmi, vif->fw_vif_idx, ik->key_index, ik->key_type, |
555 | GROUP_USAGE, ik->key_len, key_rsc, ik->key, | 555 | GROUP_USAGE, ik->key_len, key_rsc, ik->key, |
556 | KEY_OP_INIT_VAL, NULL, SYNC_BOTH_WMIFLAG); | 556 | KEY_OP_INIT_VAL, NULL, SYNC_BOTH_WMIFLAG); |
557 | if (res) { | 557 | if (res) { |
@@ -913,20 +913,20 @@ void ath6k_credit_distribute(struct htc_credit_state_info *cred_info, | |||
913 | void disconnect_timer_handler(unsigned long ptr) | 913 | void disconnect_timer_handler(unsigned long ptr) |
914 | { | 914 | { |
915 | struct net_device *dev = (struct net_device *)ptr; | 915 | struct net_device *dev = (struct net_device *)ptr; |
916 | struct ath6kl *ar = ath6kl_priv(dev); | 916 | struct ath6kl_vif *vif = netdev_priv(dev); |
917 | 917 | ||
918 | ath6kl_init_profile_info(ar); | 918 | ath6kl_init_profile_info(vif->ar); |
919 | ath6kl_disconnect(ar); | 919 | ath6kl_disconnect(vif->ar, vif->fw_vif_idx); |
920 | } | 920 | } |
921 | 921 | ||
922 | void ath6kl_disconnect(struct ath6kl *ar) | 922 | void ath6kl_disconnect(struct ath6kl *ar, u8 if_idx) |
923 | { | 923 | { |
924 | /* TODO: Pass vif instead of taking it from ar */ | 924 | /* TODO: Pass vif instead of taking it from ar */ |
925 | struct ath6kl_vif *vif = ar->vif; | 925 | struct ath6kl_vif *vif = ar->vif; |
926 | 926 | ||
927 | if (test_bit(CONNECTED, &vif->flags) || | 927 | if (test_bit(CONNECTED, &vif->flags) || |
928 | test_bit(CONNECT_PEND, &vif->flags)) { | 928 | test_bit(CONNECT_PEND, &vif->flags)) { |
929 | ath6kl_wmi_disconnect_cmd(ar->wmi); | 929 | ath6kl_wmi_disconnect_cmd(ar->wmi, if_idx); |
930 | /* | 930 | /* |
931 | * Disconnect command is issued, clear the connect pending | 931 | * Disconnect command is issued, clear the connect pending |
932 | * flag. The connected flag will be cleared in | 932 | * flag. The connected flag will be cleared in |
@@ -961,13 +961,13 @@ void ath6kl_deep_sleep_enable(struct ath6kl *ar) | |||
961 | 961 | ||
962 | if (test_bit(CONNECTED, &vif->flags) || | 962 | if (test_bit(CONNECTED, &vif->flags) || |
963 | test_bit(CONNECT_PEND, &vif->flags)) | 963 | test_bit(CONNECT_PEND, &vif->flags)) |
964 | ath6kl_wmi_disconnect_cmd(ar->wmi); | 964 | ath6kl_wmi_disconnect_cmd(ar->wmi, vif->fw_vif_idx); |
965 | 965 | ||
966 | vif->sme_state = SME_DISCONNECTED; | 966 | vif->sme_state = SME_DISCONNECTED; |
967 | 967 | ||
968 | /* disable scanning */ | 968 | /* disable scanning */ |
969 | if (ath6kl_wmi_scanparams_cmd(ar->wmi, 0xFFFF, 0, 0, 0, 0, 0, 0, 0, | 969 | if (ath6kl_wmi_scanparams_cmd(ar->wmi, vif->fw_vif_idx, 0xFFFF, 0, 0, |
970 | 0, 0) != 0) | 970 | 0, 0, 0, 0, 0, 0, 0) != 0) |
971 | printk(KERN_WARNING "ath6kl: failed to disable scan " | 971 | printk(KERN_WARNING "ath6kl: failed to disable scan " |
972 | "during suspend\n"); | 972 | "during suspend\n"); |
973 | 973 | ||
@@ -976,7 +976,7 @@ void ath6kl_deep_sleep_enable(struct ath6kl *ar) | |||
976 | /* save the current power mode before enabling power save */ | 976 | /* save the current power mode before enabling power save */ |
977 | ar->wmi->saved_pwr_mode = ar->wmi->pwr_mode; | 977 | ar->wmi->saved_pwr_mode = ar->wmi->pwr_mode; |
978 | 978 | ||
979 | if (ath6kl_wmi_powermode_cmd(ar->wmi, REC_POWER) != 0) | 979 | if (ath6kl_wmi_powermode_cmd(ar->wmi, 0, REC_POWER) != 0) |
980 | ath6kl_warn("ath6kl_deep_sleep_enable: " | 980 | ath6kl_warn("ath6kl_deep_sleep_enable: " |
981 | "wmi_powermode_cmd failed\n"); | 981 | "wmi_powermode_cmd failed\n"); |
982 | } | 982 | } |
@@ -1061,7 +1061,8 @@ void ath6kl_connect_event(struct ath6kl *ar, u16 channel, u8 *bssid, | |||
1061 | vif->bss_ch = channel; | 1061 | vif->bss_ch = channel; |
1062 | 1062 | ||
1063 | if ((vif->nw_type == INFRA_NETWORK)) | 1063 | if ((vif->nw_type == INFRA_NETWORK)) |
1064 | ath6kl_wmi_listeninterval_cmd(ar->wmi, ar->listen_intvl_t, | 1064 | ath6kl_wmi_listeninterval_cmd(ar->wmi, vif->fw_vif_idx, |
1065 | ar->listen_intvl_t, | ||
1065 | ar->listen_intvl_b); | 1066 | ar->listen_intvl_b); |
1066 | 1067 | ||
1067 | netif_wake_queue(ar->net_dev); | 1068 | netif_wake_queue(ar->net_dev); |
@@ -1280,6 +1281,8 @@ void ath6kl_pspoll_event(struct ath6kl *ar, u8 aid) | |||
1280 | struct ath6kl_sta *conn; | 1281 | struct ath6kl_sta *conn; |
1281 | struct sk_buff *skb; | 1282 | struct sk_buff *skb; |
1282 | bool psq_empty = false; | 1283 | bool psq_empty = false; |
1284 | /* TODO: Pass vif instead of taking it from ar */ | ||
1285 | struct ath6kl_vif *vif = ar->vif; | ||
1283 | 1286 | ||
1284 | conn = ath6kl_find_sta_by_aid(ar, aid); | 1287 | conn = ath6kl_find_sta_by_aid(ar, aid); |
1285 | 1288 | ||
@@ -1310,7 +1313,7 @@ void ath6kl_pspoll_event(struct ath6kl *ar, u8 aid) | |||
1310 | spin_unlock_bh(&conn->psq_lock); | 1313 | spin_unlock_bh(&conn->psq_lock); |
1311 | 1314 | ||
1312 | if (psq_empty) | 1315 | if (psq_empty) |
1313 | ath6kl_wmi_set_pvb_cmd(ar->wmi, conn->aid, 0); | 1316 | ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, conn->aid, 0); |
1314 | } | 1317 | } |
1315 | 1318 | ||
1316 | void ath6kl_dtimexpiry_event(struct ath6kl *ar) | 1319 | void ath6kl_dtimexpiry_event(struct ath6kl *ar) |
@@ -1355,7 +1358,7 @@ void ath6kl_dtimexpiry_event(struct ath6kl *ar) | |||
1355 | clear_bit(DTIM_EXPIRED, &vif->flags); | 1358 | clear_bit(DTIM_EXPIRED, &vif->flags); |
1356 | 1359 | ||
1357 | /* clear the LSB of the BitMapCtl field of the TIM IE */ | 1360 | /* clear the LSB of the BitMapCtl field of the TIM IE */ |
1358 | ath6kl_wmi_set_pvb_cmd(ar->wmi, MCAST_AID, 0); | 1361 | ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, MCAST_AID, 0); |
1359 | } | 1362 | } |
1360 | 1363 | ||
1361 | void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid, | 1364 | void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid, |
@@ -1377,7 +1380,8 @@ void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid, | |||
1377 | 1380 | ||
1378 | /* clear the LSB of the TIM IE's BitMapCtl field */ | 1381 | /* clear the LSB of the TIM IE's BitMapCtl field */ |
1379 | if (test_bit(WMI_READY, &ar->flag)) | 1382 | if (test_bit(WMI_READY, &ar->flag)) |
1380 | ath6kl_wmi_set_pvb_cmd(ar->wmi, MCAST_AID, 0); | 1383 | ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, |
1384 | MCAST_AID, 0); | ||
1381 | } | 1385 | } |
1382 | 1386 | ||
1383 | if (!is_broadcast_ether_addr(bssid)) { | 1387 | if (!is_broadcast_ether_addr(bssid)) { |
@@ -1468,11 +1472,11 @@ static int ath6kl_close(struct net_device *dev) | |||
1468 | 1472 | ||
1469 | netif_stop_queue(dev); | 1473 | netif_stop_queue(dev); |
1470 | 1474 | ||
1471 | ath6kl_disconnect(ar); | 1475 | ath6kl_disconnect(ar, vif->fw_vif_idx); |
1472 | 1476 | ||
1473 | if (test_bit(WMI_READY, &ar->flag)) { | 1477 | if (test_bit(WMI_READY, &ar->flag)) { |
1474 | if (ath6kl_wmi_scanparams_cmd(ar->wmi, 0xFFFF, 0, 0, 0, 0, 0, 0, | 1478 | if (ath6kl_wmi_scanparams_cmd(ar->wmi, vif->fw_vif_idx, 0xFFFF, |
1475 | 0, 0, 0)) | 1479 | 0, 0, 0, 0, 0, 0, 0, 0, 0)) |
1476 | return -EIO; | 1480 | return -EIO; |
1477 | 1481 | ||
1478 | clear_bit(WLAN_ENABLED, &vif->flags); | 1482 | clear_bit(WLAN_ENABLED, &vif->flags); |
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index 4e43878cf919..f73e14f75aee 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c | |||
@@ -747,7 +747,7 @@ static int ath6kl_sdio_suspend(struct ath6kl *ar) | |||
747 | static int ath6kl_sdio_resume(struct ath6kl *ar) | 747 | static int ath6kl_sdio_resume(struct ath6kl *ar) |
748 | { | 748 | { |
749 | if (ar->wmi->pwr_mode != ar->wmi->saved_pwr_mode) { | 749 | if (ar->wmi->pwr_mode != ar->wmi->saved_pwr_mode) { |
750 | if (ath6kl_wmi_powermode_cmd(ar->wmi, | 750 | if (ath6kl_wmi_powermode_cmd(ar->wmi, 0, |
751 | ar->wmi->saved_pwr_mode) != 0) | 751 | ar->wmi->saved_pwr_mode) != 0) |
752 | ath6kl_warn("ath6kl_sdio_resume: " | 752 | ath6kl_warn("ath6kl_sdio_resume: " |
753 | "wmi_powermode_cmd failed\n"); | 753 | "wmi_powermode_cmd failed\n"); |
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index cada1977f430..c54f1a9989fa 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c | |||
@@ -118,6 +118,7 @@ static bool ath6kl_powersave_ap(struct ath6kl *ar, struct sk_buff *skb, | |||
118 | */ | 118 | */ |
119 | if (is_mcastq_empty) | 119 | if (is_mcastq_empty) |
120 | ath6kl_wmi_set_pvb_cmd(ar->wmi, | 120 | ath6kl_wmi_set_pvb_cmd(ar->wmi, |
121 | vif->fw_vif_idx, | ||
121 | MCAST_AID, 1); | 122 | MCAST_AID, 1); |
122 | 123 | ||
123 | ps_queued = true; | 124 | ps_queued = true; |
@@ -156,6 +157,7 @@ static bool ath6kl_powersave_ap(struct ath6kl *ar, struct sk_buff *skb, | |||
156 | */ | 157 | */ |
157 | if (is_psq_empty) | 158 | if (is_psq_empty) |
158 | ath6kl_wmi_set_pvb_cmd(ar->wmi, | 159 | ath6kl_wmi_set_pvb_cmd(ar->wmi, |
160 | vif->fw_vif_idx, | ||
159 | conn->aid, 1); | 161 | conn->aid, 1); |
160 | 162 | ||
161 | ps_queued = true; | 163 | ps_queued = true; |
@@ -1176,7 +1178,8 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1176 | } | 1178 | } |
1177 | spin_unlock_bh(&conn->psq_lock); | 1179 | spin_unlock_bh(&conn->psq_lock); |
1178 | /* Clear the PVB for this STA */ | 1180 | /* Clear the PVB for this STA */ |
1179 | ath6kl_wmi_set_pvb_cmd(ar->wmi, conn->aid, 0); | 1181 | ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, |
1182 | conn->aid, 0); | ||
1180 | } | 1183 | } |
1181 | } | 1184 | } |
1182 | 1185 | ||
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 8e7e7b58bf13..a4ad7cbd5eb0 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -627,7 +627,8 @@ static inline struct sk_buff *ath6kl_wmi_get_new_buf(u32 size) | |||
627 | } | 627 | } |
628 | 628 | ||
629 | /* Send a "simple" wmi command -- one with no arguments */ | 629 | /* Send a "simple" wmi command -- one with no arguments */ |
630 | static int ath6kl_wmi_simple_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id) | 630 | static int ath6kl_wmi_simple_cmd(struct wmi *wmi, u8 if_idx, |
631 | enum wmi_cmd_id cmd_id) | ||
631 | { | 632 | { |
632 | struct sk_buff *skb; | 633 | struct sk_buff *skb; |
633 | int ret; | 634 | int ret; |
@@ -636,7 +637,7 @@ static int ath6kl_wmi_simple_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id) | |||
636 | if (!skb) | 637 | if (!skb) |
637 | return -ENOMEM; | 638 | return -ENOMEM; |
638 | 639 | ||
639 | ret = ath6kl_wmi_cmd_send(wmi, skb, cmd_id, NO_SYNC_WMIFLAG); | 640 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, cmd_id, NO_SYNC_WMIFLAG); |
640 | 641 | ||
641 | return ret; | 642 | return ret; |
642 | } | 643 | } |
@@ -679,7 +680,8 @@ int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi) | |||
679 | cmd->info.params.roam_rssi_floor = DEF_LRSSI_ROAM_FLOOR; | 680 | cmd->info.params.roam_rssi_floor = DEF_LRSSI_ROAM_FLOOR; |
680 | cmd->roam_ctrl = WMI_SET_LRSSI_SCAN_PARAMS; | 681 | cmd->roam_ctrl = WMI_SET_LRSSI_SCAN_PARAMS; |
681 | 682 | ||
682 | ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_ROAM_CTRL_CMDID, NO_SYNC_WMIFLAG); | 683 | ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_ROAM_CTRL_CMDID, |
684 | NO_SYNC_WMIFLAG); | ||
683 | 685 | ||
684 | return 0; | 686 | return 0; |
685 | } | 687 | } |
@@ -700,7 +702,7 @@ int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid) | |||
700 | cmd->roam_ctrl = WMI_FORCE_ROAM; | 702 | cmd->roam_ctrl = WMI_FORCE_ROAM; |
701 | 703 | ||
702 | ath6kl_dbg(ATH6KL_DBG_WMI, "force roam to %pM\n", bssid); | 704 | ath6kl_dbg(ATH6KL_DBG_WMI, "force roam to %pM\n", bssid); |
703 | return ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_ROAM_CTRL_CMDID, | 705 | return ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_ROAM_CTRL_CMDID, |
704 | NO_SYNC_WMIFLAG); | 706 | NO_SYNC_WMIFLAG); |
705 | } | 707 | } |
706 | 708 | ||
@@ -720,7 +722,7 @@ int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode) | |||
720 | cmd->roam_ctrl = WMI_SET_ROAM_MODE; | 722 | cmd->roam_ctrl = WMI_SET_ROAM_MODE; |
721 | 723 | ||
722 | ath6kl_dbg(ATH6KL_DBG_WMI, "set roam mode %d\n", mode); | 724 | ath6kl_dbg(ATH6KL_DBG_WMI, "set roam mode %d\n", mode); |
723 | return ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_ROAM_CTRL_CMDID, | 725 | return ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_ROAM_CTRL_CMDID, |
724 | NO_SYNC_WMIFLAG); | 726 | NO_SYNC_WMIFLAG); |
725 | } | 727 | } |
726 | 728 | ||
@@ -1270,7 +1272,7 @@ static int ath6kl_wmi_send_rssi_threshold_params(struct wmi *wmi, | |||
1270 | cmd = (struct wmi_rssi_threshold_params_cmd *) skb->data; | 1272 | cmd = (struct wmi_rssi_threshold_params_cmd *) skb->data; |
1271 | memcpy(cmd, rssi_cmd, sizeof(struct wmi_rssi_threshold_params_cmd)); | 1273 | memcpy(cmd, rssi_cmd, sizeof(struct wmi_rssi_threshold_params_cmd)); |
1272 | 1274 | ||
1273 | return ath6kl_wmi_cmd_send(wmi, skb, WMI_RSSI_THRESHOLD_PARAMS_CMDID, | 1275 | return ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_RSSI_THRESHOLD_PARAMS_CMDID, |
1274 | NO_SYNC_WMIFLAG); | 1276 | NO_SYNC_WMIFLAG); |
1275 | } | 1277 | } |
1276 | 1278 | ||
@@ -1451,7 +1453,7 @@ static int ath6kl_wmi_send_snr_threshold_params(struct wmi *wmi, | |||
1451 | cmd = (struct wmi_snr_threshold_params_cmd *) skb->data; | 1453 | cmd = (struct wmi_snr_threshold_params_cmd *) skb->data; |
1452 | memcpy(cmd, snr_cmd, sizeof(struct wmi_snr_threshold_params_cmd)); | 1454 | memcpy(cmd, snr_cmd, sizeof(struct wmi_snr_threshold_params_cmd)); |
1453 | 1455 | ||
1454 | return ath6kl_wmi_cmd_send(wmi, skb, WMI_SNR_THRESHOLD_PARAMS_CMDID, | 1456 | return ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SNR_THRESHOLD_PARAMS_CMDID, |
1455 | NO_SYNC_WMIFLAG); | 1457 | NO_SYNC_WMIFLAG); |
1456 | } | 1458 | } |
1457 | 1459 | ||
@@ -1576,14 +1578,15 @@ static int ath6kl_wmi_aplist_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
1576 | return 0; | 1578 | return 0; |
1577 | } | 1579 | } |
1578 | 1580 | ||
1579 | int ath6kl_wmi_cmd_send(struct wmi *wmi, struct sk_buff *skb, | 1581 | int ath6kl_wmi_cmd_send(struct wmi *wmi, u8 if_idx, struct sk_buff *skb, |
1580 | enum wmi_cmd_id cmd_id, enum wmi_sync_flag sync_flag) | 1582 | enum wmi_cmd_id cmd_id, enum wmi_sync_flag sync_flag) |
1581 | { | 1583 | { |
1582 | struct wmi_cmd_hdr *cmd_hdr; | 1584 | struct wmi_cmd_hdr *cmd_hdr; |
1583 | enum htc_endpoint_id ep_id = wmi->ep_id; | 1585 | enum htc_endpoint_id ep_id = wmi->ep_id; |
1584 | int ret; | 1586 | int ret; |
1587 | u16 info1; | ||
1585 | 1588 | ||
1586 | if (WARN_ON(skb == NULL)) | 1589 | if (WARN_ON(skb == NULL || (if_idx > (MAX_NUM_VIF - 1)))) |
1587 | return -EINVAL; | 1590 | return -EINVAL; |
1588 | 1591 | ||
1589 | ath6kl_dbg(ATH6KL_DBG_WMI, "wmi tx id %d len %d flag %d\n", | 1592 | ath6kl_dbg(ATH6KL_DBG_WMI, "wmi tx id %d len %d flag %d\n", |
@@ -1609,7 +1612,8 @@ int ath6kl_wmi_cmd_send(struct wmi *wmi, struct sk_buff *skb, | |||
1609 | 1612 | ||
1610 | cmd_hdr = (struct wmi_cmd_hdr *) skb->data; | 1613 | cmd_hdr = (struct wmi_cmd_hdr *) skb->data; |
1611 | cmd_hdr->cmd_id = cpu_to_le16(cmd_id); | 1614 | cmd_hdr->cmd_id = cpu_to_le16(cmd_id); |
1612 | cmd_hdr->info1 = 0; /* added for virtual interface */ | 1615 | info1 = if_idx & WMI_CMD_HDR_IF_ID_MASK; |
1616 | cmd_hdr->info1 = cpu_to_le16(info1); | ||
1613 | 1617 | ||
1614 | /* Only for OPT_TX_CMD, use BE endpoint. */ | 1618 | /* Only for OPT_TX_CMD, use BE endpoint. */ |
1615 | if (cmd_id == WMI_OPT_TX_FRAME_CMDID) { | 1619 | if (cmd_id == WMI_OPT_TX_FRAME_CMDID) { |
@@ -1636,7 +1640,8 @@ int ath6kl_wmi_cmd_send(struct wmi *wmi, struct sk_buff *skb, | |||
1636 | return 0; | 1640 | return 0; |
1637 | } | 1641 | } |
1638 | 1642 | ||
1639 | int ath6kl_wmi_connect_cmd(struct wmi *wmi, enum network_type nw_type, | 1643 | int ath6kl_wmi_connect_cmd(struct wmi *wmi, u8 if_idx, |
1644 | enum network_type nw_type, | ||
1640 | enum dot11_auth_mode dot11_auth_mode, | 1645 | enum dot11_auth_mode dot11_auth_mode, |
1641 | enum auth_mode auth_mode, | 1646 | enum auth_mode auth_mode, |
1642 | enum crypto_type pairwise_crypto, | 1647 | enum crypto_type pairwise_crypto, |
@@ -1687,12 +1692,14 @@ int ath6kl_wmi_connect_cmd(struct wmi *wmi, enum network_type nw_type, | |||
1687 | if (bssid != NULL) | 1692 | if (bssid != NULL) |
1688 | memcpy(cc->bssid, bssid, ETH_ALEN); | 1693 | memcpy(cc->bssid, bssid, ETH_ALEN); |
1689 | 1694 | ||
1690 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_CONNECT_CMDID, NO_SYNC_WMIFLAG); | 1695 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_CONNECT_CMDID, |
1696 | NO_SYNC_WMIFLAG); | ||
1691 | 1697 | ||
1692 | return ret; | 1698 | return ret; |
1693 | } | 1699 | } |
1694 | 1700 | ||
1695 | int ath6kl_wmi_reconnect_cmd(struct wmi *wmi, u8 *bssid, u16 channel) | 1701 | int ath6kl_wmi_reconnect_cmd(struct wmi *wmi, u8 if_idx, u8 *bssid, |
1702 | u16 channel) | ||
1696 | { | 1703 | { |
1697 | struct sk_buff *skb; | 1704 | struct sk_buff *skb; |
1698 | struct wmi_reconnect_cmd *cc; | 1705 | struct wmi_reconnect_cmd *cc; |
@@ -1713,13 +1720,13 @@ int ath6kl_wmi_reconnect_cmd(struct wmi *wmi, u8 *bssid, u16 channel) | |||
1713 | if (bssid != NULL) | 1720 | if (bssid != NULL) |
1714 | memcpy(cc->bssid, bssid, ETH_ALEN); | 1721 | memcpy(cc->bssid, bssid, ETH_ALEN); |
1715 | 1722 | ||
1716 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_RECONNECT_CMDID, | 1723 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_RECONNECT_CMDID, |
1717 | NO_SYNC_WMIFLAG); | 1724 | NO_SYNC_WMIFLAG); |
1718 | 1725 | ||
1719 | return ret; | 1726 | return ret; |
1720 | } | 1727 | } |
1721 | 1728 | ||
1722 | int ath6kl_wmi_disconnect_cmd(struct wmi *wmi) | 1729 | int ath6kl_wmi_disconnect_cmd(struct wmi *wmi, u8 if_idx) |
1723 | { | 1730 | { |
1724 | int ret; | 1731 | int ret; |
1725 | 1732 | ||
@@ -1728,12 +1735,13 @@ int ath6kl_wmi_disconnect_cmd(struct wmi *wmi) | |||
1728 | wmi->traffic_class = 100; | 1735 | wmi->traffic_class = 100; |
1729 | 1736 | ||
1730 | /* Disconnect command does not need to do a SYNC before. */ | 1737 | /* Disconnect command does not need to do a SYNC before. */ |
1731 | ret = ath6kl_wmi_simple_cmd(wmi, WMI_DISCONNECT_CMDID); | 1738 | ret = ath6kl_wmi_simple_cmd(wmi, if_idx, WMI_DISCONNECT_CMDID); |
1732 | 1739 | ||
1733 | return ret; | 1740 | return ret; |
1734 | } | 1741 | } |
1735 | 1742 | ||
1736 | int ath6kl_wmi_startscan_cmd(struct wmi *wmi, enum wmi_scan_type scan_type, | 1743 | int ath6kl_wmi_startscan_cmd(struct wmi *wmi, u8 if_idx, |
1744 | enum wmi_scan_type scan_type, | ||
1737 | u32 force_fgscan, u32 is_legacy, | 1745 | u32 force_fgscan, u32 is_legacy, |
1738 | u32 home_dwell_time, u32 force_scan_interval, | 1746 | u32 home_dwell_time, u32 force_scan_interval, |
1739 | s8 num_chan, u16 *ch_list) | 1747 | s8 num_chan, u16 *ch_list) |
@@ -1769,13 +1777,14 @@ int ath6kl_wmi_startscan_cmd(struct wmi *wmi, enum wmi_scan_type scan_type, | |||
1769 | for (i = 0; i < num_chan; i++) | 1777 | for (i = 0; i < num_chan; i++) |
1770 | sc->ch_list[i] = cpu_to_le16(ch_list[i]); | 1778 | sc->ch_list[i] = cpu_to_le16(ch_list[i]); |
1771 | 1779 | ||
1772 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_START_SCAN_CMDID, | 1780 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_START_SCAN_CMDID, |
1773 | NO_SYNC_WMIFLAG); | 1781 | NO_SYNC_WMIFLAG); |
1774 | 1782 | ||
1775 | return ret; | 1783 | return ret; |
1776 | } | 1784 | } |
1777 | 1785 | ||
1778 | int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u16 fg_start_sec, | 1786 | int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u8 if_idx, |
1787 | u16 fg_start_sec, | ||
1779 | u16 fg_end_sec, u16 bg_sec, | 1788 | u16 fg_end_sec, u16 bg_sec, |
1780 | u16 minact_chdw_msec, u16 maxact_chdw_msec, | 1789 | u16 minact_chdw_msec, u16 maxact_chdw_msec, |
1781 | u16 pas_chdw_msec, u8 short_scan_ratio, | 1790 | u16 pas_chdw_msec, u8 short_scan_ratio, |
@@ -1802,7 +1811,7 @@ int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u16 fg_start_sec, | |||
1802 | sc->max_dfsch_act_time = cpu_to_le32(max_dfsch_act_time); | 1811 | sc->max_dfsch_act_time = cpu_to_le32(max_dfsch_act_time); |
1803 | sc->maxact_scan_per_ssid = cpu_to_le16(maxact_scan_per_ssid); | 1812 | sc->maxact_scan_per_ssid = cpu_to_le16(maxact_scan_per_ssid); |
1804 | 1813 | ||
1805 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_SCAN_PARAMS_CMDID, | 1814 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_SET_SCAN_PARAMS_CMDID, |
1806 | NO_SYNC_WMIFLAG); | 1815 | NO_SYNC_WMIFLAG); |
1807 | return ret; | 1816 | return ret; |
1808 | } | 1817 | } |
@@ -1824,12 +1833,12 @@ int ath6kl_wmi_bssfilter_cmd(struct wmi *wmi, u8 filter, u32 ie_mask) | |||
1824 | cmd->bss_filter = filter; | 1833 | cmd->bss_filter = filter; |
1825 | cmd->ie_mask = cpu_to_le32(ie_mask); | 1834 | cmd->ie_mask = cpu_to_le32(ie_mask); |
1826 | 1835 | ||
1827 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_BSS_FILTER_CMDID, | 1836 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_BSS_FILTER_CMDID, |
1828 | NO_SYNC_WMIFLAG); | 1837 | NO_SYNC_WMIFLAG); |
1829 | return ret; | 1838 | return ret; |
1830 | } | 1839 | } |
1831 | 1840 | ||
1832 | int ath6kl_wmi_probedssid_cmd(struct wmi *wmi, u8 index, u8 flag, | 1841 | int ath6kl_wmi_probedssid_cmd(struct wmi *wmi, u8 if_idx, u8 index, u8 flag, |
1833 | u8 ssid_len, u8 *ssid) | 1842 | u8 ssid_len, u8 *ssid) |
1834 | { | 1843 | { |
1835 | struct sk_buff *skb; | 1844 | struct sk_buff *skb; |
@@ -1861,12 +1870,13 @@ int ath6kl_wmi_probedssid_cmd(struct wmi *wmi, u8 index, u8 flag, | |||
1861 | cmd->ssid_len = ssid_len; | 1870 | cmd->ssid_len = ssid_len; |
1862 | memcpy(cmd->ssid, ssid, ssid_len); | 1871 | memcpy(cmd->ssid, ssid, ssid_len); |
1863 | 1872 | ||
1864 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_PROBED_SSID_CMDID, | 1873 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_SET_PROBED_SSID_CMDID, |
1865 | NO_SYNC_WMIFLAG); | 1874 | NO_SYNC_WMIFLAG); |
1866 | return ret; | 1875 | return ret; |
1867 | } | 1876 | } |
1868 | 1877 | ||
1869 | int ath6kl_wmi_listeninterval_cmd(struct wmi *wmi, u16 listen_interval, | 1878 | int ath6kl_wmi_listeninterval_cmd(struct wmi *wmi, u8 if_idx, |
1879 | u16 listen_interval, | ||
1870 | u16 listen_beacons) | 1880 | u16 listen_beacons) |
1871 | { | 1881 | { |
1872 | struct sk_buff *skb; | 1882 | struct sk_buff *skb; |
@@ -1881,12 +1891,12 @@ int ath6kl_wmi_listeninterval_cmd(struct wmi *wmi, u16 listen_interval, | |||
1881 | cmd->listen_intvl = cpu_to_le16(listen_interval); | 1891 | cmd->listen_intvl = cpu_to_le16(listen_interval); |
1882 | cmd->num_beacons = cpu_to_le16(listen_beacons); | 1892 | cmd->num_beacons = cpu_to_le16(listen_beacons); |
1883 | 1893 | ||
1884 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_LISTEN_INT_CMDID, | 1894 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_SET_LISTEN_INT_CMDID, |
1885 | NO_SYNC_WMIFLAG); | 1895 | NO_SYNC_WMIFLAG); |
1886 | return ret; | 1896 | return ret; |
1887 | } | 1897 | } |
1888 | 1898 | ||
1889 | int ath6kl_wmi_powermode_cmd(struct wmi *wmi, u8 pwr_mode) | 1899 | int ath6kl_wmi_powermode_cmd(struct wmi *wmi, u8 if_idx, u8 pwr_mode) |
1890 | { | 1900 | { |
1891 | struct sk_buff *skb; | 1901 | struct sk_buff *skb; |
1892 | struct wmi_power_mode_cmd *cmd; | 1902 | struct wmi_power_mode_cmd *cmd; |
@@ -1900,7 +1910,7 @@ int ath6kl_wmi_powermode_cmd(struct wmi *wmi, u8 pwr_mode) | |||
1900 | cmd->pwr_mode = pwr_mode; | 1910 | cmd->pwr_mode = pwr_mode; |
1901 | wmi->pwr_mode = pwr_mode; | 1911 | wmi->pwr_mode = pwr_mode; |
1902 | 1912 | ||
1903 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_POWER_MODE_CMDID, | 1913 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_SET_POWER_MODE_CMDID, |
1904 | NO_SYNC_WMIFLAG); | 1914 | NO_SYNC_WMIFLAG); |
1905 | return ret; | 1915 | return ret; |
1906 | } | 1916 | } |
@@ -1926,7 +1936,7 @@ int ath6kl_wmi_pmparams_cmd(struct wmi *wmi, u16 idle_period, | |||
1926 | pm->num_tx_to_wakeup = cpu_to_le16(num_tx_to_wakeup); | 1936 | pm->num_tx_to_wakeup = cpu_to_le16(num_tx_to_wakeup); |
1927 | pm->ps_fail_event_policy = cpu_to_le16(ps_fail_event_policy); | 1937 | pm->ps_fail_event_policy = cpu_to_le16(ps_fail_event_policy); |
1928 | 1938 | ||
1929 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_POWER_PARAMS_CMDID, | 1939 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_POWER_PARAMS_CMDID, |
1930 | NO_SYNC_WMIFLAG); | 1940 | NO_SYNC_WMIFLAG); |
1931 | return ret; | 1941 | return ret; |
1932 | } | 1942 | } |
@@ -1944,14 +1954,16 @@ int ath6kl_wmi_disctimeout_cmd(struct wmi *wmi, u8 timeout) | |||
1944 | cmd = (struct wmi_disc_timeout_cmd *) skb->data; | 1954 | cmd = (struct wmi_disc_timeout_cmd *) skb->data; |
1945 | cmd->discon_timeout = timeout; | 1955 | cmd->discon_timeout = timeout; |
1946 | 1956 | ||
1947 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_DISC_TIMEOUT_CMDID, | 1957 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_DISC_TIMEOUT_CMDID, |
1948 | NO_SYNC_WMIFLAG); | 1958 | NO_SYNC_WMIFLAG); |
1959 | |||
1949 | if (ret == 0) | 1960 | if (ret == 0) |
1950 | ath6kl_debug_set_disconnect_timeout(wmi->parent_dev, timeout); | 1961 | ath6kl_debug_set_disconnect_timeout(wmi->parent_dev, timeout); |
1962 | |||
1951 | return ret; | 1963 | return ret; |
1952 | } | 1964 | } |
1953 | 1965 | ||
1954 | int ath6kl_wmi_addkey_cmd(struct wmi *wmi, u8 key_index, | 1966 | int ath6kl_wmi_addkey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index, |
1955 | enum crypto_type key_type, | 1967 | enum crypto_type key_type, |
1956 | u8 key_usage, u8 key_len, | 1968 | u8 key_usage, u8 key_len, |
1957 | u8 *key_rsc, u8 *key_material, | 1969 | u8 *key_rsc, u8 *key_material, |
@@ -1992,7 +2004,7 @@ int ath6kl_wmi_addkey_cmd(struct wmi *wmi, u8 key_index, | |||
1992 | if (mac_addr) | 2004 | if (mac_addr) |
1993 | memcpy(cmd->key_mac_addr, mac_addr, ETH_ALEN); | 2005 | memcpy(cmd->key_mac_addr, mac_addr, ETH_ALEN); |
1994 | 2006 | ||
1995 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_ADD_CIPHER_KEY_CMDID, | 2007 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_ADD_CIPHER_KEY_CMDID, |
1996 | sync_flag); | 2008 | sync_flag); |
1997 | 2009 | ||
1998 | return ret; | 2010 | return ret; |
@@ -2011,12 +2023,13 @@ int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 *krk) | |||
2011 | cmd = (struct wmi_add_krk_cmd *) skb->data; | 2023 | cmd = (struct wmi_add_krk_cmd *) skb->data; |
2012 | memcpy(cmd->krk, krk, WMI_KRK_LEN); | 2024 | memcpy(cmd->krk, krk, WMI_KRK_LEN); |
2013 | 2025 | ||
2014 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_ADD_KRK_CMDID, NO_SYNC_WMIFLAG); | 2026 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_ADD_KRK_CMDID, |
2027 | NO_SYNC_WMIFLAG); | ||
2015 | 2028 | ||
2016 | return ret; | 2029 | return ret; |
2017 | } | 2030 | } |
2018 | 2031 | ||
2019 | int ath6kl_wmi_deletekey_cmd(struct wmi *wmi, u8 key_index) | 2032 | int ath6kl_wmi_deletekey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index) |
2020 | { | 2033 | { |
2021 | struct sk_buff *skb; | 2034 | struct sk_buff *skb; |
2022 | struct wmi_delete_cipher_key_cmd *cmd; | 2035 | struct wmi_delete_cipher_key_cmd *cmd; |
@@ -2032,13 +2045,13 @@ int ath6kl_wmi_deletekey_cmd(struct wmi *wmi, u8 key_index) | |||
2032 | cmd = (struct wmi_delete_cipher_key_cmd *) skb->data; | 2045 | cmd = (struct wmi_delete_cipher_key_cmd *) skb->data; |
2033 | cmd->key_index = key_index; | 2046 | cmd->key_index = key_index; |
2034 | 2047 | ||
2035 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_DELETE_CIPHER_KEY_CMDID, | 2048 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_DELETE_CIPHER_KEY_CMDID, |
2036 | NO_SYNC_WMIFLAG); | 2049 | NO_SYNC_WMIFLAG); |
2037 | 2050 | ||
2038 | return ret; | 2051 | return ret; |
2039 | } | 2052 | } |
2040 | 2053 | ||
2041 | int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, const u8 *bssid, | 2054 | int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, u8 if_idx, const u8 *bssid, |
2042 | const u8 *pmkid, bool set) | 2055 | const u8 *pmkid, bool set) |
2043 | { | 2056 | { |
2044 | struct sk_buff *skb; | 2057 | struct sk_buff *skb; |
@@ -2065,7 +2078,7 @@ int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, const u8 *bssid, | |||
2065 | cmd->enable = PMKID_DISABLE; | 2078 | cmd->enable = PMKID_DISABLE; |
2066 | } | 2079 | } |
2067 | 2080 | ||
2068 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_PMKID_CMDID, | 2081 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_SET_PMKID_CMDID, |
2069 | NO_SYNC_WMIFLAG); | 2082 | NO_SYNC_WMIFLAG); |
2070 | 2083 | ||
2071 | return ret; | 2084 | return ret; |
@@ -2147,7 +2160,7 @@ static int ath6kl_wmi_sync_point(struct wmi *wmi) | |||
2147 | * Send sync cmd followed by sync data messages on all | 2160 | * Send sync cmd followed by sync data messages on all |
2148 | * endpoints being used | 2161 | * endpoints being used |
2149 | */ | 2162 | */ |
2150 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SYNCHRONIZE_CMDID, | 2163 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SYNCHRONIZE_CMDID, |
2151 | NO_SYNC_WMIFLAG); | 2164 | NO_SYNC_WMIFLAG); |
2152 | 2165 | ||
2153 | if (ret) | 2166 | if (ret) |
@@ -2278,7 +2291,7 @@ int ath6kl_wmi_create_pstream_cmd(struct wmi *wmi, | |||
2278 | ath6kl_indicate_tx_activity(wmi->parent_dev, | 2291 | ath6kl_indicate_tx_activity(wmi->parent_dev, |
2279 | params->traffic_class, true); | 2292 | params->traffic_class, true); |
2280 | 2293 | ||
2281 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_CREATE_PSTREAM_CMDID, | 2294 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_CREATE_PSTREAM_CMDID, |
2282 | NO_SYNC_WMIFLAG); | 2295 | NO_SYNC_WMIFLAG); |
2283 | return ret; | 2296 | return ret; |
2284 | } | 2297 | } |
@@ -2319,7 +2332,7 @@ int ath6kl_wmi_delete_pstream_cmd(struct wmi *wmi, u8 traffic_class, u8 tsid) | |||
2319 | "sending delete_pstream_cmd: traffic class: %d tsid=%d\n", | 2332 | "sending delete_pstream_cmd: traffic class: %d tsid=%d\n", |
2320 | traffic_class, tsid); | 2333 | traffic_class, tsid); |
2321 | 2334 | ||
2322 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_DELETE_PSTREAM_CMDID, | 2335 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_DELETE_PSTREAM_CMDID, |
2323 | SYNC_BEFORE_WMIFLAG); | 2336 | SYNC_BEFORE_WMIFLAG); |
2324 | 2337 | ||
2325 | spin_lock_bh(&wmi->lock); | 2338 | spin_lock_bh(&wmi->lock); |
@@ -2358,7 +2371,8 @@ int ath6kl_wmi_set_ip_cmd(struct wmi *wmi, struct wmi_set_ip_cmd *ip_cmd) | |||
2358 | cmd = (struct wmi_set_ip_cmd *) skb->data; | 2371 | cmd = (struct wmi_set_ip_cmd *) skb->data; |
2359 | memcpy(cmd, ip_cmd, sizeof(struct wmi_set_ip_cmd)); | 2372 | memcpy(cmd, ip_cmd, sizeof(struct wmi_set_ip_cmd)); |
2360 | 2373 | ||
2361 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_IP_CMDID, NO_SYNC_WMIFLAG); | 2374 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_IP_CMDID, |
2375 | NO_SYNC_WMIFLAG); | ||
2362 | return ret; | 2376 | return ret; |
2363 | } | 2377 | } |
2364 | 2378 | ||
@@ -2383,7 +2397,7 @@ static int ath6kl_wmi_cmd_send_xtnd(struct wmi *wmi, struct sk_buff *skb, | |||
2383 | cmd_hdr = (struct wmix_cmd_hdr *) skb->data; | 2397 | cmd_hdr = (struct wmix_cmd_hdr *) skb->data; |
2384 | cmd_hdr->cmd_id = cpu_to_le32(cmd_id); | 2398 | cmd_hdr->cmd_id = cpu_to_le32(cmd_id); |
2385 | 2399 | ||
2386 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_EXTENSION_CMDID, sync_flag); | 2400 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_EXTENSION_CMDID, sync_flag); |
2387 | 2401 | ||
2388 | return ret; | 2402 | return ret; |
2389 | } | 2403 | } |
@@ -2426,9 +2440,9 @@ int ath6kl_wmi_config_debug_module_cmd(struct wmi *wmi, u32 valid, u32 config) | |||
2426 | return ret; | 2440 | return ret; |
2427 | } | 2441 | } |
2428 | 2442 | ||
2429 | int ath6kl_wmi_get_stats_cmd(struct wmi *wmi) | 2443 | int ath6kl_wmi_get_stats_cmd(struct wmi *wmi, u8 if_idx) |
2430 | { | 2444 | { |
2431 | return ath6kl_wmi_simple_cmd(wmi, WMI_GET_STATISTICS_CMDID); | 2445 | return ath6kl_wmi_simple_cmd(wmi, if_idx, WMI_GET_STATISTICS_CMDID); |
2432 | } | 2446 | } |
2433 | 2447 | ||
2434 | int ath6kl_wmi_set_tx_pwr_cmd(struct wmi *wmi, u8 dbM) | 2448 | int ath6kl_wmi_set_tx_pwr_cmd(struct wmi *wmi, u8 dbM) |
@@ -2444,7 +2458,7 @@ int ath6kl_wmi_set_tx_pwr_cmd(struct wmi *wmi, u8 dbM) | |||
2444 | cmd = (struct wmi_set_tx_pwr_cmd *) skb->data; | 2458 | cmd = (struct wmi_set_tx_pwr_cmd *) skb->data; |
2445 | cmd->dbM = dbM; | 2459 | cmd->dbM = dbM; |
2446 | 2460 | ||
2447 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_TX_PWR_CMDID, | 2461 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_TX_PWR_CMDID, |
2448 | NO_SYNC_WMIFLAG); | 2462 | NO_SYNC_WMIFLAG); |
2449 | 2463 | ||
2450 | return ret; | 2464 | return ret; |
@@ -2452,12 +2466,12 @@ int ath6kl_wmi_set_tx_pwr_cmd(struct wmi *wmi, u8 dbM) | |||
2452 | 2466 | ||
2453 | int ath6kl_wmi_get_tx_pwr_cmd(struct wmi *wmi) | 2467 | int ath6kl_wmi_get_tx_pwr_cmd(struct wmi *wmi) |
2454 | { | 2468 | { |
2455 | return ath6kl_wmi_simple_cmd(wmi, WMI_GET_TX_PWR_CMDID); | 2469 | return ath6kl_wmi_simple_cmd(wmi, 0, WMI_GET_TX_PWR_CMDID); |
2456 | } | 2470 | } |
2457 | 2471 | ||
2458 | int ath6kl_wmi_get_roam_tbl_cmd(struct wmi *wmi) | 2472 | int ath6kl_wmi_get_roam_tbl_cmd(struct wmi *wmi) |
2459 | { | 2473 | { |
2460 | return ath6kl_wmi_simple_cmd(wmi, WMI_GET_ROAM_TBL_CMDID); | 2474 | return ath6kl_wmi_simple_cmd(wmi, 0, WMI_GET_ROAM_TBL_CMDID); |
2461 | } | 2475 | } |
2462 | 2476 | ||
2463 | int ath6kl_wmi_set_lpreamble_cmd(struct wmi *wmi, u8 status, u8 preamble_policy) | 2477 | int ath6kl_wmi_set_lpreamble_cmd(struct wmi *wmi, u8 status, u8 preamble_policy) |
@@ -2474,7 +2488,7 @@ int ath6kl_wmi_set_lpreamble_cmd(struct wmi *wmi, u8 status, u8 preamble_policy) | |||
2474 | cmd->status = status; | 2488 | cmd->status = status; |
2475 | cmd->preamble_policy = preamble_policy; | 2489 | cmd->preamble_policy = preamble_policy; |
2476 | 2490 | ||
2477 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_LPREAMBLE_CMDID, | 2491 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_LPREAMBLE_CMDID, |
2478 | NO_SYNC_WMIFLAG); | 2492 | NO_SYNC_WMIFLAG); |
2479 | return ret; | 2493 | return ret; |
2480 | } | 2494 | } |
@@ -2492,7 +2506,8 @@ int ath6kl_wmi_set_rts_cmd(struct wmi *wmi, u16 threshold) | |||
2492 | cmd = (struct wmi_set_rts_cmd *) skb->data; | 2506 | cmd = (struct wmi_set_rts_cmd *) skb->data; |
2493 | cmd->threshold = cpu_to_le16(threshold); | 2507 | cmd->threshold = cpu_to_le16(threshold); |
2494 | 2508 | ||
2495 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_RTS_CMDID, NO_SYNC_WMIFLAG); | 2509 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_RTS_CMDID, |
2510 | NO_SYNC_WMIFLAG); | ||
2496 | return ret; | 2511 | return ret; |
2497 | } | 2512 | } |
2498 | 2513 | ||
@@ -2512,7 +2527,7 @@ int ath6kl_wmi_set_wmm_txop(struct wmi *wmi, enum wmi_txop_cfg cfg) | |||
2512 | cmd = (struct wmi_set_wmm_txop_cmd *) skb->data; | 2527 | cmd = (struct wmi_set_wmm_txop_cmd *) skb->data; |
2513 | cmd->txop_enable = cfg; | 2528 | cmd->txop_enable = cfg; |
2514 | 2529 | ||
2515 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_WMM_TXOP_CMDID, | 2530 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_WMM_TXOP_CMDID, |
2516 | NO_SYNC_WMIFLAG); | 2531 | NO_SYNC_WMIFLAG); |
2517 | return ret; | 2532 | return ret; |
2518 | } | 2533 | } |
@@ -2530,10 +2545,12 @@ int ath6kl_wmi_set_keepalive_cmd(struct wmi *wmi, u8 keep_alive_intvl) | |||
2530 | cmd = (struct wmi_set_keepalive_cmd *) skb->data; | 2545 | cmd = (struct wmi_set_keepalive_cmd *) skb->data; |
2531 | cmd->keep_alive_intvl = keep_alive_intvl; | 2546 | cmd->keep_alive_intvl = keep_alive_intvl; |
2532 | 2547 | ||
2533 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_KEEPALIVE_CMDID, | 2548 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_KEEPALIVE_CMDID, |
2534 | NO_SYNC_WMIFLAG); | 2549 | NO_SYNC_WMIFLAG); |
2550 | |||
2535 | if (ret == 0) | 2551 | if (ret == 0) |
2536 | ath6kl_debug_set_keepalive(wmi->parent_dev, keep_alive_intvl); | 2552 | ath6kl_debug_set_keepalive(wmi->parent_dev, keep_alive_intvl); |
2553 | |||
2537 | return ret; | 2554 | return ret; |
2538 | } | 2555 | } |
2539 | 2556 | ||
@@ -2548,7 +2565,7 @@ int ath6kl_wmi_test_cmd(struct wmi *wmi, void *buf, size_t len) | |||
2548 | 2565 | ||
2549 | memcpy(skb->data, buf, len); | 2566 | memcpy(skb->data, buf, len); |
2550 | 2567 | ||
2551 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_TEST_CMDID, NO_SYNC_WMIFLAG); | 2568 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_TEST_CMDID, NO_SYNC_WMIFLAG); |
2552 | 2569 | ||
2553 | return ret; | 2570 | return ret; |
2554 | } | 2571 | } |
@@ -2602,7 +2619,8 @@ static int ath6kl_wmi_delba_req_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
2602 | 2619 | ||
2603 | /* AP mode functions */ | 2620 | /* AP mode functions */ |
2604 | 2621 | ||
2605 | int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, struct wmi_connect_cmd *p) | 2622 | int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, u8 if_idx, |
2623 | struct wmi_connect_cmd *p) | ||
2606 | { | 2624 | { |
2607 | struct sk_buff *skb; | 2625 | struct sk_buff *skb; |
2608 | struct wmi_connect_cmd *cm; | 2626 | struct wmi_connect_cmd *cm; |
@@ -2615,7 +2633,7 @@ int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, struct wmi_connect_cmd *p) | |||
2615 | cm = (struct wmi_connect_cmd *) skb->data; | 2633 | cm = (struct wmi_connect_cmd *) skb->data; |
2616 | memcpy(cm, p, sizeof(*cm)); | 2634 | memcpy(cm, p, sizeof(*cm)); |
2617 | 2635 | ||
2618 | res = ath6kl_wmi_cmd_send(wmip, skb, WMI_AP_CONFIG_COMMIT_CMDID, | 2636 | res = ath6kl_wmi_cmd_send(wmip, if_idx, skb, WMI_AP_CONFIG_COMMIT_CMDID, |
2619 | NO_SYNC_WMIFLAG); | 2637 | NO_SYNC_WMIFLAG); |
2620 | ath6kl_dbg(ATH6KL_DBG_WMI, "%s: nw_type=%u auth_mode=%u ch=%u " | 2638 | ath6kl_dbg(ATH6KL_DBG_WMI, "%s: nw_type=%u auth_mode=%u ch=%u " |
2621 | "ctrl_flags=0x%x-> res=%d\n", | 2639 | "ctrl_flags=0x%x-> res=%d\n", |
@@ -2624,7 +2642,8 @@ int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, struct wmi_connect_cmd *p) | |||
2624 | return res; | 2642 | return res; |
2625 | } | 2643 | } |
2626 | 2644 | ||
2627 | int ath6kl_wmi_ap_set_mlme(struct wmi *wmip, u8 cmd, const u8 *mac, u16 reason) | 2645 | int ath6kl_wmi_ap_set_mlme(struct wmi *wmip, u8 if_idx, u8 cmd, const u8 *mac, |
2646 | u16 reason) | ||
2628 | { | 2647 | { |
2629 | struct sk_buff *skb; | 2648 | struct sk_buff *skb; |
2630 | struct wmi_ap_set_mlme_cmd *cm; | 2649 | struct wmi_ap_set_mlme_cmd *cm; |
@@ -2638,7 +2657,7 @@ int ath6kl_wmi_ap_set_mlme(struct wmi *wmip, u8 cmd, const u8 *mac, u16 reason) | |||
2638 | cm->reason = cpu_to_le16(reason); | 2657 | cm->reason = cpu_to_le16(reason); |
2639 | cm->cmd = cmd; | 2658 | cm->cmd = cmd; |
2640 | 2659 | ||
2641 | return ath6kl_wmi_cmd_send(wmip, skb, WMI_AP_SET_MLME_CMDID, | 2660 | return ath6kl_wmi_cmd_send(wmip, if_idx, skb, WMI_AP_SET_MLME_CMDID, |
2642 | NO_SYNC_WMIFLAG); | 2661 | NO_SYNC_WMIFLAG); |
2643 | } | 2662 | } |
2644 | 2663 | ||
@@ -2663,7 +2682,8 @@ static int ath6kl_wmi_dtimexpiry_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
2663 | return 0; | 2682 | return 0; |
2664 | } | 2683 | } |
2665 | 2684 | ||
2666 | int ath6kl_wmi_set_pvb_cmd(struct wmi *wmi, u16 aid, bool flag) | 2685 | int ath6kl_wmi_set_pvb_cmd(struct wmi *wmi, u8 if_idx, u16 aid, |
2686 | bool flag) | ||
2667 | { | 2687 | { |
2668 | struct sk_buff *skb; | 2688 | struct sk_buff *skb; |
2669 | struct wmi_ap_set_pvb_cmd *cmd; | 2689 | struct wmi_ap_set_pvb_cmd *cmd; |
@@ -2678,7 +2698,7 @@ int ath6kl_wmi_set_pvb_cmd(struct wmi *wmi, u16 aid, bool flag) | |||
2678 | cmd->rsvd = cpu_to_le16(0); | 2698 | cmd->rsvd = cpu_to_le16(0); |
2679 | cmd->flag = cpu_to_le32(flag); | 2699 | cmd->flag = cpu_to_le32(flag); |
2680 | 2700 | ||
2681 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_AP_SET_PVB_CMDID, | 2701 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_AP_SET_PVB_CMDID, |
2682 | NO_SYNC_WMIFLAG); | 2702 | NO_SYNC_WMIFLAG); |
2683 | 2703 | ||
2684 | return 0; | 2704 | return 0; |
@@ -2701,14 +2721,14 @@ int ath6kl_wmi_set_rx_frame_format_cmd(struct wmi *wmi, u8 rx_meta_ver, | |||
2701 | cmd->meta_ver = rx_meta_ver; | 2721 | cmd->meta_ver = rx_meta_ver; |
2702 | 2722 | ||
2703 | /* Delete the local aggr state, on host */ | 2723 | /* Delete the local aggr state, on host */ |
2704 | ret = ath6kl_wmi_cmd_send(wmi, skb, WMI_RX_FRAME_FORMAT_CMDID, | 2724 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_RX_FRAME_FORMAT_CMDID, |
2705 | NO_SYNC_WMIFLAG); | 2725 | NO_SYNC_WMIFLAG); |
2706 | 2726 | ||
2707 | return ret; | 2727 | return ret; |
2708 | } | 2728 | } |
2709 | 2729 | ||
2710 | int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 mgmt_frm_type, const u8 *ie, | 2730 | int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 if_idx, u8 mgmt_frm_type, |
2711 | u8 ie_len) | 2731 | const u8 *ie, u8 ie_len) |
2712 | { | 2732 | { |
2713 | struct sk_buff *skb; | 2733 | struct sk_buff *skb; |
2714 | struct wmi_set_appie_cmd *p; | 2734 | struct wmi_set_appie_cmd *p; |
@@ -2723,7 +2743,7 @@ int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 mgmt_frm_type, const u8 *ie, | |||
2723 | p->mgmt_frm_type = mgmt_frm_type; | 2743 | p->mgmt_frm_type = mgmt_frm_type; |
2724 | p->ie_len = ie_len; | 2744 | p->ie_len = ie_len; |
2725 | memcpy(p->ie_info, ie, ie_len); | 2745 | memcpy(p->ie_info, ie, ie_len); |
2726 | return ath6kl_wmi_cmd_send(wmi, skb, WMI_SET_APPIE_CMDID, | 2746 | return ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_SET_APPIE_CMDID, |
2727 | NO_SYNC_WMIFLAG); | 2747 | NO_SYNC_WMIFLAG); |
2728 | } | 2748 | } |
2729 | 2749 | ||
@@ -2741,11 +2761,11 @@ int ath6kl_wmi_disable_11b_rates_cmd(struct wmi *wmi, bool disable) | |||
2741 | cmd = (struct wmi_disable_11b_rates_cmd *) skb->data; | 2761 | cmd = (struct wmi_disable_11b_rates_cmd *) skb->data; |
2742 | cmd->disable = disable ? 1 : 0; | 2762 | cmd->disable = disable ? 1 : 0; |
2743 | 2763 | ||
2744 | return ath6kl_wmi_cmd_send(wmi, skb, WMI_DISABLE_11B_RATES_CMDID, | 2764 | return ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_DISABLE_11B_RATES_CMDID, |
2745 | NO_SYNC_WMIFLAG); | 2765 | NO_SYNC_WMIFLAG); |
2746 | } | 2766 | } |
2747 | 2767 | ||
2748 | int ath6kl_wmi_remain_on_chnl_cmd(struct wmi *wmi, u32 freq, u32 dur) | 2768 | int ath6kl_wmi_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx, u32 freq, u32 dur) |
2749 | { | 2769 | { |
2750 | struct sk_buff *skb; | 2770 | struct sk_buff *skb; |
2751 | struct wmi_remain_on_chnl_cmd *p; | 2771 | struct wmi_remain_on_chnl_cmd *p; |
@@ -2759,12 +2779,12 @@ int ath6kl_wmi_remain_on_chnl_cmd(struct wmi *wmi, u32 freq, u32 dur) | |||
2759 | p = (struct wmi_remain_on_chnl_cmd *) skb->data; | 2779 | p = (struct wmi_remain_on_chnl_cmd *) skb->data; |
2760 | p->freq = cpu_to_le32(freq); | 2780 | p->freq = cpu_to_le32(freq); |
2761 | p->duration = cpu_to_le32(dur); | 2781 | p->duration = cpu_to_le32(dur); |
2762 | return ath6kl_wmi_cmd_send(wmi, skb, WMI_REMAIN_ON_CHNL_CMDID, | 2782 | return ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_REMAIN_ON_CHNL_CMDID, |
2763 | NO_SYNC_WMIFLAG); | 2783 | NO_SYNC_WMIFLAG); |
2764 | } | 2784 | } |
2765 | 2785 | ||
2766 | int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u32 id, u32 freq, u32 wait, | 2786 | int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq, |
2767 | const u8 *data, u16 data_len) | 2787 | u32 wait, const u8 *data, u16 data_len) |
2768 | { | 2788 | { |
2769 | struct sk_buff *skb; | 2789 | struct sk_buff *skb; |
2770 | struct wmi_send_action_cmd *p; | 2790 | struct wmi_send_action_cmd *p; |
@@ -2795,13 +2815,13 @@ int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u32 id, u32 freq, u32 wait, | |||
2795 | p->wait = cpu_to_le32(wait); | 2815 | p->wait = cpu_to_le32(wait); |
2796 | p->len = cpu_to_le16(data_len); | 2816 | p->len = cpu_to_le16(data_len); |
2797 | memcpy(p->data, data, data_len); | 2817 | memcpy(p->data, data, data_len); |
2798 | return ath6kl_wmi_cmd_send(wmi, skb, WMI_SEND_ACTION_CMDID, | 2818 | return ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_SEND_ACTION_CMDID, |
2799 | NO_SYNC_WMIFLAG); | 2819 | NO_SYNC_WMIFLAG); |
2800 | } | 2820 | } |
2801 | 2821 | ||
2802 | int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u32 freq, | 2822 | int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u8 if_idx, u32 freq, |
2803 | const u8 *dst, | 2823 | const u8 *dst, const u8 *data, |
2804 | const u8 *data, u16 data_len) | 2824 | u16 data_len) |
2805 | { | 2825 | { |
2806 | struct sk_buff *skb; | 2826 | struct sk_buff *skb; |
2807 | struct wmi_p2p_probe_response_cmd *p; | 2827 | struct wmi_p2p_probe_response_cmd *p; |
@@ -2817,7 +2837,8 @@ int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u32 freq, | |||
2817 | memcpy(p->destination_addr, dst, ETH_ALEN); | 2837 | memcpy(p->destination_addr, dst, ETH_ALEN); |
2818 | p->len = cpu_to_le16(data_len); | 2838 | p->len = cpu_to_le16(data_len); |
2819 | memcpy(p->data, data, data_len); | 2839 | memcpy(p->data, data, data_len); |
2820 | return ath6kl_wmi_cmd_send(wmi, skb, WMI_SEND_PROBE_RESPONSE_CMDID, | 2840 | return ath6kl_wmi_cmd_send(wmi, if_idx, skb, |
2841 | WMI_SEND_PROBE_RESPONSE_CMDID, | ||
2821 | NO_SYNC_WMIFLAG); | 2842 | NO_SYNC_WMIFLAG); |
2822 | } | 2843 | } |
2823 | 2844 | ||
@@ -2834,7 +2855,7 @@ int ath6kl_wmi_probe_report_req_cmd(struct wmi *wmi, bool enable) | |||
2834 | enable); | 2855 | enable); |
2835 | p = (struct wmi_probe_req_report_cmd *) skb->data; | 2856 | p = (struct wmi_probe_req_report_cmd *) skb->data; |
2836 | p->enable = enable ? 1 : 0; | 2857 | p->enable = enable ? 1 : 0; |
2837 | return ath6kl_wmi_cmd_send(wmi, skb, WMI_PROBE_REQ_REPORT_CMDID, | 2858 | return ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_PROBE_REQ_REPORT_CMDID, |
2838 | NO_SYNC_WMIFLAG); | 2859 | NO_SYNC_WMIFLAG); |
2839 | } | 2860 | } |
2840 | 2861 | ||
@@ -2851,14 +2872,15 @@ int ath6kl_wmi_info_req_cmd(struct wmi *wmi, u32 info_req_flags) | |||
2851 | info_req_flags); | 2872 | info_req_flags); |
2852 | p = (struct wmi_get_p2p_info *) skb->data; | 2873 | p = (struct wmi_get_p2p_info *) skb->data; |
2853 | p->info_req_flags = cpu_to_le32(info_req_flags); | 2874 | p->info_req_flags = cpu_to_le32(info_req_flags); |
2854 | return ath6kl_wmi_cmd_send(wmi, skb, WMI_GET_P2P_INFO_CMDID, | 2875 | return ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_GET_P2P_INFO_CMDID, |
2855 | NO_SYNC_WMIFLAG); | 2876 | NO_SYNC_WMIFLAG); |
2856 | } | 2877 | } |
2857 | 2878 | ||
2858 | int ath6kl_wmi_cancel_remain_on_chnl_cmd(struct wmi *wmi) | 2879 | int ath6kl_wmi_cancel_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx) |
2859 | { | 2880 | { |
2860 | ath6kl_dbg(ATH6KL_DBG_WMI, "cancel_remain_on_chnl_cmd\n"); | 2881 | ath6kl_dbg(ATH6KL_DBG_WMI, "cancel_remain_on_chnl_cmd\n"); |
2861 | return ath6kl_wmi_simple_cmd(wmi, WMI_CANCEL_REMAIN_ON_CHNL_CMDID); | 2882 | return ath6kl_wmi_simple_cmd(wmi, if_idx, |
2883 | WMI_CANCEL_REMAIN_ON_CHNL_CMDID); | ||
2862 | } | 2884 | } |
2863 | 2885 | ||
2864 | static int ath6kl_wmi_control_rx_xtnd(struct wmi *wmi, struct sk_buff *skb) | 2886 | static int ath6kl_wmi_control_rx_xtnd(struct wmi *wmi, struct sk_buff *skb) |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h index f0ca899a3c99..83bf46c829b9 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.h +++ b/drivers/net/wireless/ath/ath6kl/wmi.h | |||
@@ -288,6 +288,8 @@ struct wmi_rx_meta_v2 { | |||
288 | u8 csum_flags; | 288 | u8 csum_flags; |
289 | } __packed; | 289 | } __packed; |
290 | 290 | ||
291 | #define WMI_CMD_HDR_IF_ID_MASK 0xF | ||
292 | |||
291 | /* Control Path */ | 293 | /* Control Path */ |
292 | struct wmi_cmd_hdr { | 294 | struct wmi_cmd_hdr { |
293 | __le16 cmd_id; | 295 | __le16 cmd_id; |
@@ -2175,10 +2177,11 @@ int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, struct sk_buff *skb, | |||
2175 | 2177 | ||
2176 | int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb); | 2178 | int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb); |
2177 | 2179 | ||
2178 | int ath6kl_wmi_cmd_send(struct wmi *wmi, struct sk_buff *skb, | 2180 | int ath6kl_wmi_cmd_send(struct wmi *wmi, u8 if_idx, struct sk_buff *skb, |
2179 | enum wmi_cmd_id cmd_id, enum wmi_sync_flag sync_flag); | 2181 | enum wmi_cmd_id cmd_id, enum wmi_sync_flag sync_flag); |
2180 | 2182 | ||
2181 | int ath6kl_wmi_connect_cmd(struct wmi *wmi, enum network_type nw_type, | 2183 | int ath6kl_wmi_connect_cmd(struct wmi *wmi, u8 if_idx, |
2184 | enum network_type nw_type, | ||
2182 | enum dot11_auth_mode dot11_auth_mode, | 2185 | enum dot11_auth_mode dot11_auth_mode, |
2183 | enum auth_mode auth_mode, | 2186 | enum auth_mode auth_mode, |
2184 | enum crypto_type pairwise_crypto, | 2187 | enum crypto_type pairwise_crypto, |
@@ -2187,24 +2190,27 @@ int ath6kl_wmi_connect_cmd(struct wmi *wmi, enum network_type nw_type, | |||
2187 | u8 group_crypto_len, int ssid_len, u8 *ssid, | 2190 | u8 group_crypto_len, int ssid_len, u8 *ssid, |
2188 | u8 *bssid, u16 channel, u32 ctrl_flags); | 2191 | u8 *bssid, u16 channel, u32 ctrl_flags); |
2189 | 2192 | ||
2190 | int ath6kl_wmi_reconnect_cmd(struct wmi *wmi, u8 *bssid, u16 channel); | 2193 | int ath6kl_wmi_reconnect_cmd(struct wmi *wmi, u8 if_idx, u8 *bssid, |
2191 | int ath6kl_wmi_disconnect_cmd(struct wmi *wmi); | 2194 | u16 channel); |
2192 | int ath6kl_wmi_startscan_cmd(struct wmi *wmi, enum wmi_scan_type scan_type, | 2195 | int ath6kl_wmi_disconnect_cmd(struct wmi *wmi, u8 if_idx); |
2196 | int ath6kl_wmi_startscan_cmd(struct wmi *wmi, u8 if_idx, | ||
2197 | enum wmi_scan_type scan_type, | ||
2193 | u32 force_fgscan, u32 is_legacy, | 2198 | u32 force_fgscan, u32 is_legacy, |
2194 | u32 home_dwell_time, u32 force_scan_interval, | 2199 | u32 home_dwell_time, u32 force_scan_interval, |
2195 | s8 num_chan, u16 *ch_list); | 2200 | s8 num_chan, u16 *ch_list); |
2196 | int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u16 fg_start_sec, | 2201 | int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u8 if_idx, u16 fg_start_sec, |
2197 | u16 fg_end_sec, u16 bg_sec, | 2202 | u16 fg_end_sec, u16 bg_sec, |
2198 | u16 minact_chdw_msec, u16 maxact_chdw_msec, | 2203 | u16 minact_chdw_msec, u16 maxact_chdw_msec, |
2199 | u16 pas_chdw_msec, u8 short_scan_ratio, | 2204 | u16 pas_chdw_msec, u8 short_scan_ratio, |
2200 | u8 scan_ctrl_flag, u32 max_dfsch_act_time, | 2205 | u8 scan_ctrl_flag, u32 max_dfsch_act_time, |
2201 | u16 maxact_scan_per_ssid); | 2206 | u16 maxact_scan_per_ssid); |
2202 | int ath6kl_wmi_bssfilter_cmd(struct wmi *wmi, u8 filter, u32 ie_mask); | 2207 | int ath6kl_wmi_bssfilter_cmd(struct wmi *wmi, u8 filter, u32 ie_mask); |
2203 | int ath6kl_wmi_probedssid_cmd(struct wmi *wmi, u8 index, u8 flag, | 2208 | int ath6kl_wmi_probedssid_cmd(struct wmi *wmi, u8 if_idx, u8 index, u8 flag, |
2204 | u8 ssid_len, u8 *ssid); | 2209 | u8 ssid_len, u8 *ssid); |
2205 | int ath6kl_wmi_listeninterval_cmd(struct wmi *wmi, u16 listen_interval, | 2210 | int ath6kl_wmi_listeninterval_cmd(struct wmi *wmi, u8 if_idx, |
2211 | u16 listen_interval, | ||
2206 | u16 listen_beacons); | 2212 | u16 listen_beacons); |
2207 | int ath6kl_wmi_powermode_cmd(struct wmi *wmi, u8 pwr_mode); | 2213 | int ath6kl_wmi_powermode_cmd(struct wmi *wmi, u8 if_idx, u8 pwr_mode); |
2208 | int ath6kl_wmi_pmparams_cmd(struct wmi *wmi, u16 idle_period, | 2214 | int ath6kl_wmi_pmparams_cmd(struct wmi *wmi, u16 idle_period, |
2209 | u16 ps_poll_num, u16 dtim_policy, | 2215 | u16 ps_poll_num, u16 dtim_policy, |
2210 | u16 tx_wakup_policy, u16 num_tx_to_wakeup, | 2216 | u16 tx_wakup_policy, u16 num_tx_to_wakeup, |
@@ -2221,16 +2227,16 @@ int ath6kl_wmi_set_lpreamble_cmd(struct wmi *wmi, u8 status, | |||
2221 | int ath6kl_wmi_get_challenge_resp_cmd(struct wmi *wmi, u32 cookie, u32 source); | 2227 | int ath6kl_wmi_get_challenge_resp_cmd(struct wmi *wmi, u32 cookie, u32 source); |
2222 | int ath6kl_wmi_config_debug_module_cmd(struct wmi *wmi, u32 valid, u32 config); | 2228 | int ath6kl_wmi_config_debug_module_cmd(struct wmi *wmi, u32 valid, u32 config); |
2223 | 2229 | ||
2224 | int ath6kl_wmi_get_stats_cmd(struct wmi *wmi); | 2230 | int ath6kl_wmi_get_stats_cmd(struct wmi *wmi, u8 if_idx); |
2225 | int ath6kl_wmi_addkey_cmd(struct wmi *wmi, u8 key_index, | 2231 | int ath6kl_wmi_addkey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index, |
2226 | enum crypto_type key_type, | 2232 | enum crypto_type key_type, |
2227 | u8 key_usage, u8 key_len, | 2233 | u8 key_usage, u8 key_len, |
2228 | u8 *key_rsc, u8 *key_material, | 2234 | u8 *key_rsc, u8 *key_material, |
2229 | u8 key_op_ctrl, u8 *mac_addr, | 2235 | u8 key_op_ctrl, u8 *mac_addr, |
2230 | enum wmi_sync_flag sync_flag); | 2236 | enum wmi_sync_flag sync_flag); |
2231 | int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 *krk); | 2237 | int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 *krk); |
2232 | int ath6kl_wmi_deletekey_cmd(struct wmi *wmi, u8 key_index); | 2238 | int ath6kl_wmi_deletekey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index); |
2233 | int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, const u8 *bssid, | 2239 | int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, u8 if_idx, const u8 *bssid, |
2234 | const u8 *pmkid, bool set); | 2240 | const u8 *pmkid, bool set); |
2235 | int ath6kl_wmi_set_tx_pwr_cmd(struct wmi *wmi, u8 dbM); | 2241 | int ath6kl_wmi_set_tx_pwr_cmd(struct wmi *wmi, u8 dbM); |
2236 | int ath6kl_wmi_get_tx_pwr_cmd(struct wmi *wmi); | 2242 | int ath6kl_wmi_get_tx_pwr_cmd(struct wmi *wmi); |
@@ -2248,38 +2254,41 @@ int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid); | |||
2248 | int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode); | 2254 | int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode); |
2249 | 2255 | ||
2250 | /* AP mode */ | 2256 | /* AP mode */ |
2251 | int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, struct wmi_connect_cmd *p); | 2257 | int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, u8 if_idx, |
2258 | struct wmi_connect_cmd *p); | ||
2252 | 2259 | ||
2253 | int ath6kl_wmi_ap_set_mlme(struct wmi *wmip, u8 cmd, const u8 *mac, u16 reason); | 2260 | int ath6kl_wmi_ap_set_mlme(struct wmi *wmip, u8 if_idx, u8 cmd, |
2261 | const u8 *mac, u16 reason); | ||
2254 | 2262 | ||
2255 | int ath6kl_wmi_set_pvb_cmd(struct wmi *wmi, u16 aid, bool flag); | 2263 | int ath6kl_wmi_set_pvb_cmd(struct wmi *wmi, u8 if_idx, u16 aid, bool flag); |
2256 | 2264 | ||
2257 | int ath6kl_wmi_set_rx_frame_format_cmd(struct wmi *wmi, u8 rx_meta_version, | 2265 | int ath6kl_wmi_set_rx_frame_format_cmd(struct wmi *wmi, u8 rx_meta_version, |
2258 | bool rx_dot11_hdr, bool defrag_on_host); | 2266 | bool rx_dot11_hdr, bool defrag_on_host); |
2259 | 2267 | ||
2260 | int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 mgmt_frm_type, const u8 *ie, | 2268 | int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 if_idx, u8 mgmt_frm_type, |
2261 | u8 ie_len); | 2269 | const u8 *ie, u8 ie_len); |
2262 | 2270 | ||
2263 | /* P2P */ | 2271 | /* P2P */ |
2264 | int ath6kl_wmi_disable_11b_rates_cmd(struct wmi *wmi, bool disable); | 2272 | int ath6kl_wmi_disable_11b_rates_cmd(struct wmi *wmi, bool disable); |
2265 | 2273 | ||
2266 | int ath6kl_wmi_remain_on_chnl_cmd(struct wmi *wmi, u32 freq, u32 dur); | 2274 | int ath6kl_wmi_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx, u32 freq, |
2275 | u32 dur); | ||
2267 | 2276 | ||
2268 | int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u32 id, u32 freq, u32 wait, | 2277 | int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq, |
2269 | const u8 *data, u16 data_len); | 2278 | u32 wait, const u8 *data, u16 data_len); |
2270 | 2279 | ||
2271 | int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u32 freq, | 2280 | int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u8 if_idx, u32 freq, |
2272 | const u8 *dst, | 2281 | const u8 *dst, const u8 *data, |
2273 | const u8 *data, u16 data_len); | 2282 | u16 data_len); |
2274 | 2283 | ||
2275 | int ath6kl_wmi_probe_report_req_cmd(struct wmi *wmi, bool enable); | 2284 | int ath6kl_wmi_probe_report_req_cmd(struct wmi *wmi, bool enable); |
2276 | 2285 | ||
2277 | int ath6kl_wmi_info_req_cmd(struct wmi *wmi, u32 info_req_flags); | 2286 | int ath6kl_wmi_info_req_cmd(struct wmi *wmi, u32 info_req_flags); |
2278 | 2287 | ||
2279 | int ath6kl_wmi_cancel_remain_on_chnl_cmd(struct wmi *wmi); | 2288 | int ath6kl_wmi_cancel_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx); |
2280 | 2289 | ||
2281 | int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 mgmt_frm_type, const u8 *ie, | 2290 | int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 if_idx, u8 mgmt_frm_type, |
2282 | u8 ie_len); | 2291 | const u8 *ie, u8 ie_len); |
2283 | 2292 | ||
2284 | void *ath6kl_wmi_init(struct ath6kl *devt); | 2293 | void *ath6kl_wmi_init(struct ath6kl *devt); |
2285 | void ath6kl_wmi_shutdown(struct wmi *wmi); | 2294 | void ath6kl_wmi_shutdown(struct wmi *wmi); |