diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2011-10-25 10:04:13 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-11-11 05:58:48 -0500 |
commit | 240d279940ef496e9456db2287b7989f6521e2e2 (patch) | |
tree | 9e5959c4db18a3849576f43d339d41ebac725e92 | |
parent | 334234b51453fe5def250bd60ea63b1f04a8e0d2 (diff) |
ath6kl: Take vif information from wmi event
Interface index is passed in wmi command header from target.
Use this index to get the appropriate vif.
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 | 105 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.h | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 24 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/debug.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/main.c | 121 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/txrx.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 193 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.h | 16 |
8 files changed, 249 insertions, 239 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 54679f22377e..29254636781b 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -123,12 +123,9 @@ static struct ieee80211_supported_band ath6kl_band_5ghz = { | |||
123 | 123 | ||
124 | #define CCKM_KRK_CIPHER_SUITE 0x004096ff /* use for KRK */ | 124 | #define CCKM_KRK_CIPHER_SUITE 0x004096ff /* use for KRK */ |
125 | 125 | ||
126 | static int ath6kl_set_wpa_version(struct ath6kl *ar, | 126 | static int ath6kl_set_wpa_version(struct ath6kl_vif *vif, |
127 | enum nl80211_wpa_versions wpa_version) | 127 | enum nl80211_wpa_versions wpa_version) |
128 | { | 128 | { |
129 | /* TODO: Findout vif */ | ||
130 | struct ath6kl_vif *vif = ar->vif; | ||
131 | |||
132 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: %u\n", __func__, wpa_version); | 129 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: %u\n", __func__, wpa_version); |
133 | 130 | ||
134 | if (!wpa_version) { | 131 | if (!wpa_version) { |
@@ -145,12 +142,9 @@ static int ath6kl_set_wpa_version(struct ath6kl *ar, | |||
145 | return 0; | 142 | return 0; |
146 | } | 143 | } |
147 | 144 | ||
148 | static int ath6kl_set_auth_type(struct ath6kl *ar, | 145 | static int ath6kl_set_auth_type(struct ath6kl_vif *vif, |
149 | enum nl80211_auth_type auth_type) | 146 | enum nl80211_auth_type auth_type) |
150 | { | 147 | { |
151 | /* TODO: Findout vif */ | ||
152 | struct ath6kl_vif *vif = ar->vif; | ||
153 | |||
154 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: 0x%x\n", __func__, auth_type); | 148 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: 0x%x\n", __func__, auth_type); |
155 | 149 | ||
156 | switch (auth_type) { | 150 | switch (auth_type) { |
@@ -176,11 +170,8 @@ static int ath6kl_set_auth_type(struct ath6kl *ar, | |||
176 | return 0; | 170 | return 0; |
177 | } | 171 | } |
178 | 172 | ||
179 | static int ath6kl_set_cipher(struct ath6kl *ar, u32 cipher, bool ucast) | 173 | static int ath6kl_set_cipher(struct ath6kl_vif *vif, u32 cipher, bool ucast) |
180 | { | 174 | { |
181 | /* TODO: Findout vif */ | ||
182 | struct ath6kl_vif *vif = ar->vif; | ||
183 | |||
184 | u8 *ar_cipher = ucast ? &vif->prwise_crypto : &vif->grp_crypto; | 175 | u8 *ar_cipher = ucast ? &vif->prwise_crypto : &vif->grp_crypto; |
185 | u8 *ar_cipher_len = ucast ? &vif->prwise_crypto_len : | 176 | u8 *ar_cipher_len = ucast ? &vif->prwise_crypto_len : |
186 | &vif->grp_crypto_len; | 177 | &vif->grp_crypto_len; |
@@ -218,11 +209,8 @@ static int ath6kl_set_cipher(struct ath6kl *ar, u32 cipher, bool ucast) | |||
218 | return 0; | 209 | return 0; |
219 | } | 210 | } |
220 | 211 | ||
221 | static void ath6kl_set_key_mgmt(struct ath6kl *ar, u32 key_mgmt) | 212 | static void ath6kl_set_key_mgmt(struct ath6kl_vif *vif, u32 key_mgmt) |
222 | { | 213 | { |
223 | /* TODO: Findout vif */ | ||
224 | struct ath6kl_vif *vif = ar->vif; | ||
225 | |||
226 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: 0x%x\n", __func__, key_mgmt); | 214 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: 0x%x\n", __func__, key_mgmt); |
227 | 215 | ||
228 | if (key_mgmt == WLAN_AKM_SUITE_PSK) { | 216 | if (key_mgmt == WLAN_AKM_SUITE_PSK) { |
@@ -376,7 +364,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
376 | return 0; | 364 | return 0; |
377 | } else if (vif->ssid_len == sme->ssid_len && | 365 | } else if (vif->ssid_len == sme->ssid_len && |
378 | !memcmp(vif->ssid, sme->ssid, vif->ssid_len)) { | 366 | !memcmp(vif->ssid, sme->ssid, vif->ssid_len)) { |
379 | ath6kl_disconnect(ar, vif->fw_vif_idx); | 367 | ath6kl_disconnect(vif); |
380 | } | 368 | } |
381 | 369 | ||
382 | memset(vif->ssid, 0, sizeof(vif->ssid)); | 370 | memset(vif->ssid, 0, sizeof(vif->ssid)); |
@@ -390,23 +378,23 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
390 | if (sme->bssid && !is_broadcast_ether_addr(sme->bssid)) | 378 | if (sme->bssid && !is_broadcast_ether_addr(sme->bssid)) |
391 | memcpy(vif->req_bssid, sme->bssid, sizeof(vif->req_bssid)); | 379 | memcpy(vif->req_bssid, sme->bssid, sizeof(vif->req_bssid)); |
392 | 380 | ||
393 | ath6kl_set_wpa_version(ar, sme->crypto.wpa_versions); | 381 | ath6kl_set_wpa_version(vif, sme->crypto.wpa_versions); |
394 | 382 | ||
395 | status = ath6kl_set_auth_type(ar, sme->auth_type); | 383 | status = ath6kl_set_auth_type(vif, sme->auth_type); |
396 | if (status) { | 384 | if (status) { |
397 | up(&ar->sem); | 385 | up(&ar->sem); |
398 | return status; | 386 | return status; |
399 | } | 387 | } |
400 | 388 | ||
401 | if (sme->crypto.n_ciphers_pairwise) | 389 | if (sme->crypto.n_ciphers_pairwise) |
402 | ath6kl_set_cipher(ar, sme->crypto.ciphers_pairwise[0], true); | 390 | ath6kl_set_cipher(vif, sme->crypto.ciphers_pairwise[0], true); |
403 | else | 391 | else |
404 | ath6kl_set_cipher(ar, 0, true); | 392 | ath6kl_set_cipher(vif, 0, true); |
405 | 393 | ||
406 | ath6kl_set_cipher(ar, sme->crypto.cipher_group, false); | 394 | ath6kl_set_cipher(vif, sme->crypto.cipher_group, false); |
407 | 395 | ||
408 | if (sme->crypto.n_akm_suites) | 396 | if (sme->crypto.n_akm_suites) |
409 | ath6kl_set_key_mgmt(ar, sme->crypto.akm_suites[0]); | 397 | ath6kl_set_key_mgmt(vif, sme->crypto.akm_suites[0]); |
410 | 398 | ||
411 | if ((sme->key_len) && | 399 | if ((sme->key_len) && |
412 | (vif->auth_mode == NONE_AUTH) && | 400 | (vif->auth_mode == NONE_AUTH) && |
@@ -438,7 +426,8 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
438 | 426 | ||
439 | if (!ar->usr_bss_filter) { | 427 | if (!ar->usr_bss_filter) { |
440 | clear_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); | 428 | clear_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); |
441 | if (ath6kl_wmi_bssfilter_cmd(ar->wmi, ALL_BSS_FILTER, 0) != 0) { | 429 | if (ath6kl_wmi_bssfilter_cmd(ar->wmi, vif->fw_vif_idx, |
430 | ALL_BSS_FILTER, 0) != 0) { | ||
442 | ath6kl_err("couldn't set bss filtering\n"); | 431 | ath6kl_err("couldn't set bss filtering\n"); |
443 | up(&ar->sem); | 432 | up(&ar->sem); |
444 | return -EIO; | 433 | return -EIO; |
@@ -491,12 +480,11 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
491 | return 0; | 480 | return 0; |
492 | } | 481 | } |
493 | 482 | ||
494 | static int ath6kl_add_bss_if_needed(struct ath6kl *ar, const u8 *bssid, | 483 | static int ath6kl_add_bss_if_needed(struct ath6kl_vif *vif, const u8 *bssid, |
495 | struct ieee80211_channel *chan, | 484 | struct ieee80211_channel *chan, |
496 | const u8 *beacon_ie, size_t beacon_ie_len) | 485 | const u8 *beacon_ie, size_t beacon_ie_len) |
497 | { | 486 | { |
498 | /* TODO: Findout vif */ | 487 | struct ath6kl *ar = vif->ar; |
499 | struct ath6kl_vif *vif = ar->vif; | ||
500 | struct cfg80211_bss *bss; | 488 | struct cfg80211_bss *bss; |
501 | u8 *ie; | 489 | u8 *ie; |
502 | 490 | ||
@@ -540,7 +528,7 @@ static int ath6kl_add_bss_if_needed(struct ath6kl *ar, const u8 *bssid, | |||
540 | return 0; | 528 | return 0; |
541 | } | 529 | } |
542 | 530 | ||
543 | void ath6kl_cfg80211_connect_event(struct ath6kl *ar, u16 channel, | 531 | void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel, |
544 | u8 *bssid, u16 listen_intvl, | 532 | u8 *bssid, u16 listen_intvl, |
545 | u16 beacon_intvl, | 533 | u16 beacon_intvl, |
546 | enum network_type nw_type, | 534 | enum network_type nw_type, |
@@ -548,8 +536,7 @@ void ath6kl_cfg80211_connect_event(struct ath6kl *ar, u16 channel, | |||
548 | u8 assoc_resp_len, u8 *assoc_info) | 536 | u8 assoc_resp_len, u8 *assoc_info) |
549 | { | 537 | { |
550 | struct ieee80211_channel *chan; | 538 | struct ieee80211_channel *chan; |
551 | /* TODO: Findout vif */ | 539 | struct ath6kl *ar = vif->ar; |
552 | struct ath6kl_vif *vif = ar->vif; | ||
553 | 540 | ||
554 | /* capinfo + listen interval */ | 541 | /* capinfo + listen interval */ |
555 | u8 assoc_req_ie_offset = sizeof(u16) + sizeof(u16); | 542 | u8 assoc_req_ie_offset = sizeof(u16) + sizeof(u16); |
@@ -592,11 +579,11 @@ void ath6kl_cfg80211_connect_event(struct ath6kl *ar, u16 channel, | |||
592 | 579 | ||
593 | 580 | ||
594 | if (nw_type & ADHOC_NETWORK) { | 581 | if (nw_type & ADHOC_NETWORK) { |
595 | cfg80211_ibss_joined(ar->net_dev, bssid, GFP_KERNEL); | 582 | cfg80211_ibss_joined(vif->ndev, bssid, GFP_KERNEL); |
596 | return; | 583 | return; |
597 | } | 584 | } |
598 | 585 | ||
599 | if (ath6kl_add_bss_if_needed(ar, bssid, chan, assoc_info, | 586 | if (ath6kl_add_bss_if_needed(vif, bssid, chan, assoc_info, |
600 | beacon_ie_len) < 0) { | 587 | beacon_ie_len) < 0) { |
601 | ath6kl_err("could not add cfg80211 bss entry for " | 588 | ath6kl_err("could not add cfg80211 bss entry for " |
602 | "connect/roamed notification\n"); | 589 | "connect/roamed notification\n"); |
@@ -606,13 +593,13 @@ void ath6kl_cfg80211_connect_event(struct ath6kl *ar, u16 channel, | |||
606 | if (vif->sme_state == SME_CONNECTING) { | 593 | if (vif->sme_state == SME_CONNECTING) { |
607 | /* inform connect result to cfg80211 */ | 594 | /* inform connect result to cfg80211 */ |
608 | vif->sme_state = SME_CONNECTED; | 595 | vif->sme_state = SME_CONNECTED; |
609 | cfg80211_connect_result(ar->net_dev, bssid, | 596 | cfg80211_connect_result(vif->ndev, bssid, |
610 | assoc_req_ie, assoc_req_len, | 597 | assoc_req_ie, assoc_req_len, |
611 | assoc_resp_ie, assoc_resp_len, | 598 | assoc_resp_ie, assoc_resp_len, |
612 | WLAN_STATUS_SUCCESS, GFP_KERNEL); | 599 | WLAN_STATUS_SUCCESS, GFP_KERNEL); |
613 | } else if (vif->sme_state == SME_CONNECTED) { | 600 | } else if (vif->sme_state == SME_CONNECTED) { |
614 | /* inform roam event to cfg80211 */ | 601 | /* inform roam event to cfg80211 */ |
615 | cfg80211_roamed(ar->net_dev, chan, bssid, | 602 | cfg80211_roamed(vif->ndev, chan, bssid, |
616 | assoc_req_ie, assoc_req_len, | 603 | assoc_req_ie, assoc_req_len, |
617 | assoc_resp_ie, assoc_resp_len, GFP_KERNEL); | 604 | assoc_resp_ie, assoc_resp_len, GFP_KERNEL); |
618 | } | 605 | } |
@@ -641,7 +628,7 @@ static int ath6kl_cfg80211_disconnect(struct wiphy *wiphy, | |||
641 | } | 628 | } |
642 | 629 | ||
643 | vif->reconnect_flag = 0; | 630 | vif->reconnect_flag = 0; |
644 | ath6kl_disconnect(ar, vif->fw_vif_idx); | 631 | ath6kl_disconnect(vif); |
645 | memset(vif->ssid, 0, sizeof(vif->ssid)); | 632 | memset(vif->ssid, 0, sizeof(vif->ssid)); |
646 | vif->ssid_len = 0; | 633 | vif->ssid_len = 0; |
647 | 634 | ||
@@ -655,12 +642,11 @@ static int ath6kl_cfg80211_disconnect(struct wiphy *wiphy, | |||
655 | return 0; | 642 | return 0; |
656 | } | 643 | } |
657 | 644 | ||
658 | void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason, | 645 | void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason, |
659 | u8 *bssid, u8 assoc_resp_len, | 646 | u8 *bssid, u8 assoc_resp_len, |
660 | u8 *assoc_info, u16 proto_reason) | 647 | u8 *assoc_info, u16 proto_reason) |
661 | { | 648 | { |
662 | /* TODO: Findout vif */ | 649 | struct ath6kl *ar = vif->ar; |
663 | struct ath6kl_vif *vif = ar->vif; | ||
664 | 650 | ||
665 | if (vif->scan_req) { | 651 | if (vif->scan_req) { |
666 | cfg80211_scan_done(vif->scan_req, true); | 652 | cfg80211_scan_done(vif->scan_req, true); |
@@ -674,7 +660,7 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason, | |||
674 | return; | 660 | return; |
675 | } | 661 | } |
676 | memset(bssid, 0, ETH_ALEN); | 662 | memset(bssid, 0, ETH_ALEN); |
677 | cfg80211_ibss_joined(ar->net_dev, bssid, GFP_KERNEL); | 663 | cfg80211_ibss_joined(vif->ndev, bssid, GFP_KERNEL); |
678 | return; | 664 | return; |
679 | } | 665 | } |
680 | 666 | ||
@@ -704,13 +690,13 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason, | |||
704 | clear_bit(CONNECT_PEND, &vif->flags); | 690 | clear_bit(CONNECT_PEND, &vif->flags); |
705 | 691 | ||
706 | if (vif->sme_state == SME_CONNECTING) { | 692 | if (vif->sme_state == SME_CONNECTING) { |
707 | cfg80211_connect_result(ar->net_dev, | 693 | cfg80211_connect_result(vif->ndev, |
708 | bssid, NULL, 0, | 694 | bssid, NULL, 0, |
709 | NULL, 0, | 695 | NULL, 0, |
710 | WLAN_STATUS_UNSPECIFIED_FAILURE, | 696 | WLAN_STATUS_UNSPECIFIED_FAILURE, |
711 | GFP_KERNEL); | 697 | GFP_KERNEL); |
712 | } else if (vif->sme_state == SME_CONNECTED) { | 698 | } else if (vif->sme_state == SME_CONNECTED) { |
713 | cfg80211_disconnected(ar->net_dev, reason, | 699 | cfg80211_disconnected(vif->ndev, reason, |
714 | NULL, 0, GFP_KERNEL); | 700 | NULL, 0, GFP_KERNEL); |
715 | } | 701 | } |
716 | 702 | ||
@@ -733,7 +719,7 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, | |||
733 | if (!ar->usr_bss_filter) { | 719 | if (!ar->usr_bss_filter) { |
734 | clear_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); | 720 | clear_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); |
735 | ret = ath6kl_wmi_bssfilter_cmd( | 721 | ret = ath6kl_wmi_bssfilter_cmd( |
736 | ar->wmi, | 722 | ar->wmi, vif->fw_vif_idx, |
737 | (test_bit(CONNECTED, &vif->flags) ? | 723 | (test_bit(CONNECTED, &vif->flags) ? |
738 | ALL_BUT_BSS_FILTER : ALL_BSS_FILTER), 0); | 724 | ALL_BUT_BSS_FILTER : ALL_BSS_FILTER), 0); |
739 | if (ret) { | 725 | if (ret) { |
@@ -804,10 +790,9 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, | |||
804 | return ret; | 790 | return ret; |
805 | } | 791 | } |
806 | 792 | ||
807 | void ath6kl_cfg80211_scan_complete_event(struct ath6kl *ar, int status) | 793 | void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, int status) |
808 | { | 794 | { |
809 | /* TODO: Findout vif */ | 795 | struct ath6kl *ar = vif->ar; |
810 | struct ath6kl_vif *vif = ar->vif; | ||
811 | int i; | 796 | int i; |
812 | 797 | ||
813 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: status %d\n", __func__, status); | 798 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: status %d\n", __func__, status); |
@@ -852,7 +837,8 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, | |||
852 | if (params->cipher == CCKM_KRK_CIPHER_SUITE) { | 837 | if (params->cipher == CCKM_KRK_CIPHER_SUITE) { |
853 | if (params->key_len != WMI_KRK_LEN) | 838 | if (params->key_len != WMI_KRK_LEN) |
854 | return -EINVAL; | 839 | return -EINVAL; |
855 | return ath6kl_wmi_add_krk_cmd(ar->wmi, params->key); | 840 | return ath6kl_wmi_add_krk_cmd(ar->wmi, vif->fw_vif_idx, |
841 | params->key); | ||
856 | } | 842 | } |
857 | 843 | ||
858 | if (key_index < WMI_MIN_KEY_INDEX || key_index > WMI_MAX_KEY_INDEX) { | 844 | if (key_index < WMI_MIN_KEY_INDEX || key_index > WMI_MAX_KEY_INDEX) { |
@@ -1079,16 +1065,13 @@ static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy, | |||
1079 | return 0; | 1065 | return 0; |
1080 | } | 1066 | } |
1081 | 1067 | ||
1082 | void ath6kl_cfg80211_tkip_micerr_event(struct ath6kl *ar, u8 keyid, | 1068 | void ath6kl_cfg80211_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid, |
1083 | bool ismcast) | 1069 | bool ismcast) |
1084 | { | 1070 | { |
1085 | /* TODO: Findout vif */ | ||
1086 | struct ath6kl_vif *vif = ar->vif; | ||
1087 | |||
1088 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, | 1071 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, |
1089 | "%s: keyid %d, ismcast %d\n", __func__, keyid, ismcast); | 1072 | "%s: keyid %d, ismcast %d\n", __func__, keyid, ismcast); |
1090 | 1073 | ||
1091 | cfg80211_michael_mic_failure(ar->net_dev, vif->bssid, | 1074 | cfg80211_michael_mic_failure(vif->ndev, vif->bssid, |
1092 | (ismcast ? NL80211_KEYTYPE_GROUP : | 1075 | (ismcast ? NL80211_KEYTYPE_GROUP : |
1093 | NL80211_KEYTYPE_PAIRWISE), keyid, NULL, | 1076 | NL80211_KEYTYPE_PAIRWISE), keyid, NULL, |
1094 | GFP_KERNEL); | 1077 | GFP_KERNEL); |
@@ -1282,18 +1265,18 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy, | |||
1282 | memcpy(vif->req_bssid, ibss_param->bssid, | 1265 | memcpy(vif->req_bssid, ibss_param->bssid, |
1283 | sizeof(vif->req_bssid)); | 1266 | sizeof(vif->req_bssid)); |
1284 | 1267 | ||
1285 | ath6kl_set_wpa_version(ar, 0); | 1268 | ath6kl_set_wpa_version(vif, 0); |
1286 | 1269 | ||
1287 | status = ath6kl_set_auth_type(ar, NL80211_AUTHTYPE_OPEN_SYSTEM); | 1270 | status = ath6kl_set_auth_type(vif, NL80211_AUTHTYPE_OPEN_SYSTEM); |
1288 | if (status) | 1271 | if (status) |
1289 | return status; | 1272 | return status; |
1290 | 1273 | ||
1291 | if (ibss_param->privacy) { | 1274 | if (ibss_param->privacy) { |
1292 | ath6kl_set_cipher(ar, WLAN_CIPHER_SUITE_WEP40, true); | 1275 | ath6kl_set_cipher(vif, WLAN_CIPHER_SUITE_WEP40, true); |
1293 | ath6kl_set_cipher(ar, WLAN_CIPHER_SUITE_WEP40, false); | 1276 | ath6kl_set_cipher(vif, WLAN_CIPHER_SUITE_WEP40, false); |
1294 | } else { | 1277 | } else { |
1295 | ath6kl_set_cipher(ar, 0, true); | 1278 | ath6kl_set_cipher(vif, 0, true); |
1296 | ath6kl_set_cipher(ar, 0, false); | 1279 | ath6kl_set_cipher(vif, 0, false); |
1297 | } | 1280 | } |
1298 | 1281 | ||
1299 | vif->nw_type = vif->next_mode; | 1282 | vif->nw_type = vif->next_mode; |
@@ -1329,7 +1312,7 @@ static int ath6kl_cfg80211_leave_ibss(struct wiphy *wiphy, | |||
1329 | if (!ath6kl_cfg80211_ready(ar)) | 1312 | if (!ath6kl_cfg80211_ready(ar)) |
1330 | return -EIO; | 1313 | return -EIO; |
1331 | 1314 | ||
1332 | ath6kl_disconnect(ar, vif->fw_vif_idx); | 1315 | ath6kl_disconnect(vif); |
1333 | memset(vif->ssid, 0, sizeof(vif->ssid)); | 1316 | memset(vif->ssid, 0, sizeof(vif->ssid)); |
1334 | vif->ssid_len = 0; | 1317 | vif->ssid_len = 0; |
1335 | 1318 | ||
@@ -1720,9 +1703,9 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev, | |||
1720 | } | 1703 | } |
1721 | if (p.prwise_crypto_type == 0) { | 1704 | if (p.prwise_crypto_type == 0) { |
1722 | p.prwise_crypto_type = NONE_CRYPT; | 1705 | p.prwise_crypto_type = NONE_CRYPT; |
1723 | ath6kl_set_cipher(ar, 0, true); | 1706 | ath6kl_set_cipher(vif, 0, true); |
1724 | } else if (info->crypto.n_ciphers_pairwise == 1) | 1707 | } else if (info->crypto.n_ciphers_pairwise == 1) |
1725 | ath6kl_set_cipher(ar, info->crypto.ciphers_pairwise[0], true); | 1708 | ath6kl_set_cipher(vif, info->crypto.ciphers_pairwise[0], true); |
1726 | 1709 | ||
1727 | switch (info->crypto.cipher_group) { | 1710 | switch (info->crypto.cipher_group) { |
1728 | case WLAN_CIPHER_SUITE_WEP40: | 1711 | case WLAN_CIPHER_SUITE_WEP40: |
@@ -1739,7 +1722,7 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev, | |||
1739 | p.grp_crypto_type = NONE_CRYPT; | 1722 | p.grp_crypto_type = NONE_CRYPT; |
1740 | break; | 1723 | break; |
1741 | } | 1724 | } |
1742 | ath6kl_set_cipher(ar, info->crypto.cipher_group, false); | 1725 | ath6kl_set_cipher(vif, info->crypto.cipher_group, false); |
1743 | 1726 | ||
1744 | p.nw_type = AP_NETWORK; | 1727 | p.nw_type = AP_NETWORK; |
1745 | vif->nw_type = vif->next_mode; | 1728 | vif->nw_type = vif->next_mode; |
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.h b/drivers/net/wireless/ath/ath6kl/cfg80211.h index 033e7423a2bd..66042f2e7adb 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.h +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.h | |||
@@ -24,20 +24,20 @@ int ath6kl_register_ieee80211_hw(struct ath6kl *ar); | |||
24 | struct ath6kl *ath6kl_core_alloc(struct device *dev); | 24 | struct ath6kl *ath6kl_core_alloc(struct device *dev); |
25 | void ath6kl_deinit_ieee80211_hw(struct ath6kl *ar); | 25 | void ath6kl_deinit_ieee80211_hw(struct ath6kl *ar); |
26 | 26 | ||
27 | void ath6kl_cfg80211_scan_complete_event(struct ath6kl *ar, int status); | 27 | void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, int status); |
28 | 28 | ||
29 | void ath6kl_cfg80211_connect_event(struct ath6kl *ar, u16 channel, | 29 | void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel, |
30 | u8 *bssid, u16 listen_intvl, | 30 | u8 *bssid, u16 listen_intvl, |
31 | u16 beacon_intvl, | 31 | u16 beacon_intvl, |
32 | enum network_type nw_type, | 32 | enum network_type nw_type, |
33 | u8 beacon_ie_len, u8 assoc_req_len, | 33 | u8 beacon_ie_len, u8 assoc_req_len, |
34 | u8 assoc_resp_len, u8 *assoc_info); | 34 | u8 assoc_resp_len, u8 *assoc_info); |
35 | 35 | ||
36 | void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason, | 36 | void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason, |
37 | u8 *bssid, u8 assoc_resp_len, | 37 | u8 *bssid, u8 assoc_resp_len, |
38 | u8 *assoc_info, u16 proto_reason); | 38 | u8 *assoc_info, u16 proto_reason); |
39 | 39 | ||
40 | void ath6kl_cfg80211_tkip_micerr_event(struct ath6kl *ar, u8 keyid, | 40 | void ath6kl_cfg80211_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid, |
41 | bool ismcast); | 41 | bool ismcast); |
42 | 42 | ||
43 | #endif /* ATH6KL_CFG80211_H */ | 43 | #endif /* ATH6KL_CFG80211_H */ |
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index f21d7776d748..3fb889892aac 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
@@ -628,32 +628,32 @@ struct ath6kl_sta *ath6kl_find_sta_by_aid(struct ath6kl *ar, u8 aid); | |||
628 | void ath6kl_ready_event(void *devt, u8 * datap, u32 sw_ver, u32 abi_ver); | 628 | void ath6kl_ready_event(void *devt, u8 * datap, u32 sw_ver, u32 abi_ver); |
629 | int ath6kl_control_tx(void *devt, struct sk_buff *skb, | 629 | int ath6kl_control_tx(void *devt, struct sk_buff *skb, |
630 | enum htc_endpoint_id eid); | 630 | enum htc_endpoint_id eid); |
631 | void ath6kl_connect_event(struct ath6kl *ar, u16 channel, | 631 | void ath6kl_connect_event(struct ath6kl_vif *vif, u16 channel, |
632 | u8 *bssid, u16 listen_int, | 632 | u8 *bssid, u16 listen_int, |
633 | u16 beacon_int, enum network_type net_type, | 633 | u16 beacon_int, enum network_type net_type, |
634 | u8 beacon_ie_len, u8 assoc_req_len, | 634 | u8 beacon_ie_len, u8 assoc_req_len, |
635 | u8 assoc_resp_len, u8 *assoc_info); | 635 | u8 assoc_resp_len, u8 *assoc_info); |
636 | void ath6kl_connect_ap_mode_bss(struct ath6kl *ar, u16 channel); | 636 | void ath6kl_connect_ap_mode_bss(struct ath6kl_vif *vif, u16 channel); |
637 | void ath6kl_connect_ap_mode_sta(struct ath6kl *ar, u16 aid, u8 *mac_addr, | 637 | void ath6kl_connect_ap_mode_sta(struct ath6kl_vif *vif, u16 aid, u8 *mac_addr, |
638 | u8 keymgmt, u8 ucipher, u8 auth, | 638 | u8 keymgmt, u8 ucipher, u8 auth, |
639 | u8 assoc_req_len, u8 *assoc_info); | 639 | u8 assoc_req_len, u8 *assoc_info); |
640 | void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, | 640 | void ath6kl_disconnect_event(struct ath6kl_vif *vif, u8 reason, |
641 | u8 *bssid, u8 assoc_resp_len, | 641 | u8 *bssid, u8 assoc_resp_len, |
642 | u8 *assoc_info, u16 prot_reason_status); | 642 | u8 *assoc_info, u16 prot_reason_status); |
643 | void ath6kl_tkip_micerr_event(struct ath6kl *ar, u8 keyid, bool ismcast); | 643 | void ath6kl_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid, bool ismcast); |
644 | void ath6kl_txpwr_rx_evt(void *devt, u8 tx_pwr); | 644 | void ath6kl_txpwr_rx_evt(void *devt, u8 tx_pwr); |
645 | void ath6kl_scan_complete_evt(struct ath6kl *ar, int status); | 645 | void ath6kl_scan_complete_evt(struct ath6kl_vif *vif, int status); |
646 | void ath6kl_tgt_stats_event(struct ath6kl *ar, u8 *ptr, u32 len); | 646 | void ath6kl_tgt_stats_event(struct ath6kl_vif *vif, u8 *ptr, u32 len); |
647 | void ath6kl_indicate_tx_activity(void *devt, u8 traffic_class, bool active); | 647 | void ath6kl_indicate_tx_activity(void *devt, u8 traffic_class, bool active); |
648 | enum htc_endpoint_id ath6kl_ac2_endpoint_id(void *devt, u8 ac); | 648 | enum htc_endpoint_id ath6kl_ac2_endpoint_id(void *devt, u8 ac); |
649 | 649 | ||
650 | void ath6kl_pspoll_event(struct ath6kl *ar, u8 aid); | 650 | void ath6kl_pspoll_event(struct ath6kl_vif *vif, u8 aid); |
651 | 651 | ||
652 | void ath6kl_dtimexpiry_event(struct ath6kl *ar); | 652 | void ath6kl_dtimexpiry_event(struct ath6kl_vif *vif); |
653 | void ath6kl_disconnect(struct ath6kl *ar, u8 if_idx); | 653 | void ath6kl_disconnect(struct ath6kl_vif *vif); |
654 | void ath6kl_deep_sleep_enable(struct ath6kl *ar); | 654 | void ath6kl_deep_sleep_enable(struct ath6kl *ar); |
655 | void aggr_recv_delba_req_evt(struct ath6kl *ar, u8 tid); | 655 | void aggr_recv_delba_req_evt(struct ath6kl_vif *vif, u8 tid); |
656 | void aggr_recv_addba_req_evt(struct ath6kl *ar, u8 tid, u16 seq_no, | 656 | void aggr_recv_addba_req_evt(struct ath6kl_vif *vif, u8 tid, u16 seq_no, |
657 | u8 win_sz); | 657 | u8 win_sz); |
658 | void ath6kl_wakeup_event(void *dev); | 658 | void ath6kl_wakeup_event(void *dev); |
659 | void ath6kl_target_failure(struct ath6kl *ar); | 659 | void ath6kl_target_failure(struct ath6kl *ar); |
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c index 870e9b1b1f43..54faa6b39e9a 100644 --- a/drivers/net/wireless/ath/ath6kl/debug.c +++ b/drivers/net/wireless/ath/ath6kl/debug.c | |||
@@ -1249,6 +1249,8 @@ static ssize_t ath6kl_create_qos_write(struct file *file, | |||
1249 | { | 1249 | { |
1250 | 1250 | ||
1251 | struct ath6kl *ar = file->private_data; | 1251 | struct ath6kl *ar = file->private_data; |
1252 | /* TODO: Findout vif */ | ||
1253 | struct ath6kl_vif *vif = ar->vif; | ||
1252 | char buf[100]; | 1254 | char buf[100]; |
1253 | ssize_t len; | 1255 | ssize_t len; |
1254 | char *sptr, *token; | 1256 | char *sptr, *token; |
@@ -1403,7 +1405,7 @@ static ssize_t ath6kl_create_qos_write(struct file *file, | |||
1403 | return -EINVAL; | 1405 | return -EINVAL; |
1404 | pstream.medium_time = cpu_to_le32(val32); | 1406 | pstream.medium_time = cpu_to_le32(val32); |
1405 | 1407 | ||
1406 | ath6kl_wmi_create_pstream_cmd(ar->wmi, &pstream); | 1408 | ath6kl_wmi_create_pstream_cmd(ar->wmi, vif->fw_vif_idx, &pstream); |
1407 | 1409 | ||
1408 | return count; | 1410 | return count; |
1409 | } | 1411 | } |
@@ -1421,6 +1423,8 @@ static ssize_t ath6kl_delete_qos_write(struct file *file, | |||
1421 | { | 1423 | { |
1422 | 1424 | ||
1423 | struct ath6kl *ar = file->private_data; | 1425 | struct ath6kl *ar = file->private_data; |
1426 | /* TODO: Findout vif */ | ||
1427 | struct ath6kl_vif *vif = ar->vif; | ||
1424 | char buf[100]; | 1428 | char buf[100]; |
1425 | ssize_t len; | 1429 | ssize_t len; |
1426 | char *sptr, *token; | 1430 | char *sptr, *token; |
@@ -1445,7 +1449,8 @@ static ssize_t ath6kl_delete_qos_write(struct file *file, | |||
1445 | if (kstrtou8(token, 0, &tsid)) | 1449 | if (kstrtou8(token, 0, &tsid)) |
1446 | return -EINVAL; | 1450 | return -EINVAL; |
1447 | 1451 | ||
1448 | ath6kl_wmi_delete_pstream_cmd(ar->wmi, traffic_class, tsid); | 1452 | ath6kl_wmi_delete_pstream_cmd(ar->wmi, vif->fw_vif_idx, |
1453 | traffic_class, tsid); | ||
1449 | 1454 | ||
1450 | return count; | 1455 | return count; |
1451 | } | 1456 | } |
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index 992990192cd9..19b64ae08e12 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, vif->fw_vif_idx); | 444 | ath6kl_disconnect(vif); |
445 | if (!keep_profile) | 445 | if (!keep_profile) |
446 | ath6kl_init_profile_info(ar); | 446 | ath6kl_init_profile_info(ar); |
447 | 447 | ||
@@ -462,7 +462,7 @@ void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile, | |||
462 | * are collected. | 462 | * are collected. |
463 | */ | 463 | */ |
464 | if (discon_issued) | 464 | if (discon_issued) |
465 | ath6kl_disconnect_event(ar, DISCONNECT_CMD, | 465 | ath6kl_disconnect_event(vif, DISCONNECT_CMD, |
466 | (vif->nw_type & AP_NETWORK) ? | 466 | (vif->nw_type & AP_NETWORK) ? |
467 | bcast_mac : vif->bssid, | 467 | bcast_mac : vif->bssid, |
468 | 0, NULL, 0); | 468 | 0, NULL, 0); |
@@ -498,10 +498,8 @@ void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile, | |||
498 | ath6kl_reset_device(ar, ar->target_type, true, true); | 498 | ath6kl_reset_device(ar, ar->target_type, true, true); |
499 | } | 499 | } |
500 | 500 | ||
501 | static void ath6kl_install_static_wep_keys(struct ath6kl *ar) | 501 | static void ath6kl_install_static_wep_keys(struct ath6kl_vif *vif) |
502 | { | 502 | { |
503 | /* TODO: Findout vif */ | ||
504 | struct ath6kl_vif *vif = ar->vif; | ||
505 | u8 index; | 503 | u8 index; |
506 | u8 keyusage; | 504 | u8 keyusage; |
507 | 505 | ||
@@ -511,7 +509,7 @@ static void ath6kl_install_static_wep_keys(struct ath6kl *ar) | |||
511 | if (index == vif->def_txkey_index) | 509 | if (index == vif->def_txkey_index) |
512 | keyusage |= TX_USAGE; | 510 | keyusage |= TX_USAGE; |
513 | 511 | ||
514 | ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, | 512 | ath6kl_wmi_addkey_cmd(vif->ar->wmi, vif->fw_vif_idx, |
515 | index, | 513 | index, |
516 | WEP_CRYPT, | 514 | WEP_CRYPT, |
517 | keyusage, | 515 | keyusage, |
@@ -524,13 +522,12 @@ static void ath6kl_install_static_wep_keys(struct ath6kl *ar) | |||
524 | } | 522 | } |
525 | } | 523 | } |
526 | 524 | ||
527 | void ath6kl_connect_ap_mode_bss(struct ath6kl *ar, u16 channel) | 525 | void ath6kl_connect_ap_mode_bss(struct ath6kl_vif *vif, u16 channel) |
528 | { | 526 | { |
527 | struct ath6kl *ar = vif->ar; | ||
529 | struct ath6kl_req_key *ik; | 528 | struct ath6kl_req_key *ik; |
530 | int res; | 529 | int res; |
531 | u8 key_rsc[ATH6KL_KEY_SEQ_LEN]; | 530 | u8 key_rsc[ATH6KL_KEY_SEQ_LEN]; |
532 | /* TODO: Pass vif instead of taking it from ar */ | ||
533 | struct ath6kl_vif *vif = ar->vif; | ||
534 | 531 | ||
535 | ik = &ar->ap_mode_bkey; | 532 | ik = &ar->ap_mode_bkey; |
536 | 533 | ||
@@ -539,7 +536,7 @@ void ath6kl_connect_ap_mode_bss(struct ath6kl *ar, u16 channel) | |||
539 | switch (vif->auth_mode) { | 536 | switch (vif->auth_mode) { |
540 | case NONE_AUTH: | 537 | case NONE_AUTH: |
541 | if (vif->prwise_crypto == WEP_CRYPT) | 538 | if (vif->prwise_crypto == WEP_CRYPT) |
542 | ath6kl_install_static_wep_keys(ar); | 539 | ath6kl_install_static_wep_keys(vif); |
543 | break; | 540 | break; |
544 | case WPA_PSK_AUTH: | 541 | case WPA_PSK_AUTH: |
545 | case WPA2_PSK_AUTH: | 542 | case WPA2_PSK_AUTH: |
@@ -561,15 +558,16 @@ void ath6kl_connect_ap_mode_bss(struct ath6kl *ar, u16 channel) | |||
561 | break; | 558 | break; |
562 | } | 559 | } |
563 | 560 | ||
564 | ath6kl_wmi_bssfilter_cmd(ar->wmi, NONE_BSS_FILTER, 0); | 561 | ath6kl_wmi_bssfilter_cmd(ar->wmi, vif->fw_vif_idx, NONE_BSS_FILTER, 0); |
565 | set_bit(CONNECTED, &vif->flags); | 562 | set_bit(CONNECTED, &vif->flags); |
566 | netif_carrier_on(ar->net_dev); | 563 | netif_carrier_on(vif->ndev); |
567 | } | 564 | } |
568 | 565 | ||
569 | void ath6kl_connect_ap_mode_sta(struct ath6kl *ar, u16 aid, u8 *mac_addr, | 566 | void ath6kl_connect_ap_mode_sta(struct ath6kl_vif *vif, u16 aid, u8 *mac_addr, |
570 | u8 keymgmt, u8 ucipher, u8 auth, | 567 | u8 keymgmt, u8 ucipher, u8 auth, |
571 | u8 assoc_req_len, u8 *assoc_info) | 568 | u8 assoc_req_len, u8 *assoc_info) |
572 | { | 569 | { |
570 | struct ath6kl *ar = vif->ar; | ||
573 | u8 *ies = NULL, *wpa_ie = NULL, *pos; | 571 | u8 *ies = NULL, *wpa_ie = NULL, *pos; |
574 | size_t ies_len = 0; | 572 | size_t ies_len = 0; |
575 | struct station_info sinfo; | 573 | struct station_info sinfo; |
@@ -624,9 +622,9 @@ void ath6kl_connect_ap_mode_sta(struct ath6kl *ar, u16 aid, u8 *mac_addr, | |||
624 | sinfo.assoc_req_ies_len = ies_len; | 622 | sinfo.assoc_req_ies_len = ies_len; |
625 | sinfo.filled |= STATION_INFO_ASSOC_REQ_IES; | 623 | sinfo.filled |= STATION_INFO_ASSOC_REQ_IES; |
626 | 624 | ||
627 | cfg80211_new_sta(ar->net_dev, mac_addr, &sinfo, GFP_KERNEL); | 625 | cfg80211_new_sta(vif->ndev, mac_addr, &sinfo, GFP_KERNEL); |
628 | 626 | ||
629 | netif_wake_queue(ar->net_dev); | 627 | netif_wake_queue(vif->ndev); |
630 | } | 628 | } |
631 | 629 | ||
632 | /* Functions for Tx credit handling */ | 630 | /* Functions for Tx credit handling */ |
@@ -916,17 +914,14 @@ void disconnect_timer_handler(unsigned long ptr) | |||
916 | struct ath6kl_vif *vif = netdev_priv(dev); | 914 | struct ath6kl_vif *vif = netdev_priv(dev); |
917 | 915 | ||
918 | ath6kl_init_profile_info(vif->ar); | 916 | ath6kl_init_profile_info(vif->ar); |
919 | ath6kl_disconnect(vif->ar, vif->fw_vif_idx); | 917 | ath6kl_disconnect(vif); |
920 | } | 918 | } |
921 | 919 | ||
922 | void ath6kl_disconnect(struct ath6kl *ar, u8 if_idx) | 920 | void ath6kl_disconnect(struct ath6kl_vif *vif) |
923 | { | 921 | { |
924 | /* TODO: Pass vif instead of taking it from ar */ | ||
925 | struct ath6kl_vif *vif = ar->vif; | ||
926 | |||
927 | if (test_bit(CONNECTED, &vif->flags) || | 922 | if (test_bit(CONNECTED, &vif->flags) || |
928 | test_bit(CONNECT_PEND, &vif->flags)) { | 923 | test_bit(CONNECT_PEND, &vif->flags)) { |
929 | ath6kl_wmi_disconnect_cmd(ar->wmi, if_idx); | 924 | ath6kl_wmi_disconnect_cmd(vif->ar->wmi, vif->fw_vif_idx); |
930 | /* | 925 | /* |
931 | * Disconnect command is issued, clear the connect pending | 926 | * Disconnect command is issued, clear the connect pending |
932 | * flag. The connected flag will be cleared in | 927 | * flag. The connected flag will be cleared in |
@@ -971,7 +966,7 @@ void ath6kl_deep_sleep_enable(struct ath6kl *ar) | |||
971 | printk(KERN_WARNING "ath6kl: failed to disable scan " | 966 | printk(KERN_WARNING "ath6kl: failed to disable scan " |
972 | "during suspend\n"); | 967 | "during suspend\n"); |
973 | 968 | ||
974 | ath6kl_cfg80211_scan_complete_event(ar, -ECANCELED); | 969 | ath6kl_cfg80211_scan_complete_event(vif, -ECANCELED); |
975 | 970 | ||
976 | /* save the current power mode before enabling power save */ | 971 | /* save the current power mode before enabling power save */ |
977 | ar->wmi->saved_pwr_mode = ar->wmi->pwr_mode; | 972 | ar->wmi->saved_pwr_mode = ar->wmi->pwr_mode; |
@@ -1027,31 +1022,30 @@ void ath6kl_ready_event(void *devt, u8 *datap, u32 sw_ver, u32 abi_ver) | |||
1027 | test_bit(TESTMODE, &ar->flag) ? " testmode" : ""); | 1022 | test_bit(TESTMODE, &ar->flag) ? " testmode" : ""); |
1028 | } | 1023 | } |
1029 | 1024 | ||
1030 | void ath6kl_scan_complete_evt(struct ath6kl *ar, int status) | 1025 | void ath6kl_scan_complete_evt(struct ath6kl_vif *vif, int status) |
1031 | { | 1026 | { |
1032 | /* TODO: Pass vif instead of taking it from ar */ | 1027 | struct ath6kl *ar = vif->ar; |
1033 | struct ath6kl_vif *vif = ar->vif; | ||
1034 | 1028 | ||
1035 | ath6kl_cfg80211_scan_complete_event(ar, status); | 1029 | ath6kl_cfg80211_scan_complete_event(vif, status); |
1036 | 1030 | ||
1037 | if (!ar->usr_bss_filter) { | 1031 | if (!ar->usr_bss_filter) { |
1038 | clear_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); | 1032 | clear_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); |
1039 | ath6kl_wmi_bssfilter_cmd(ar->wmi, NONE_BSS_FILTER, 0); | 1033 | ath6kl_wmi_bssfilter_cmd(ar->wmi, vif->fw_vif_idx, |
1034 | NONE_BSS_FILTER, 0); | ||
1040 | } | 1035 | } |
1041 | 1036 | ||
1042 | ath6kl_dbg(ATH6KL_DBG_WLAN_SCAN, "scan complete: %d\n", status); | 1037 | ath6kl_dbg(ATH6KL_DBG_WLAN_SCAN, "scan complete: %d\n", status); |
1043 | } | 1038 | } |
1044 | 1039 | ||
1045 | void ath6kl_connect_event(struct ath6kl *ar, u16 channel, u8 *bssid, | 1040 | void ath6kl_connect_event(struct ath6kl_vif *vif, u16 channel, u8 *bssid, |
1046 | u16 listen_int, u16 beacon_int, | 1041 | u16 listen_int, u16 beacon_int, |
1047 | enum network_type net_type, u8 beacon_ie_len, | 1042 | enum network_type net_type, u8 beacon_ie_len, |
1048 | u8 assoc_req_len, u8 assoc_resp_len, | 1043 | u8 assoc_req_len, u8 assoc_resp_len, |
1049 | u8 *assoc_info) | 1044 | u8 *assoc_info) |
1050 | { | 1045 | { |
1051 | /* TODO: findout vif instead of taking it from ar */ | 1046 | struct ath6kl *ar = vif->ar; |
1052 | struct ath6kl_vif *vif = ar->vif; | ||
1053 | 1047 | ||
1054 | ath6kl_cfg80211_connect_event(ar, channel, bssid, | 1048 | ath6kl_cfg80211_connect_event(vif, channel, bssid, |
1055 | listen_int, beacon_int, | 1049 | listen_int, beacon_int, |
1056 | net_type, beacon_ie_len, | 1050 | net_type, beacon_ie_len, |
1057 | assoc_req_len, assoc_resp_len, | 1051 | assoc_req_len, assoc_resp_len, |
@@ -1065,13 +1059,13 @@ void ath6kl_connect_event(struct ath6kl *ar, u16 channel, u8 *bssid, | |||
1065 | ar->listen_intvl_t, | 1059 | ar->listen_intvl_t, |
1066 | ar->listen_intvl_b); | 1060 | ar->listen_intvl_b); |
1067 | 1061 | ||
1068 | netif_wake_queue(ar->net_dev); | 1062 | netif_wake_queue(vif->ndev); |
1069 | 1063 | ||
1070 | /* Update connect & link status atomically */ | 1064 | /* Update connect & link status atomically */ |
1071 | spin_lock_bh(&ar->lock); | 1065 | spin_lock_bh(&ar->lock); |
1072 | set_bit(CONNECTED, &vif->flags); | 1066 | set_bit(CONNECTED, &vif->flags); |
1073 | clear_bit(CONNECT_PEND, &vif->flags); | 1067 | clear_bit(CONNECT_PEND, &vif->flags); |
1074 | netif_carrier_on(ar->net_dev); | 1068 | netif_carrier_on(vif->ndev); |
1075 | spin_unlock_bh(&ar->lock); | 1069 | spin_unlock_bh(&ar->lock); |
1076 | 1070 | ||
1077 | aggr_reset_state(vif->aggr_cntxt); | 1071 | aggr_reset_state(vif->aggr_cntxt); |
@@ -1085,16 +1079,17 @@ void ath6kl_connect_event(struct ath6kl *ar, u16 channel, u8 *bssid, | |||
1085 | 1079 | ||
1086 | if (!ar->usr_bss_filter) { | 1080 | if (!ar->usr_bss_filter) { |
1087 | set_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); | 1081 | set_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); |
1088 | ath6kl_wmi_bssfilter_cmd(ar->wmi, CURRENT_BSS_FILTER, 0); | 1082 | ath6kl_wmi_bssfilter_cmd(ar->wmi, vif->fw_vif_idx, |
1083 | CURRENT_BSS_FILTER, 0); | ||
1089 | } | 1084 | } |
1090 | } | 1085 | } |
1091 | 1086 | ||
1092 | void ath6kl_tkip_micerr_event(struct ath6kl *ar, u8 keyid, bool ismcast) | 1087 | void ath6kl_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid, bool ismcast) |
1093 | { | 1088 | { |
1094 | struct ath6kl_sta *sta; | 1089 | struct ath6kl_sta *sta; |
1095 | /* TODO: Findout vif */ | 1090 | struct ath6kl *ar = vif->ar; |
1096 | struct ath6kl_vif *vif = ar->vif; | ||
1097 | u8 tsc[6]; | 1091 | u8 tsc[6]; |
1092 | |||
1098 | /* | 1093 | /* |
1099 | * For AP case, keyid will have aid of STA which sent pkt with | 1094 | * For AP case, keyid will have aid of STA which sent pkt with |
1100 | * MIC error. Use this aid to get MAC & send it to hostapd. | 1095 | * MIC error. Use this aid to get MAC & send it to hostapd. |
@@ -1108,20 +1103,19 @@ void ath6kl_tkip_micerr_event(struct ath6kl *ar, u8 keyid, bool ismcast) | |||
1108 | "ap tkip mic error received from aid=%d\n", keyid); | 1103 | "ap tkip mic error received from aid=%d\n", keyid); |
1109 | 1104 | ||
1110 | memset(tsc, 0, sizeof(tsc)); /* FIX: get correct TSC */ | 1105 | memset(tsc, 0, sizeof(tsc)); /* FIX: get correct TSC */ |
1111 | cfg80211_michael_mic_failure(ar->net_dev, sta->mac, | 1106 | cfg80211_michael_mic_failure(vif->ndev, sta->mac, |
1112 | NL80211_KEYTYPE_PAIRWISE, keyid, | 1107 | NL80211_KEYTYPE_PAIRWISE, keyid, |
1113 | tsc, GFP_KERNEL); | 1108 | tsc, GFP_KERNEL); |
1114 | } else | 1109 | } else |
1115 | ath6kl_cfg80211_tkip_micerr_event(ar, keyid, ismcast); | 1110 | ath6kl_cfg80211_tkip_micerr_event(vif, keyid, ismcast); |
1116 | 1111 | ||
1117 | } | 1112 | } |
1118 | 1113 | ||
1119 | static void ath6kl_update_target_stats(struct ath6kl *ar, u8 *ptr, u32 len) | 1114 | static void ath6kl_update_target_stats(struct ath6kl_vif *vif, u8 *ptr, u32 len) |
1120 | { | 1115 | { |
1121 | struct wmi_target_stats *tgt_stats = | 1116 | struct wmi_target_stats *tgt_stats = |
1122 | (struct wmi_target_stats *) ptr; | 1117 | (struct wmi_target_stats *) ptr; |
1123 | /* TODO: Findout vif */ | 1118 | struct ath6kl *ar = vif->ar; |
1124 | struct ath6kl_vif *vif = ar->vif; | ||
1125 | struct target_stats *stats = &vif->target_stats; | 1119 | struct target_stats *stats = &vif->target_stats; |
1126 | struct tkip_ccmp_stats *ccmp_stats; | 1120 | struct tkip_ccmp_stats *ccmp_stats; |
1127 | u8 ac; | 1121 | u8 ac; |
@@ -1229,13 +1223,12 @@ static void ath6kl_add_le32(__le32 *var, __le32 val) | |||
1229 | *var = cpu_to_le32(le32_to_cpu(*var) + le32_to_cpu(val)); | 1223 | *var = cpu_to_le32(le32_to_cpu(*var) + le32_to_cpu(val)); |
1230 | } | 1224 | } |
1231 | 1225 | ||
1232 | void ath6kl_tgt_stats_event(struct ath6kl *ar, u8 *ptr, u32 len) | 1226 | void ath6kl_tgt_stats_event(struct ath6kl_vif *vif, u8 *ptr, u32 len) |
1233 | { | 1227 | { |
1234 | struct wmi_ap_mode_stat *p = (struct wmi_ap_mode_stat *) ptr; | 1228 | struct wmi_ap_mode_stat *p = (struct wmi_ap_mode_stat *) ptr; |
1229 | struct ath6kl *ar = vif->ar; | ||
1235 | struct wmi_ap_mode_stat *ap = &ar->ap_stats; | 1230 | struct wmi_ap_mode_stat *ap = &ar->ap_stats; |
1236 | struct wmi_per_sta_stat *st_ap, *st_p; | 1231 | struct wmi_per_sta_stat *st_ap, *st_p; |
1237 | /* TODO: Findout vif */ | ||
1238 | struct ath6kl_vif *vif = ar->vif; | ||
1239 | u8 ac; | 1232 | u8 ac; |
1240 | 1233 | ||
1241 | if (vif->nw_type == AP_NETWORK) { | 1234 | if (vif->nw_type == AP_NETWORK) { |
@@ -1257,7 +1250,7 @@ void ath6kl_tgt_stats_event(struct ath6kl *ar, u8 *ptr, u32 len) | |||
1257 | } | 1250 | } |
1258 | 1251 | ||
1259 | } else { | 1252 | } else { |
1260 | ath6kl_update_target_stats(ar, ptr, len); | 1253 | ath6kl_update_target_stats(vif, ptr, len); |
1261 | } | 1254 | } |
1262 | } | 1255 | } |
1263 | 1256 | ||
@@ -1276,13 +1269,12 @@ void ath6kl_txpwr_rx_evt(void *devt, u8 tx_pwr) | |||
1276 | wake_up(&ar->event_wq); | 1269 | wake_up(&ar->event_wq); |
1277 | } | 1270 | } |
1278 | 1271 | ||
1279 | void ath6kl_pspoll_event(struct ath6kl *ar, u8 aid) | 1272 | void ath6kl_pspoll_event(struct ath6kl_vif *vif, u8 aid) |
1280 | { | 1273 | { |
1281 | struct ath6kl_sta *conn; | 1274 | struct ath6kl_sta *conn; |
1282 | struct sk_buff *skb; | 1275 | struct sk_buff *skb; |
1283 | bool psq_empty = false; | 1276 | bool psq_empty = false; |
1284 | /* TODO: Pass vif instead of taking it from ar */ | 1277 | struct ath6kl *ar = vif->ar; |
1285 | struct ath6kl_vif *vif = ar->vif; | ||
1286 | 1278 | ||
1287 | conn = ath6kl_find_sta_by_aid(ar, aid); | 1279 | conn = ath6kl_find_sta_by_aid(ar, aid); |
1288 | 1280 | ||
@@ -1305,7 +1297,7 @@ void ath6kl_pspoll_event(struct ath6kl *ar, u8 aid) | |||
1305 | spin_unlock_bh(&conn->psq_lock); | 1297 | spin_unlock_bh(&conn->psq_lock); |
1306 | 1298 | ||
1307 | conn->sta_flags |= STA_PS_POLLED; | 1299 | conn->sta_flags |= STA_PS_POLLED; |
1308 | ath6kl_data_tx(skb, ar->net_dev); | 1300 | ath6kl_data_tx(skb, vif->ndev); |
1309 | conn->sta_flags &= ~STA_PS_POLLED; | 1301 | conn->sta_flags &= ~STA_PS_POLLED; |
1310 | 1302 | ||
1311 | spin_lock_bh(&conn->psq_lock); | 1303 | spin_lock_bh(&conn->psq_lock); |
@@ -1316,12 +1308,11 @@ void ath6kl_pspoll_event(struct ath6kl *ar, u8 aid) | |||
1316 | ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, conn->aid, 0); | 1308 | ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, conn->aid, 0); |
1317 | } | 1309 | } |
1318 | 1310 | ||
1319 | void ath6kl_dtimexpiry_event(struct ath6kl *ar) | 1311 | void ath6kl_dtimexpiry_event(struct ath6kl_vif *vif) |
1320 | { | 1312 | { |
1321 | bool mcastq_empty = false; | 1313 | bool mcastq_empty = false; |
1322 | struct sk_buff *skb; | 1314 | struct sk_buff *skb; |
1323 | /* TODO: Pass vif instead of taking it from ar */ | 1315 | struct ath6kl *ar = vif->ar; |
1324 | struct ath6kl_vif *vif = ar->vif; | ||
1325 | 1316 | ||
1326 | /* | 1317 | /* |
1327 | * If there are no associated STAs, ignore the DTIM expiry event. | 1318 | * If there are no associated STAs, ignore the DTIM expiry event. |
@@ -1349,7 +1340,7 @@ void ath6kl_dtimexpiry_event(struct ath6kl *ar) | |||
1349 | while ((skb = skb_dequeue(&ar->mcastpsq)) != NULL) { | 1340 | while ((skb = skb_dequeue(&ar->mcastpsq)) != NULL) { |
1350 | spin_unlock_bh(&ar->mcastpsq_lock); | 1341 | spin_unlock_bh(&ar->mcastpsq_lock); |
1351 | 1342 | ||
1352 | ath6kl_data_tx(skb, ar->net_dev); | 1343 | ath6kl_data_tx(skb, vif->ndev); |
1353 | 1344 | ||
1354 | spin_lock_bh(&ar->mcastpsq_lock); | 1345 | spin_lock_bh(&ar->mcastpsq_lock); |
1355 | } | 1346 | } |
@@ -1361,12 +1352,11 @@ void ath6kl_dtimexpiry_event(struct ath6kl *ar) | |||
1361 | ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, MCAST_AID, 0); | 1352 | ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, MCAST_AID, 0); |
1362 | } | 1353 | } |
1363 | 1354 | ||
1364 | void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid, | 1355 | void ath6kl_disconnect_event(struct ath6kl_vif *vif, u8 reason, u8 *bssid, |
1365 | u8 assoc_resp_len, u8 *assoc_info, | 1356 | u8 assoc_resp_len, u8 *assoc_info, |
1366 | u16 prot_reason_status) | 1357 | u16 prot_reason_status) |
1367 | { | 1358 | { |
1368 | /* TODO: Findout vif instead of taking it from ar */ | 1359 | struct ath6kl *ar = vif->ar; |
1369 | struct ath6kl_vif *vif = ar->vif; | ||
1370 | 1360 | ||
1371 | if (vif->nw_type == AP_NETWORK) { | 1361 | if (vif->nw_type == AP_NETWORK) { |
1372 | if (!ath6kl_remove_sta(ar, bssid, prot_reason_status)) | 1362 | if (!ath6kl_remove_sta(ar, bssid, prot_reason_status)) |
@@ -1386,17 +1376,17 @@ void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid, | |||
1386 | 1376 | ||
1387 | if (!is_broadcast_ether_addr(bssid)) { | 1377 | if (!is_broadcast_ether_addr(bssid)) { |
1388 | /* send event to application */ | 1378 | /* send event to application */ |
1389 | cfg80211_del_sta(ar->net_dev, bssid, GFP_KERNEL); | 1379 | cfg80211_del_sta(vif->ndev, bssid, GFP_KERNEL); |
1390 | } | 1380 | } |
1391 | 1381 | ||
1392 | if (memcmp(ar->net_dev->dev_addr, bssid, ETH_ALEN) == 0) { | 1382 | if (memcmp(vif->ndev->dev_addr, bssid, ETH_ALEN) == 0) { |
1393 | memset(vif->wep_key_list, 0, sizeof(vif->wep_key_list)); | 1383 | memset(vif->wep_key_list, 0, sizeof(vif->wep_key_list)); |
1394 | clear_bit(CONNECTED, &vif->flags); | 1384 | clear_bit(CONNECTED, &vif->flags); |
1395 | } | 1385 | } |
1396 | return; | 1386 | return; |
1397 | } | 1387 | } |
1398 | 1388 | ||
1399 | ath6kl_cfg80211_disconnect_event(ar, reason, bssid, | 1389 | ath6kl_cfg80211_disconnect_event(vif, reason, bssid, |
1400 | assoc_resp_len, assoc_info, | 1390 | assoc_resp_len, assoc_info, |
1401 | prot_reason_status); | 1391 | prot_reason_status); |
1402 | 1392 | ||
@@ -1414,7 +1404,8 @@ void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid, | |||
1414 | */ | 1404 | */ |
1415 | if (reason == DISCONNECT_CMD) { | 1405 | if (reason == DISCONNECT_CMD) { |
1416 | if (!ar->usr_bss_filter && test_bit(WMI_READY, &ar->flag)) | 1406 | if (!ar->usr_bss_filter && test_bit(WMI_READY, &ar->flag)) |
1417 | ath6kl_wmi_bssfilter_cmd(ar->wmi, NONE_BSS_FILTER, 0); | 1407 | ath6kl_wmi_bssfilter_cmd(ar->wmi, vif->fw_vif_idx, |
1408 | NONE_BSS_FILTER, 0); | ||
1418 | } else { | 1409 | } else { |
1419 | set_bit(CONNECT_PEND, &vif->flags); | 1410 | set_bit(CONNECT_PEND, &vif->flags); |
1420 | if (((reason == ASSOC_FAILED) && | 1411 | if (((reason == ASSOC_FAILED) && |
@@ -1429,7 +1420,7 @@ void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid, | |||
1429 | /* update connect & link status atomically */ | 1420 | /* update connect & link status atomically */ |
1430 | spin_lock_bh(&ar->lock); | 1421 | spin_lock_bh(&ar->lock); |
1431 | clear_bit(CONNECTED, &vif->flags); | 1422 | clear_bit(CONNECTED, &vif->flags); |
1432 | netif_carrier_off(ar->net_dev); | 1423 | netif_carrier_off(vif->ndev); |
1433 | spin_unlock_bh(&ar->lock); | 1424 | spin_unlock_bh(&ar->lock); |
1434 | 1425 | ||
1435 | if ((reason != CSERV_DISCONNECT) || (vif->reconnect_flag != 1)) | 1426 | if ((reason != CSERV_DISCONNECT) || (vif->reconnect_flag != 1)) |
@@ -1438,7 +1429,7 @@ void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid, | |||
1438 | if (reason != CSERV_DISCONNECT) | 1429 | if (reason != CSERV_DISCONNECT) |
1439 | ar->user_key_ctrl = 0; | 1430 | ar->user_key_ctrl = 0; |
1440 | 1431 | ||
1441 | netif_stop_queue(ar->net_dev); | 1432 | netif_stop_queue(vif->ndev); |
1442 | memset(vif->bssid, 0, sizeof(vif->bssid)); | 1433 | memset(vif->bssid, 0, sizeof(vif->bssid)); |
1443 | vif->bss_ch = 0; | 1434 | vif->bss_ch = 0; |
1444 | 1435 | ||
@@ -1472,7 +1463,7 @@ static int ath6kl_close(struct net_device *dev) | |||
1472 | 1463 | ||
1473 | netif_stop_queue(dev); | 1464 | netif_stop_queue(dev); |
1474 | 1465 | ||
1475 | ath6kl_disconnect(ar, vif->fw_vif_idx); | 1466 | ath6kl_disconnect(vif); |
1476 | 1467 | ||
1477 | if (test_bit(WMI_READY, &ar->flag)) { | 1468 | if (test_bit(WMI_READY, &ar->flag)) { |
1478 | if (ath6kl_wmi_scanparams_cmd(ar->wmi, vif->fw_vif_idx, 0xFFFF, | 1469 | if (ath6kl_wmi_scanparams_cmd(ar->wmi, vif->fw_vif_idx, 0xFFFF, |
@@ -1482,7 +1473,7 @@ static int ath6kl_close(struct net_device *dev) | |||
1482 | clear_bit(WLAN_ENABLED, &vif->flags); | 1473 | clear_bit(WLAN_ENABLED, &vif->flags); |
1483 | } | 1474 | } |
1484 | 1475 | ||
1485 | ath6kl_cfg80211_scan_complete_event(ar, -ECANCELED); | 1476 | ath6kl_cfg80211_scan_complete_event(vif, -ECANCELED); |
1486 | 1477 | ||
1487 | return 0; | 1478 | return 0; |
1488 | } | 1479 | } |
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index c54f1a9989fa..50ff9a42401c 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c | |||
@@ -287,7 +287,8 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev) | |||
287 | chk_adhoc_ps_mapping = true; | 287 | chk_adhoc_ps_mapping = true; |
288 | else { | 288 | else { |
289 | /* get the stream mapping */ | 289 | /* get the stream mapping */ |
290 | ret = ath6kl_wmi_implicit_create_pstream(ar->wmi, skb, | 290 | ret = ath6kl_wmi_implicit_create_pstream(ar->wmi, |
291 | vif->fw_vif_idx, skb, | ||
291 | 0, test_bit(WMM_ENABLED, &vif->flags), &ac); | 292 | 0, test_bit(WMM_ENABLED, &vif->flags), &ac); |
292 | if (ret) | 293 | if (ret) |
293 | goto fail_tx; | 294 | goto fail_tx; |
@@ -1354,10 +1355,9 @@ static void aggr_delete_tid_state(struct aggr_info *p_aggr, u8 tid) | |||
1354 | memset(stats, 0, sizeof(struct rxtid_stats)); | 1355 | memset(stats, 0, sizeof(struct rxtid_stats)); |
1355 | } | 1356 | } |
1356 | 1357 | ||
1357 | void aggr_recv_addba_req_evt(struct ath6kl *ar, u8 tid, u16 seq_no, u8 win_sz) | 1358 | void aggr_recv_addba_req_evt(struct ath6kl_vif *vif, u8 tid, u16 seq_no, |
1359 | u8 win_sz) | ||
1358 | { | 1360 | { |
1359 | /* TODO: Findout vif */ | ||
1360 | struct ath6kl_vif *vif = ar->vif; | ||
1361 | struct aggr_info *p_aggr = vif->aggr_cntxt; | 1361 | struct aggr_info *p_aggr = vif->aggr_cntxt; |
1362 | struct rxtid *rxtid; | 1362 | struct rxtid *rxtid; |
1363 | struct rxtid_stats *stats; | 1363 | struct rxtid_stats *stats; |
@@ -1425,10 +1425,8 @@ struct aggr_info *aggr_init(struct net_device *dev) | |||
1425 | return p_aggr; | 1425 | return p_aggr; |
1426 | } | 1426 | } |
1427 | 1427 | ||
1428 | void aggr_recv_delba_req_evt(struct ath6kl *ar, u8 tid) | 1428 | void aggr_recv_delba_req_evt(struct ath6kl_vif *vif, u8 tid) |
1429 | { | 1429 | { |
1430 | /* TODO: Findout vif */ | ||
1431 | struct ath6kl_vif *vif = ar->vif; | ||
1432 | struct aggr_info *p_aggr = vif->aggr_cntxt; | 1430 | struct aggr_info *p_aggr = vif->aggr_cntxt; |
1433 | struct rxtid *rxtid; | 1431 | struct rxtid *rxtid; |
1434 | 1432 | ||
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index a4ad7cbd5eb0..ed092b77ef6b 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "../regd.h" | 21 | #include "../regd.h" |
22 | #include "../regd_common.h" | 22 | #include "../regd_common.h" |
23 | 23 | ||
24 | static int ath6kl_wmi_sync_point(struct wmi *wmi); | 24 | static int ath6kl_wmi_sync_point(struct wmi *wmi, u8 if_idx); |
25 | 25 | ||
26 | static const s32 wmi_rate_tbl[][2] = { | 26 | static const s32 wmi_rate_tbl[][2] = { |
27 | /* {W/O SGI, with SGI} */ | 27 | /* {W/O SGI, with SGI} */ |
@@ -81,6 +81,14 @@ enum htc_endpoint_id ath6kl_wmi_get_control_ep(struct wmi *wmi) | |||
81 | return wmi->ep_id; | 81 | return wmi->ep_id; |
82 | } | 82 | } |
83 | 83 | ||
84 | static struct ath6kl_vif *ath6kl_get_vif_by_index(struct ath6kl *ar, u8 if_idx) | ||
85 | { | ||
86 | if (WARN_ON(if_idx > (MAX_NUM_VIF - 1))) | ||
87 | return NULL; | ||
88 | |||
89 | return ar->vif; | ||
90 | } | ||
91 | |||
84 | /* Performs DIX to 802.3 encapsulation for transmit packets. | 92 | /* Performs DIX to 802.3 encapsulation for transmit packets. |
85 | * Assumes the entire DIX header is contigous and that there is | 93 | * Assumes the entire DIX header is contigous and that there is |
86 | * enough room in the buffer for a 802.3 mac header and LLC+SNAP headers. | 94 | * enough room in the buffer for a 802.3 mac header and LLC+SNAP headers. |
@@ -216,7 +224,8 @@ static u8 ath6kl_wmi_determine_user_priority(u8 *pkt, u32 layer2_pri) | |||
216 | return ip_pri; | 224 | return ip_pri; |
217 | } | 225 | } |
218 | 226 | ||
219 | int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, struct sk_buff *skb, | 227 | int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, u8 if_idx, |
228 | struct sk_buff *skb, | ||
220 | u32 layer2_priority, bool wmm_enabled, | 229 | u32 layer2_priority, bool wmm_enabled, |
221 | u8 *ac) | 230 | u8 *ac) |
222 | { | 231 | { |
@@ -289,7 +298,7 @@ int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, struct sk_buff *skb, | |||
289 | cpu_to_le32(WMI_IMPLICIT_PSTREAM_INACTIVITY_INT); | 298 | cpu_to_le32(WMI_IMPLICIT_PSTREAM_INACTIVITY_INT); |
290 | /* Implicit streams are created with TSID 0xFF */ | 299 | /* Implicit streams are created with TSID 0xFF */ |
291 | cmd.tsid = WMI_IMPLICIT_PSTREAM; | 300 | cmd.tsid = WMI_IMPLICIT_PSTREAM; |
292 | ath6kl_wmi_create_pstream_cmd(wmi, &cmd); | 301 | ath6kl_wmi_create_pstream_cmd(wmi, if_idx, &cmd); |
293 | } | 302 | } |
294 | 303 | ||
295 | *ac = traffic_class; | 304 | *ac = traffic_class; |
@@ -415,7 +424,7 @@ static int ath6kl_wmi_tx_complete_event_rx(u8 *datap, int len) | |||
415 | } | 424 | } |
416 | 425 | ||
417 | static int ath6kl_wmi_remain_on_chnl_event_rx(struct wmi *wmi, u8 *datap, | 426 | static int ath6kl_wmi_remain_on_chnl_event_rx(struct wmi *wmi, u8 *datap, |
418 | int len) | 427 | int len, struct ath6kl_vif *vif) |
419 | { | 428 | { |
420 | struct wmi_remain_on_chnl_event *ev; | 429 | struct wmi_remain_on_chnl_event *ev; |
421 | u32 freq; | 430 | u32 freq; |
@@ -437,14 +446,15 @@ static int ath6kl_wmi_remain_on_chnl_event_rx(struct wmi *wmi, u8 *datap, | |||
437 | "(freq=%u)\n", freq); | 446 | "(freq=%u)\n", freq); |
438 | return -EINVAL; | 447 | return -EINVAL; |
439 | } | 448 | } |
440 | cfg80211_ready_on_channel(ar->net_dev, 1, chan, NL80211_CHAN_NO_HT, | 449 | cfg80211_ready_on_channel(vif->ndev, 1, chan, NL80211_CHAN_NO_HT, |
441 | dur, GFP_ATOMIC); | 450 | dur, GFP_ATOMIC); |
442 | 451 | ||
443 | return 0; | 452 | return 0; |
444 | } | 453 | } |
445 | 454 | ||
446 | static int ath6kl_wmi_cancel_remain_on_chnl_event_rx(struct wmi *wmi, | 455 | static int ath6kl_wmi_cancel_remain_on_chnl_event_rx(struct wmi *wmi, |
447 | u8 *datap, int len) | 456 | u8 *datap, int len, |
457 | struct ath6kl_vif *vif) | ||
448 | { | 458 | { |
449 | struct wmi_cancel_remain_on_chnl_event *ev; | 459 | struct wmi_cancel_remain_on_chnl_event *ev; |
450 | u32 freq; | 460 | u32 freq; |
@@ -466,17 +476,17 @@ static int ath6kl_wmi_cancel_remain_on_chnl_event_rx(struct wmi *wmi, | |||
466 | "channel (freq=%u)\n", freq); | 476 | "channel (freq=%u)\n", freq); |
467 | return -EINVAL; | 477 | return -EINVAL; |
468 | } | 478 | } |
469 | cfg80211_remain_on_channel_expired(ar->net_dev, 1, chan, | 479 | cfg80211_remain_on_channel_expired(vif->ndev, 1, chan, |
470 | NL80211_CHAN_NO_HT, GFP_ATOMIC); | 480 | NL80211_CHAN_NO_HT, GFP_ATOMIC); |
471 | 481 | ||
472 | return 0; | 482 | return 0; |
473 | } | 483 | } |
474 | 484 | ||
475 | static int ath6kl_wmi_tx_status_event_rx(struct wmi *wmi, u8 *datap, int len) | 485 | static int ath6kl_wmi_tx_status_event_rx(struct wmi *wmi, u8 *datap, int len, |
486 | struct ath6kl_vif *vif) | ||
476 | { | 487 | { |
477 | struct wmi_tx_status_event *ev; | 488 | struct wmi_tx_status_event *ev; |
478 | u32 id; | 489 | u32 id; |
479 | struct ath6kl *ar = wmi->parent_dev; | ||
480 | 490 | ||
481 | if (len < sizeof(*ev)) | 491 | if (len < sizeof(*ev)) |
482 | return -EINVAL; | 492 | return -EINVAL; |
@@ -486,7 +496,7 @@ static int ath6kl_wmi_tx_status_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
486 | ath6kl_dbg(ATH6KL_DBG_WMI, "tx_status: id=%x ack_status=%u\n", | 496 | ath6kl_dbg(ATH6KL_DBG_WMI, "tx_status: id=%x ack_status=%u\n", |
487 | id, ev->ack_status); | 497 | id, ev->ack_status); |
488 | if (wmi->last_mgmt_tx_frame) { | 498 | if (wmi->last_mgmt_tx_frame) { |
489 | cfg80211_mgmt_tx_status(ar->net_dev, id, | 499 | cfg80211_mgmt_tx_status(vif->ndev, id, |
490 | wmi->last_mgmt_tx_frame, | 500 | wmi->last_mgmt_tx_frame, |
491 | wmi->last_mgmt_tx_frame_len, | 501 | wmi->last_mgmt_tx_frame_len, |
492 | !!ev->ack_status, GFP_ATOMIC); | 502 | !!ev->ack_status, GFP_ATOMIC); |
@@ -498,14 +508,12 @@ static int ath6kl_wmi_tx_status_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
498 | return 0; | 508 | return 0; |
499 | } | 509 | } |
500 | 510 | ||
501 | static int ath6kl_wmi_rx_probe_req_event_rx(struct wmi *wmi, u8 *datap, int len) | 511 | static int ath6kl_wmi_rx_probe_req_event_rx(struct wmi *wmi, u8 *datap, int len, |
512 | struct ath6kl_vif *vif) | ||
502 | { | 513 | { |
503 | struct wmi_p2p_rx_probe_req_event *ev; | 514 | struct wmi_p2p_rx_probe_req_event *ev; |
504 | u32 freq; | 515 | u32 freq; |
505 | u16 dlen; | 516 | u16 dlen; |
506 | struct ath6kl *ar = wmi->parent_dev; | ||
507 | /* TODO: Findout vif */ | ||
508 | struct ath6kl_vif *vif = ar->vif; | ||
509 | 517 | ||
510 | if (len < sizeof(*ev)) | 518 | if (len < sizeof(*ev)) |
511 | return -EINVAL; | 519 | return -EINVAL; |
@@ -523,7 +531,7 @@ static int ath6kl_wmi_rx_probe_req_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
523 | dlen, freq, vif->probe_req_report); | 531 | dlen, freq, vif->probe_req_report); |
524 | 532 | ||
525 | if (vif->probe_req_report || vif->nw_type == AP_NETWORK) | 533 | if (vif->probe_req_report || vif->nw_type == AP_NETWORK) |
526 | cfg80211_rx_mgmt(ar->net_dev, freq, ev->data, dlen, GFP_ATOMIC); | 534 | cfg80211_rx_mgmt(vif->ndev, freq, ev->data, dlen, GFP_ATOMIC); |
527 | 535 | ||
528 | return 0; | 536 | return 0; |
529 | } | 537 | } |
@@ -543,12 +551,12 @@ static int ath6kl_wmi_p2p_capabilities_event_rx(u8 *datap, int len) | |||
543 | return 0; | 551 | return 0; |
544 | } | 552 | } |
545 | 553 | ||
546 | static int ath6kl_wmi_rx_action_event_rx(struct wmi *wmi, u8 *datap, int len) | 554 | static int ath6kl_wmi_rx_action_event_rx(struct wmi *wmi, u8 *datap, int len, |
555 | struct ath6kl_vif *vif) | ||
547 | { | 556 | { |
548 | struct wmi_rx_action_event *ev; | 557 | struct wmi_rx_action_event *ev; |
549 | u32 freq; | 558 | u32 freq; |
550 | u16 dlen; | 559 | u16 dlen; |
551 | struct ath6kl *ar = wmi->parent_dev; | ||
552 | 560 | ||
553 | if (len < sizeof(*ev)) | 561 | if (len < sizeof(*ev)) |
554 | return -EINVAL; | 562 | return -EINVAL; |
@@ -562,7 +570,7 @@ static int ath6kl_wmi_rx_action_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
562 | return -EINVAL; | 570 | return -EINVAL; |
563 | } | 571 | } |
564 | ath6kl_dbg(ATH6KL_DBG_WMI, "rx_action: len=%u freq=%u\n", dlen, freq); | 572 | ath6kl_dbg(ATH6KL_DBG_WMI, "rx_action: len=%u freq=%u\n", dlen, freq); |
565 | cfg80211_rx_mgmt(ar->net_dev, freq, ev->data, dlen, GFP_ATOMIC); | 573 | cfg80211_rx_mgmt(vif->ndev, freq, ev->data, dlen, GFP_ATOMIC); |
566 | 574 | ||
567 | return 0; | 575 | return 0; |
568 | } | 576 | } |
@@ -726,13 +734,11 @@ int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode) | |||
726 | NO_SYNC_WMIFLAG); | 734 | NO_SYNC_WMIFLAG); |
727 | } | 735 | } |
728 | 736 | ||
729 | static int ath6kl_wmi_connect_event_rx(struct wmi *wmi, u8 *datap, int len) | 737 | static int ath6kl_wmi_connect_event_rx(struct wmi *wmi, u8 *datap, int len, |
738 | struct ath6kl_vif *vif) | ||
730 | { | 739 | { |
731 | struct wmi_connect_event *ev; | 740 | struct wmi_connect_event *ev; |
732 | u8 *pie, *peie; | 741 | u8 *pie, *peie; |
733 | struct ath6kl *ar = wmi->parent_dev; | ||
734 | /* TODO: Findout vif */ | ||
735 | struct ath6kl_vif *vif = ar->vif; | ||
736 | 742 | ||
737 | if (len < sizeof(struct wmi_connect_event)) | 743 | if (len < sizeof(struct wmi_connect_event)) |
738 | return -EINVAL; | 744 | return -EINVAL; |
@@ -741,14 +747,14 @@ static int ath6kl_wmi_connect_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
741 | 747 | ||
742 | if (vif->nw_type == AP_NETWORK) { | 748 | if (vif->nw_type == AP_NETWORK) { |
743 | /* AP mode start/STA connected event */ | 749 | /* AP mode start/STA connected event */ |
744 | struct net_device *dev = ar->net_dev; | 750 | struct net_device *dev = vif->ndev; |
745 | if (memcmp(dev->dev_addr, ev->u.ap_bss.bssid, ETH_ALEN) == 0) { | 751 | if (memcmp(dev->dev_addr, ev->u.ap_bss.bssid, ETH_ALEN) == 0) { |
746 | ath6kl_dbg(ATH6KL_DBG_WMI, "%s: freq %d bssid %pM " | 752 | ath6kl_dbg(ATH6KL_DBG_WMI, "%s: freq %d bssid %pM " |
747 | "(AP started)\n", | 753 | "(AP started)\n", |
748 | __func__, le16_to_cpu(ev->u.ap_bss.ch), | 754 | __func__, le16_to_cpu(ev->u.ap_bss.ch), |
749 | ev->u.ap_bss.bssid); | 755 | ev->u.ap_bss.bssid); |
750 | ath6kl_connect_ap_mode_bss( | 756 | ath6kl_connect_ap_mode_bss( |
751 | ar, le16_to_cpu(ev->u.ap_bss.ch)); | 757 | vif, le16_to_cpu(ev->u.ap_bss.ch)); |
752 | } else { | 758 | } else { |
753 | ath6kl_dbg(ATH6KL_DBG_WMI, "%s: aid %u mac_addr %pM " | 759 | ath6kl_dbg(ATH6KL_DBG_WMI, "%s: aid %u mac_addr %pM " |
754 | "auth=%u keymgmt=%u cipher=%u apsd_info=%u " | 760 | "auth=%u keymgmt=%u cipher=%u apsd_info=%u " |
@@ -760,7 +766,7 @@ static int ath6kl_wmi_connect_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
760 | le16_to_cpu(ev->u.ap_sta.cipher), | 766 | le16_to_cpu(ev->u.ap_sta.cipher), |
761 | ev->u.ap_sta.apsd_info); | 767 | ev->u.ap_sta.apsd_info); |
762 | ath6kl_connect_ap_mode_sta( | 768 | ath6kl_connect_ap_mode_sta( |
763 | ar, ev->u.ap_sta.aid, ev->u.ap_sta.mac_addr, | 769 | vif, ev->u.ap_sta.aid, ev->u.ap_sta.mac_addr, |
764 | ev->u.ap_sta.keymgmt, | 770 | ev->u.ap_sta.keymgmt, |
765 | le16_to_cpu(ev->u.ap_sta.cipher), | 771 | le16_to_cpu(ev->u.ap_sta.cipher), |
766 | ev->u.ap_sta.auth, ev->assoc_req_len, | 772 | ev->u.ap_sta.auth, ev->assoc_req_len, |
@@ -805,7 +811,7 @@ static int ath6kl_wmi_connect_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
805 | pie += pie[1] + 2; | 811 | pie += pie[1] + 2; |
806 | } | 812 | } |
807 | 813 | ||
808 | ath6kl_connect_event(wmi->parent_dev, le16_to_cpu(ev->u.sta.ch), | 814 | ath6kl_connect_event(vif, le16_to_cpu(ev->u.sta.ch), |
809 | ev->u.sta.bssid, | 815 | ev->u.sta.bssid, |
810 | le16_to_cpu(ev->u.sta.listen_intvl), | 816 | le16_to_cpu(ev->u.sta.listen_intvl), |
811 | le16_to_cpu(ev->u.sta.beacon_intvl), | 817 | le16_to_cpu(ev->u.sta.beacon_intvl), |
@@ -891,7 +897,8 @@ static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len) | |||
891 | } | 897 | } |
892 | } | 898 | } |
893 | 899 | ||
894 | static int ath6kl_wmi_disconnect_event_rx(struct wmi *wmi, u8 *datap, int len) | 900 | static int ath6kl_wmi_disconnect_event_rx(struct wmi *wmi, u8 *datap, int len, |
901 | struct ath6kl_vif *vif) | ||
895 | { | 902 | { |
896 | struct wmi_disconnect_event *ev; | 903 | struct wmi_disconnect_event *ev; |
897 | wmi->traffic_class = 100; | 904 | wmi->traffic_class = 100; |
@@ -908,7 +915,7 @@ static int ath6kl_wmi_disconnect_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
908 | 915 | ||
909 | wmi->is_wmm_enabled = false; | 916 | wmi->is_wmm_enabled = false; |
910 | 917 | ||
911 | ath6kl_disconnect_event(wmi->parent_dev, ev->disconn_reason, | 918 | ath6kl_disconnect_event(vif, ev->disconn_reason, |
912 | ev->bssid, ev->assoc_resp_len, ev->assoc_info, | 919 | ev->bssid, ev->assoc_resp_len, ev->assoc_info, |
913 | le16_to_cpu(ev->proto_reason_status)); | 920 | le16_to_cpu(ev->proto_reason_status)); |
914 | 921 | ||
@@ -934,7 +941,8 @@ static int ath6kl_wmi_peer_node_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
934 | return 0; | 941 | return 0; |
935 | } | 942 | } |
936 | 943 | ||
937 | static int ath6kl_wmi_tkip_micerr_event_rx(struct wmi *wmi, u8 *datap, int len) | 944 | static int ath6kl_wmi_tkip_micerr_event_rx(struct wmi *wmi, u8 *datap, int len, |
945 | struct ath6kl_vif *vif) | ||
938 | { | 946 | { |
939 | struct wmi_tkip_micerr_event *ev; | 947 | struct wmi_tkip_micerr_event *ev; |
940 | 948 | ||
@@ -943,12 +951,13 @@ static int ath6kl_wmi_tkip_micerr_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
943 | 951 | ||
944 | ev = (struct wmi_tkip_micerr_event *) datap; | 952 | ev = (struct wmi_tkip_micerr_event *) datap; |
945 | 953 | ||
946 | ath6kl_tkip_micerr_event(wmi->parent_dev, ev->key_id, ev->is_mcast); | 954 | ath6kl_tkip_micerr_event(vif, ev->key_id, ev->is_mcast); |
947 | 955 | ||
948 | return 0; | 956 | return 0; |
949 | } | 957 | } |
950 | 958 | ||
951 | static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len) | 959 | static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len, |
960 | struct ath6kl_vif *vif) | ||
952 | { | 961 | { |
953 | struct wmi_bss_info_hdr2 *bih; | 962 | struct wmi_bss_info_hdr2 *bih; |
954 | u8 *buf; | 963 | u8 *buf; |
@@ -956,8 +965,6 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
956 | struct ath6kl *ar = wmi->parent_dev; | 965 | struct ath6kl *ar = wmi->parent_dev; |
957 | struct ieee80211_mgmt *mgmt; | 966 | struct ieee80211_mgmt *mgmt; |
958 | struct cfg80211_bss *bss; | 967 | struct cfg80211_bss *bss; |
959 | /*TODO: Findout vif properly */ | ||
960 | struct ath6kl_vif *vif = ar->vif; | ||
961 | 968 | ||
962 | if (len <= sizeof(struct wmi_bss_info_hdr2)) | 969 | if (len <= sizeof(struct wmi_bss_info_hdr2)) |
963 | return -EINVAL; | 970 | return -EINVAL; |
@@ -979,7 +986,8 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
979 | if (bih->frame_type == BEACON_FTYPE && | 986 | if (bih->frame_type == BEACON_FTYPE && |
980 | test_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags)) { | 987 | test_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags)) { |
981 | clear_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); | 988 | clear_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); |
982 | ath6kl_wmi_bssfilter_cmd(ar->wmi, NONE_BSS_FILTER, 0); | 989 | ath6kl_wmi_bssfilter_cmd(ar->wmi, vif->fw_vif_idx, |
990 | NONE_BSS_FILTER, 0); | ||
983 | } | 991 | } |
984 | 992 | ||
985 | channel = ieee80211_get_channel(ar->wiphy, le16_to_cpu(bih->ch)); | 993 | channel = ieee80211_get_channel(ar->wiphy, le16_to_cpu(bih->ch)); |
@@ -1016,7 +1024,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
1016 | IEEE80211_STYPE_BEACON); | 1024 | IEEE80211_STYPE_BEACON); |
1017 | memset(mgmt->da, 0xff, ETH_ALEN); | 1025 | memset(mgmt->da, 0xff, ETH_ALEN); |
1018 | } else { | 1026 | } else { |
1019 | struct net_device *dev = ar->net_dev; | 1027 | struct net_device *dev = vif->ndev; |
1020 | 1028 | ||
1021 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | | 1029 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
1022 | IEEE80211_STYPE_PROBE_RESP); | 1030 | IEEE80211_STYPE_PROBE_RESP); |
@@ -1144,20 +1152,21 @@ static int ath6kl_wmi_keepalive_reply_rx(struct wmi *wmi, u8 *datap, int len) | |||
1144 | return 0; | 1152 | return 0; |
1145 | } | 1153 | } |
1146 | 1154 | ||
1147 | static int ath6kl_wmi_scan_complete_rx(struct wmi *wmi, u8 *datap, int len) | 1155 | static int ath6kl_wmi_scan_complete_rx(struct wmi *wmi, u8 *datap, int len, |
1156 | struct ath6kl_vif *vif) | ||
1148 | { | 1157 | { |
1149 | struct wmi_scan_complete_event *ev; | 1158 | struct wmi_scan_complete_event *ev; |
1150 | 1159 | ||
1151 | ev = (struct wmi_scan_complete_event *) datap; | 1160 | ev = (struct wmi_scan_complete_event *) datap; |
1152 | 1161 | ||
1153 | ath6kl_scan_complete_evt(wmi->parent_dev, a_sle32_to_cpu(ev->status)); | 1162 | ath6kl_scan_complete_evt(vif, a_sle32_to_cpu(ev->status)); |
1154 | wmi->is_probe_ssid = false; | 1163 | wmi->is_probe_ssid = false; |
1155 | 1164 | ||
1156 | return 0; | 1165 | return 0; |
1157 | } | 1166 | } |
1158 | 1167 | ||
1159 | static int ath6kl_wmi_neighbor_report_event_rx(struct wmi *wmi, u8 *datap, | 1168 | static int ath6kl_wmi_neighbor_report_event_rx(struct wmi *wmi, u8 *datap, |
1160 | int len) | 1169 | int len, struct ath6kl_vif *vif) |
1161 | { | 1170 | { |
1162 | struct wmi_neighbor_report_event *ev; | 1171 | struct wmi_neighbor_report_event *ev; |
1163 | u8 i; | 1172 | u8 i; |
@@ -1175,7 +1184,7 @@ static int ath6kl_wmi_neighbor_report_event_rx(struct wmi *wmi, u8 *datap, | |||
1175 | ath6kl_dbg(ATH6KL_DBG_WMI, "neighbor %d/%d - %pM 0x%x\n", | 1184 | ath6kl_dbg(ATH6KL_DBG_WMI, "neighbor %d/%d - %pM 0x%x\n", |
1176 | i + 1, ev->num_neighbors, ev->neighbor[i].bssid, | 1185 | i + 1, ev->num_neighbors, ev->neighbor[i].bssid, |
1177 | ev->neighbor[i].bss_flags); | 1186 | ev->neighbor[i].bss_flags); |
1178 | cfg80211_pmksa_candidate_notify(wmi->parent_dev->net_dev, i, | 1187 | cfg80211_pmksa_candidate_notify(vif->ndev, i, |
1179 | ev->neighbor[i].bssid, | 1188 | ev->neighbor[i].bssid, |
1180 | !!(ev->neighbor[i].bss_flags & | 1189 | !!(ev->neighbor[i].bss_flags & |
1181 | WMI_PREAUTH_CAPABLE_BSS), | 1190 | WMI_PREAUTH_CAPABLE_BSS), |
@@ -1216,9 +1225,10 @@ static int ath6kl_wmi_error_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
1216 | return 0; | 1225 | return 0; |
1217 | } | 1226 | } |
1218 | 1227 | ||
1219 | static int ath6kl_wmi_stats_event_rx(struct wmi *wmi, u8 *datap, int len) | 1228 | static int ath6kl_wmi_stats_event_rx(struct wmi *wmi, u8 *datap, int len, |
1229 | struct ath6kl_vif *vif) | ||
1220 | { | 1230 | { |
1221 | ath6kl_tgt_stats_event(wmi->parent_dev, datap, len); | 1231 | ath6kl_tgt_stats_event(vif, datap, len); |
1222 | 1232 | ||
1223 | return 0; | 1233 | return 0; |
1224 | } | 1234 | } |
@@ -1372,7 +1382,8 @@ static int ath6kl_wmi_rssi_threshold_event_rx(struct wmi *wmi, u8 *datap, | |||
1372 | return 0; | 1382 | return 0; |
1373 | } | 1383 | } |
1374 | 1384 | ||
1375 | static int ath6kl_wmi_cac_event_rx(struct wmi *wmi, u8 *datap, int len) | 1385 | static int ath6kl_wmi_cac_event_rx(struct wmi *wmi, u8 *datap, int len, |
1386 | struct ath6kl_vif *vif) | ||
1376 | { | 1387 | { |
1377 | struct wmi_cac_event *reply; | 1388 | struct wmi_cac_event *reply; |
1378 | struct ieee80211_tspec_ie *ts; | 1389 | struct ieee80211_tspec_ie *ts; |
@@ -1393,7 +1404,8 @@ static int ath6kl_wmi_cac_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
1393 | tsid = (tsinfo >> IEEE80211_WMM_IE_TSPEC_TID_SHIFT) & | 1404 | tsid = (tsinfo >> IEEE80211_WMM_IE_TSPEC_TID_SHIFT) & |
1394 | IEEE80211_WMM_IE_TSPEC_TID_MASK; | 1405 | IEEE80211_WMM_IE_TSPEC_TID_MASK; |
1395 | 1406 | ||
1396 | ath6kl_wmi_delete_pstream_cmd(wmi, reply->ac, tsid); | 1407 | ath6kl_wmi_delete_pstream_cmd(wmi, vif->fw_vif_idx, |
1408 | reply->ac, tsid); | ||
1397 | } else if (reply->cac_indication == CAC_INDICATION_NO_RESP) { | 1409 | } else if (reply->cac_indication == CAC_INDICATION_NO_RESP) { |
1398 | /* | 1410 | /* |
1399 | * Following assumes that there is only one outstanding | 1411 | * Following assumes that there is only one outstanding |
@@ -1408,7 +1420,8 @@ static int ath6kl_wmi_cac_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
1408 | break; | 1420 | break; |
1409 | } | 1421 | } |
1410 | if (index < (sizeof(active_tsids) * 8)) | 1422 | if (index < (sizeof(active_tsids) * 8)) |
1411 | ath6kl_wmi_delete_pstream_cmd(wmi, reply->ac, index); | 1423 | ath6kl_wmi_delete_pstream_cmd(wmi, vif->fw_vif_idx, |
1424 | reply->ac, index); | ||
1412 | } | 1425 | } |
1413 | 1426 | ||
1414 | /* | 1427 | /* |
@@ -1605,7 +1618,7 @@ int ath6kl_wmi_cmd_send(struct wmi *wmi, u8 if_idx, struct sk_buff *skb, | |||
1605 | * Make sure all data currently queued is transmitted before | 1618 | * Make sure all data currently queued is transmitted before |
1606 | * the cmd execution. Establish a new sync point. | 1619 | * the cmd execution. Establish a new sync point. |
1607 | */ | 1620 | */ |
1608 | ath6kl_wmi_sync_point(wmi); | 1621 | ath6kl_wmi_sync_point(wmi, if_idx); |
1609 | } | 1622 | } |
1610 | 1623 | ||
1611 | skb_push(skb, sizeof(struct wmi_cmd_hdr)); | 1624 | skb_push(skb, sizeof(struct wmi_cmd_hdr)); |
@@ -1634,7 +1647,7 @@ int ath6kl_wmi_cmd_send(struct wmi *wmi, u8 if_idx, struct sk_buff *skb, | |||
1634 | * Make sure all new data queued waits for the command to | 1647 | * Make sure all new data queued waits for the command to |
1635 | * execute. Establish a new sync point. | 1648 | * execute. Establish a new sync point. |
1636 | */ | 1649 | */ |
1637 | ath6kl_wmi_sync_point(wmi); | 1650 | ath6kl_wmi_sync_point(wmi, if_idx); |
1638 | } | 1651 | } |
1639 | 1652 | ||
1640 | return 0; | 1653 | return 0; |
@@ -1816,7 +1829,7 @@ int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u8 if_idx, | |||
1816 | return ret; | 1829 | return ret; |
1817 | } | 1830 | } |
1818 | 1831 | ||
1819 | int ath6kl_wmi_bssfilter_cmd(struct wmi *wmi, u8 filter, u32 ie_mask) | 1832 | int ath6kl_wmi_bssfilter_cmd(struct wmi *wmi, u8 if_idx, u8 filter, u32 ie_mask) |
1820 | { | 1833 | { |
1821 | struct sk_buff *skb; | 1834 | struct sk_buff *skb; |
1822 | struct wmi_bss_filter_cmd *cmd; | 1835 | struct wmi_bss_filter_cmd *cmd; |
@@ -1833,7 +1846,7 @@ int ath6kl_wmi_bssfilter_cmd(struct wmi *wmi, u8 filter, u32 ie_mask) | |||
1833 | cmd->bss_filter = filter; | 1846 | cmd->bss_filter = filter; |
1834 | cmd->ie_mask = cpu_to_le32(ie_mask); | 1847 | cmd->ie_mask = cpu_to_le32(ie_mask); |
1835 | 1848 | ||
1836 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_BSS_FILTER_CMDID, | 1849 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_SET_BSS_FILTER_CMDID, |
1837 | NO_SYNC_WMIFLAG); | 1850 | NO_SYNC_WMIFLAG); |
1838 | return ret; | 1851 | return ret; |
1839 | } | 1852 | } |
@@ -2010,7 +2023,7 @@ int ath6kl_wmi_addkey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index, | |||
2010 | return ret; | 2023 | return ret; |
2011 | } | 2024 | } |
2012 | 2025 | ||
2013 | int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 *krk) | 2026 | int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 if_idx, u8 *krk) |
2014 | { | 2027 | { |
2015 | struct sk_buff *skb; | 2028 | struct sk_buff *skb; |
2016 | struct wmi_add_krk_cmd *cmd; | 2029 | struct wmi_add_krk_cmd *cmd; |
@@ -2023,7 +2036,7 @@ int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 *krk) | |||
2023 | cmd = (struct wmi_add_krk_cmd *) skb->data; | 2036 | cmd = (struct wmi_add_krk_cmd *) skb->data; |
2024 | memcpy(cmd->krk, krk, WMI_KRK_LEN); | 2037 | memcpy(cmd->krk, krk, WMI_KRK_LEN); |
2025 | 2038 | ||
2026 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_ADD_KRK_CMDID, | 2039 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_ADD_KRK_CMDID, |
2027 | NO_SYNC_WMIFLAG); | 2040 | NO_SYNC_WMIFLAG); |
2028 | 2041 | ||
2029 | return ret; | 2042 | return ret; |
@@ -2104,7 +2117,7 @@ static int ath6kl_wmi_data_sync_send(struct wmi *wmi, struct sk_buff *skb, | |||
2104 | return ret; | 2117 | return ret; |
2105 | } | 2118 | } |
2106 | 2119 | ||
2107 | static int ath6kl_wmi_sync_point(struct wmi *wmi) | 2120 | static int ath6kl_wmi_sync_point(struct wmi *wmi, u8 if_idx) |
2108 | { | 2121 | { |
2109 | struct sk_buff *skb; | 2122 | struct sk_buff *skb; |
2110 | struct wmi_sync_cmd *cmd; | 2123 | struct wmi_sync_cmd *cmd; |
@@ -2160,7 +2173,7 @@ static int ath6kl_wmi_sync_point(struct wmi *wmi) | |||
2160 | * Send sync cmd followed by sync data messages on all | 2173 | * Send sync cmd followed by sync data messages on all |
2161 | * endpoints being used | 2174 | * endpoints being used |
2162 | */ | 2175 | */ |
2163 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SYNCHRONIZE_CMDID, | 2176 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_SYNCHRONIZE_CMDID, |
2164 | NO_SYNC_WMIFLAG); | 2177 | NO_SYNC_WMIFLAG); |
2165 | 2178 | ||
2166 | if (ret) | 2179 | if (ret) |
@@ -2202,7 +2215,7 @@ free_skb: | |||
2202 | return ret; | 2215 | return ret; |
2203 | } | 2216 | } |
2204 | 2217 | ||
2205 | int ath6kl_wmi_create_pstream_cmd(struct wmi *wmi, | 2218 | int ath6kl_wmi_create_pstream_cmd(struct wmi *wmi, u8 if_idx, |
2206 | struct wmi_create_pstream_cmd *params) | 2219 | struct wmi_create_pstream_cmd *params) |
2207 | { | 2220 | { |
2208 | struct sk_buff *skb; | 2221 | struct sk_buff *skb; |
@@ -2291,12 +2304,13 @@ int ath6kl_wmi_create_pstream_cmd(struct wmi *wmi, | |||
2291 | ath6kl_indicate_tx_activity(wmi->parent_dev, | 2304 | ath6kl_indicate_tx_activity(wmi->parent_dev, |
2292 | params->traffic_class, true); | 2305 | params->traffic_class, true); |
2293 | 2306 | ||
2294 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_CREATE_PSTREAM_CMDID, | 2307 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_CREATE_PSTREAM_CMDID, |
2295 | NO_SYNC_WMIFLAG); | 2308 | NO_SYNC_WMIFLAG); |
2296 | return ret; | 2309 | return ret; |
2297 | } | 2310 | } |
2298 | 2311 | ||
2299 | int ath6kl_wmi_delete_pstream_cmd(struct wmi *wmi, u8 traffic_class, u8 tsid) | 2312 | int ath6kl_wmi_delete_pstream_cmd(struct wmi *wmi, u8 if_idx, u8 traffic_class, |
2313 | u8 tsid) | ||
2300 | { | 2314 | { |
2301 | struct sk_buff *skb; | 2315 | struct sk_buff *skb; |
2302 | struct wmi_delete_pstream_cmd *cmd; | 2316 | struct wmi_delete_pstream_cmd *cmd; |
@@ -2332,7 +2346,7 @@ int ath6kl_wmi_delete_pstream_cmd(struct wmi *wmi, u8 traffic_class, u8 tsid) | |||
2332 | "sending delete_pstream_cmd: traffic class: %d tsid=%d\n", | 2346 | "sending delete_pstream_cmd: traffic class: %d tsid=%d\n", |
2333 | traffic_class, tsid); | 2347 | traffic_class, tsid); |
2334 | 2348 | ||
2335 | ret = ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_DELETE_PSTREAM_CMDID, | 2349 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_DELETE_PSTREAM_CMDID, |
2336 | SYNC_BEFORE_WMIFLAG); | 2350 | SYNC_BEFORE_WMIFLAG); |
2337 | 2351 | ||
2338 | spin_lock_bh(&wmi->lock); | 2352 | spin_lock_bh(&wmi->lock); |
@@ -2598,21 +2612,23 @@ static int ath6kl_wmi_get_pmkid_list_event_rx(struct wmi *wmi, u8 *datap, | |||
2598 | return 0; | 2612 | return 0; |
2599 | } | 2613 | } |
2600 | 2614 | ||
2601 | static int ath6kl_wmi_addba_req_event_rx(struct wmi *wmi, u8 *datap, int len) | 2615 | static int ath6kl_wmi_addba_req_event_rx(struct wmi *wmi, u8 *datap, int len, |
2616 | struct ath6kl_vif *vif) | ||
2602 | { | 2617 | { |
2603 | struct wmi_addba_req_event *cmd = (struct wmi_addba_req_event *) datap; | 2618 | struct wmi_addba_req_event *cmd = (struct wmi_addba_req_event *) datap; |
2604 | 2619 | ||
2605 | aggr_recv_addba_req_evt(wmi->parent_dev, cmd->tid, | 2620 | aggr_recv_addba_req_evt(vif, cmd->tid, |
2606 | le16_to_cpu(cmd->st_seq_no), cmd->win_sz); | 2621 | le16_to_cpu(cmd->st_seq_no), cmd->win_sz); |
2607 | 2622 | ||
2608 | return 0; | 2623 | return 0; |
2609 | } | 2624 | } |
2610 | 2625 | ||
2611 | static int ath6kl_wmi_delba_req_event_rx(struct wmi *wmi, u8 *datap, int len) | 2626 | static int ath6kl_wmi_delba_req_event_rx(struct wmi *wmi, u8 *datap, int len, |
2627 | struct ath6kl_vif *vif) | ||
2612 | { | 2628 | { |
2613 | struct wmi_delba_event *cmd = (struct wmi_delba_event *) datap; | 2629 | struct wmi_delba_event *cmd = (struct wmi_delba_event *) datap; |
2614 | 2630 | ||
2615 | aggr_recv_delba_req_evt(wmi->parent_dev, cmd->tid); | 2631 | aggr_recv_delba_req_evt(vif, cmd->tid); |
2616 | 2632 | ||
2617 | return 0; | 2633 | return 0; |
2618 | } | 2634 | } |
@@ -2661,7 +2677,8 @@ int ath6kl_wmi_ap_set_mlme(struct wmi *wmip, u8 if_idx, u8 cmd, const u8 *mac, | |||
2661 | NO_SYNC_WMIFLAG); | 2677 | NO_SYNC_WMIFLAG); |
2662 | } | 2678 | } |
2663 | 2679 | ||
2664 | static int ath6kl_wmi_pspoll_event_rx(struct wmi *wmi, u8 *datap, int len) | 2680 | static int ath6kl_wmi_pspoll_event_rx(struct wmi *wmi, u8 *datap, int len, |
2681 | struct ath6kl_vif *vif) | ||
2665 | { | 2682 | { |
2666 | struct wmi_pspoll_event *ev; | 2683 | struct wmi_pspoll_event *ev; |
2667 | 2684 | ||
@@ -2670,14 +2687,15 @@ static int ath6kl_wmi_pspoll_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
2670 | 2687 | ||
2671 | ev = (struct wmi_pspoll_event *) datap; | 2688 | ev = (struct wmi_pspoll_event *) datap; |
2672 | 2689 | ||
2673 | ath6kl_pspoll_event(wmi->parent_dev, le16_to_cpu(ev->aid)); | 2690 | ath6kl_pspoll_event(vif, le16_to_cpu(ev->aid)); |
2674 | 2691 | ||
2675 | return 0; | 2692 | return 0; |
2676 | } | 2693 | } |
2677 | 2694 | ||
2678 | static int ath6kl_wmi_dtimexpiry_event_rx(struct wmi *wmi, u8 *datap, int len) | 2695 | static int ath6kl_wmi_dtimexpiry_event_rx(struct wmi *wmi, u8 *datap, int len, |
2696 | struct ath6kl_vif *vif) | ||
2679 | { | 2697 | { |
2680 | ath6kl_dtimexpiry_event(wmi->parent_dev); | 2698 | ath6kl_dtimexpiry_event(vif); |
2681 | 2699 | ||
2682 | return 0; | 2700 | return 0; |
2683 | } | 2701 | } |
@@ -2930,8 +2948,10 @@ static int ath6kl_wmi_roam_tbl_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
2930 | int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) | 2948 | int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) |
2931 | { | 2949 | { |
2932 | struct wmi_cmd_hdr *cmd; | 2950 | struct wmi_cmd_hdr *cmd; |
2951 | struct ath6kl_vif *vif; | ||
2933 | u32 len; | 2952 | u32 len; |
2934 | u16 id; | 2953 | u16 id; |
2954 | u8 if_idx; | ||
2935 | u8 *datap; | 2955 | u8 *datap; |
2936 | int ret = 0; | 2956 | int ret = 0; |
2937 | 2957 | ||
@@ -2946,6 +2966,7 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) | |||
2946 | 2966 | ||
2947 | cmd = (struct wmi_cmd_hdr *) skb->data; | 2967 | cmd = (struct wmi_cmd_hdr *) skb->data; |
2948 | id = le16_to_cpu(cmd->cmd_id); | 2968 | id = le16_to_cpu(cmd->cmd_id); |
2969 | if_idx = le16_to_cpu(cmd->info1) & WMI_CMD_HDR_IF_ID_MASK; | ||
2949 | 2970 | ||
2950 | skb_pull(skb, sizeof(struct wmi_cmd_hdr)); | 2971 | skb_pull(skb, sizeof(struct wmi_cmd_hdr)); |
2951 | 2972 | ||
@@ -2956,6 +2977,15 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) | |||
2956 | ath6kl_dbg_dump(ATH6KL_DBG_WMI_DUMP, NULL, "wmi rx ", | 2977 | ath6kl_dbg_dump(ATH6KL_DBG_WMI_DUMP, NULL, "wmi rx ", |
2957 | datap, len); | 2978 | datap, len); |
2958 | 2979 | ||
2980 | vif = ath6kl_get_vif_by_index(wmi->parent_dev, if_idx); | ||
2981 | if (!vif) { | ||
2982 | ath6kl_dbg(ATH6KL_DBG_WMI, | ||
2983 | "Wmi event for unavailable vif, vif_index:%d\n", | ||
2984 | if_idx); | ||
2985 | dev_kfree_skb(skb); | ||
2986 | return -EINVAL; | ||
2987 | } | ||
2988 | |||
2959 | switch (id) { | 2989 | switch (id) { |
2960 | case WMI_GET_BITRATE_CMDID: | 2990 | case WMI_GET_BITRATE_CMDID: |
2961 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_GET_BITRATE_CMDID\n"); | 2991 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_GET_BITRATE_CMDID\n"); |
@@ -2975,11 +3005,11 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) | |||
2975 | break; | 3005 | break; |
2976 | case WMI_CONNECT_EVENTID: | 3006 | case WMI_CONNECT_EVENTID: |
2977 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CONNECT_EVENTID\n"); | 3007 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CONNECT_EVENTID\n"); |
2978 | ret = ath6kl_wmi_connect_event_rx(wmi, datap, len); | 3008 | ret = ath6kl_wmi_connect_event_rx(wmi, datap, len, vif); |
2979 | break; | 3009 | break; |
2980 | case WMI_DISCONNECT_EVENTID: | 3010 | case WMI_DISCONNECT_EVENTID: |
2981 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_DISCONNECT_EVENTID\n"); | 3011 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_DISCONNECT_EVENTID\n"); |
2982 | ret = ath6kl_wmi_disconnect_event_rx(wmi, datap, len); | 3012 | ret = ath6kl_wmi_disconnect_event_rx(wmi, datap, len, vif); |
2983 | break; | 3013 | break; |
2984 | case WMI_PEER_NODE_EVENTID: | 3014 | case WMI_PEER_NODE_EVENTID: |
2985 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_PEER_NODE_EVENTID\n"); | 3015 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_PEER_NODE_EVENTID\n"); |
@@ -2987,11 +3017,11 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) | |||
2987 | break; | 3017 | break; |
2988 | case WMI_TKIP_MICERR_EVENTID: | 3018 | case WMI_TKIP_MICERR_EVENTID: |
2989 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_TKIP_MICERR_EVENTID\n"); | 3019 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_TKIP_MICERR_EVENTID\n"); |
2990 | ret = ath6kl_wmi_tkip_micerr_event_rx(wmi, datap, len); | 3020 | ret = ath6kl_wmi_tkip_micerr_event_rx(wmi, datap, len, vif); |
2991 | break; | 3021 | break; |
2992 | case WMI_BSSINFO_EVENTID: | 3022 | case WMI_BSSINFO_EVENTID: |
2993 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_BSSINFO_EVENTID\n"); | 3023 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_BSSINFO_EVENTID\n"); |
2994 | ret = ath6kl_wmi_bssinfo_event_rx(wmi, datap, len); | 3024 | ret = ath6kl_wmi_bssinfo_event_rx(wmi, datap, len, vif); |
2995 | break; | 3025 | break; |
2996 | case WMI_REGDOMAIN_EVENTID: | 3026 | case WMI_REGDOMAIN_EVENTID: |
2997 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REGDOMAIN_EVENTID\n"); | 3027 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REGDOMAIN_EVENTID\n"); |
@@ -3003,11 +3033,12 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) | |||
3003 | break; | 3033 | break; |
3004 | case WMI_NEIGHBOR_REPORT_EVENTID: | 3034 | case WMI_NEIGHBOR_REPORT_EVENTID: |
3005 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_NEIGHBOR_REPORT_EVENTID\n"); | 3035 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_NEIGHBOR_REPORT_EVENTID\n"); |
3006 | ret = ath6kl_wmi_neighbor_report_event_rx(wmi, datap, len); | 3036 | ret = ath6kl_wmi_neighbor_report_event_rx(wmi, datap, len, |
3037 | vif); | ||
3007 | break; | 3038 | break; |
3008 | case WMI_SCAN_COMPLETE_EVENTID: | 3039 | case WMI_SCAN_COMPLETE_EVENTID: |
3009 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_SCAN_COMPLETE_EVENTID\n"); | 3040 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_SCAN_COMPLETE_EVENTID\n"); |
3010 | ret = ath6kl_wmi_scan_complete_rx(wmi, datap, len); | 3041 | ret = ath6kl_wmi_scan_complete_rx(wmi, datap, len, vif); |
3011 | break; | 3042 | break; |
3012 | case WMI_CMDERROR_EVENTID: | 3043 | case WMI_CMDERROR_EVENTID: |
3013 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CMDERROR_EVENTID\n"); | 3044 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CMDERROR_EVENTID\n"); |
@@ -3015,7 +3046,7 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) | |||
3015 | break; | 3046 | break; |
3016 | case WMI_REPORT_STATISTICS_EVENTID: | 3047 | case WMI_REPORT_STATISTICS_EVENTID: |
3017 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REPORT_STATISTICS_EVENTID\n"); | 3048 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REPORT_STATISTICS_EVENTID\n"); |
3018 | ret = ath6kl_wmi_stats_event_rx(wmi, datap, len); | 3049 | ret = ath6kl_wmi_stats_event_rx(wmi, datap, len, vif); |
3019 | break; | 3050 | break; |
3020 | case WMI_RSSI_THRESHOLD_EVENTID: | 3051 | case WMI_RSSI_THRESHOLD_EVENTID: |
3021 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RSSI_THRESHOLD_EVENTID\n"); | 3052 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RSSI_THRESHOLD_EVENTID\n"); |
@@ -3038,7 +3069,7 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) | |||
3038 | break; | 3069 | break; |
3039 | case WMI_CAC_EVENTID: | 3070 | case WMI_CAC_EVENTID: |
3040 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CAC_EVENTID\n"); | 3071 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CAC_EVENTID\n"); |
3041 | ret = ath6kl_wmi_cac_event_rx(wmi, datap, len); | 3072 | ret = ath6kl_wmi_cac_event_rx(wmi, datap, len, vif); |
3042 | break; | 3073 | break; |
3043 | case WMI_CHANNEL_CHANGE_EVENTID: | 3074 | case WMI_CHANNEL_CHANGE_EVENTID: |
3044 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CHANNEL_CHANGE_EVENTID\n"); | 3075 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CHANNEL_CHANGE_EVENTID\n"); |
@@ -3082,25 +3113,25 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) | |||
3082 | break; | 3113 | break; |
3083 | case WMI_PSPOLL_EVENTID: | 3114 | case WMI_PSPOLL_EVENTID: |
3084 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_PSPOLL_EVENTID\n"); | 3115 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_PSPOLL_EVENTID\n"); |
3085 | ret = ath6kl_wmi_pspoll_event_rx(wmi, datap, len); | 3116 | ret = ath6kl_wmi_pspoll_event_rx(wmi, datap, len, vif); |
3086 | break; | 3117 | break; |
3087 | case WMI_DTIMEXPIRY_EVENTID: | 3118 | case WMI_DTIMEXPIRY_EVENTID: |
3088 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_DTIMEXPIRY_EVENTID\n"); | 3119 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_DTIMEXPIRY_EVENTID\n"); |
3089 | ret = ath6kl_wmi_dtimexpiry_event_rx(wmi, datap, len); | 3120 | ret = ath6kl_wmi_dtimexpiry_event_rx(wmi, datap, len, vif); |
3090 | break; | 3121 | break; |
3091 | case WMI_SET_PARAMS_REPLY_EVENTID: | 3122 | case WMI_SET_PARAMS_REPLY_EVENTID: |
3092 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_SET_PARAMS_REPLY_EVENTID\n"); | 3123 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_SET_PARAMS_REPLY_EVENTID\n"); |
3093 | break; | 3124 | break; |
3094 | case WMI_ADDBA_REQ_EVENTID: | 3125 | case WMI_ADDBA_REQ_EVENTID: |
3095 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_ADDBA_REQ_EVENTID\n"); | 3126 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_ADDBA_REQ_EVENTID\n"); |
3096 | ret = ath6kl_wmi_addba_req_event_rx(wmi, datap, len); | 3127 | ret = ath6kl_wmi_addba_req_event_rx(wmi, datap, len, vif); |
3097 | break; | 3128 | break; |
3098 | case WMI_ADDBA_RESP_EVENTID: | 3129 | case WMI_ADDBA_RESP_EVENTID: |
3099 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_ADDBA_RESP_EVENTID\n"); | 3130 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_ADDBA_RESP_EVENTID\n"); |
3100 | break; | 3131 | break; |
3101 | case WMI_DELBA_REQ_EVENTID: | 3132 | case WMI_DELBA_REQ_EVENTID: |
3102 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_DELBA_REQ_EVENTID\n"); | 3133 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_DELBA_REQ_EVENTID\n"); |
3103 | ret = ath6kl_wmi_delba_req_event_rx(wmi, datap, len); | 3134 | ret = ath6kl_wmi_delba_req_event_rx(wmi, datap, len, vif); |
3104 | break; | 3135 | break; |
3105 | case WMI_REPORT_BTCOEX_CONFIG_EVENTID: | 3136 | case WMI_REPORT_BTCOEX_CONFIG_EVENTID: |
3106 | ath6kl_dbg(ATH6KL_DBG_WMI, | 3137 | ath6kl_dbg(ATH6KL_DBG_WMI, |
@@ -3116,21 +3147,21 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) | |||
3116 | break; | 3147 | break; |
3117 | case WMI_REMAIN_ON_CHNL_EVENTID: | 3148 | case WMI_REMAIN_ON_CHNL_EVENTID: |
3118 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REMAIN_ON_CHNL_EVENTID\n"); | 3149 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REMAIN_ON_CHNL_EVENTID\n"); |
3119 | ret = ath6kl_wmi_remain_on_chnl_event_rx(wmi, datap, len); | 3150 | ret = ath6kl_wmi_remain_on_chnl_event_rx(wmi, datap, len, vif); |
3120 | break; | 3151 | break; |
3121 | case WMI_CANCEL_REMAIN_ON_CHNL_EVENTID: | 3152 | case WMI_CANCEL_REMAIN_ON_CHNL_EVENTID: |
3122 | ath6kl_dbg(ATH6KL_DBG_WMI, | 3153 | ath6kl_dbg(ATH6KL_DBG_WMI, |
3123 | "WMI_CANCEL_REMAIN_ON_CHNL_EVENTID\n"); | 3154 | "WMI_CANCEL_REMAIN_ON_CHNL_EVENTID\n"); |
3124 | ret = ath6kl_wmi_cancel_remain_on_chnl_event_rx(wmi, datap, | 3155 | ret = ath6kl_wmi_cancel_remain_on_chnl_event_rx(wmi, datap, |
3125 | len); | 3156 | len, vif); |
3126 | break; | 3157 | break; |
3127 | case WMI_TX_STATUS_EVENTID: | 3158 | case WMI_TX_STATUS_EVENTID: |
3128 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_TX_STATUS_EVENTID\n"); | 3159 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_TX_STATUS_EVENTID\n"); |
3129 | ret = ath6kl_wmi_tx_status_event_rx(wmi, datap, len); | 3160 | ret = ath6kl_wmi_tx_status_event_rx(wmi, datap, len, vif); |
3130 | break; | 3161 | break; |
3131 | case WMI_RX_PROBE_REQ_EVENTID: | 3162 | case WMI_RX_PROBE_REQ_EVENTID: |
3132 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RX_PROBE_REQ_EVENTID\n"); | 3163 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RX_PROBE_REQ_EVENTID\n"); |
3133 | ret = ath6kl_wmi_rx_probe_req_event_rx(wmi, datap, len); | 3164 | ret = ath6kl_wmi_rx_probe_req_event_rx(wmi, datap, len, vif); |
3134 | break; | 3165 | break; |
3135 | case WMI_P2P_CAPABILITIES_EVENTID: | 3166 | case WMI_P2P_CAPABILITIES_EVENTID: |
3136 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_P2P_CAPABILITIES_EVENTID\n"); | 3167 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_P2P_CAPABILITIES_EVENTID\n"); |
@@ -3138,7 +3169,7 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) | |||
3138 | break; | 3169 | break; |
3139 | case WMI_RX_ACTION_EVENTID: | 3170 | case WMI_RX_ACTION_EVENTID: |
3140 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RX_ACTION_EVENTID\n"); | 3171 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RX_ACTION_EVENTID\n"); |
3141 | ret = ath6kl_wmi_rx_action_event_rx(wmi, datap, len); | 3172 | ret = ath6kl_wmi_rx_action_event_rx(wmi, datap, len, vif); |
3142 | break; | 3173 | break; |
3143 | case WMI_P2P_INFO_EVENTID: | 3174 | case WMI_P2P_INFO_EVENTID: |
3144 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_P2P_INFO_EVENTID\n"); | 3175 | ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_P2P_INFO_EVENTID\n"); |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h index 83bf46c829b9..d2c951056a52 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.h +++ b/drivers/net/wireless/ath/ath6kl/wmi.h | |||
@@ -2171,9 +2171,9 @@ int ath6kl_wmi_data_hdr_add(struct wmi *wmi, struct sk_buff *skb, | |||
2171 | 2171 | ||
2172 | int ath6kl_wmi_dot11_hdr_remove(struct wmi *wmi, struct sk_buff *skb); | 2172 | int ath6kl_wmi_dot11_hdr_remove(struct wmi *wmi, struct sk_buff *skb); |
2173 | int ath6kl_wmi_dot3_2_dix(struct sk_buff *skb); | 2173 | int ath6kl_wmi_dot3_2_dix(struct sk_buff *skb); |
2174 | int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, struct sk_buff *skb, | 2174 | int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, u8 if_idx, |
2175 | u32 layer2_priority, bool wmm_enabled, | 2175 | struct sk_buff *skb, u32 layer2_priority, |
2176 | u8 *ac); | 2176 | bool wmm_enabled, u8 *ac); |
2177 | 2177 | ||
2178 | 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); |
2179 | 2179 | ||
@@ -2204,7 +2204,8 @@ int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u8 if_idx, u16 fg_start_sec, | |||
2204 | u16 pas_chdw_msec, u8 short_scan_ratio, | 2204 | u16 pas_chdw_msec, u8 short_scan_ratio, |
2205 | u8 scan_ctrl_flag, u32 max_dfsch_act_time, | 2205 | u8 scan_ctrl_flag, u32 max_dfsch_act_time, |
2206 | u16 maxact_scan_per_ssid); | 2206 | u16 maxact_scan_per_ssid); |
2207 | int ath6kl_wmi_bssfilter_cmd(struct wmi *wmi, u8 filter, u32 ie_mask); | 2207 | int ath6kl_wmi_bssfilter_cmd(struct wmi *wmi, u8 if_idx, u8 filter, |
2208 | u32 ie_mask); | ||
2208 | int ath6kl_wmi_probedssid_cmd(struct wmi *wmi, u8 if_idx, u8 index, u8 flag, | 2209 | int ath6kl_wmi_probedssid_cmd(struct wmi *wmi, u8 if_idx, u8 index, u8 flag, |
2209 | u8 ssid_len, u8 *ssid); | 2210 | u8 ssid_len, u8 *ssid); |
2210 | int ath6kl_wmi_listeninterval_cmd(struct wmi *wmi, u8 if_idx, | 2211 | int ath6kl_wmi_listeninterval_cmd(struct wmi *wmi, u8 if_idx, |
@@ -2216,9 +2217,10 @@ int ath6kl_wmi_pmparams_cmd(struct wmi *wmi, u16 idle_period, | |||
2216 | u16 tx_wakup_policy, u16 num_tx_to_wakeup, | 2217 | u16 tx_wakup_policy, u16 num_tx_to_wakeup, |
2217 | u16 ps_fail_event_policy); | 2218 | u16 ps_fail_event_policy); |
2218 | int ath6kl_wmi_disctimeout_cmd(struct wmi *wmi, u8 timeout); | 2219 | int ath6kl_wmi_disctimeout_cmd(struct wmi *wmi, u8 timeout); |
2219 | int ath6kl_wmi_create_pstream_cmd(struct wmi *wmi, | 2220 | int ath6kl_wmi_create_pstream_cmd(struct wmi *wmi, u8 if_idx, |
2220 | struct wmi_create_pstream_cmd *pstream); | 2221 | struct wmi_create_pstream_cmd *pstream); |
2221 | int ath6kl_wmi_delete_pstream_cmd(struct wmi *wmi, u8 traffic_class, u8 tsid); | 2222 | int ath6kl_wmi_delete_pstream_cmd(struct wmi *wmi, u8 if_idx, u8 traffic_class, |
2223 | u8 tsid); | ||
2222 | 2224 | ||
2223 | int ath6kl_wmi_set_rts_cmd(struct wmi *wmi, u16 threshold); | 2225 | int ath6kl_wmi_set_rts_cmd(struct wmi *wmi, u16 threshold); |
2224 | int ath6kl_wmi_set_lpreamble_cmd(struct wmi *wmi, u8 status, | 2226 | int ath6kl_wmi_set_lpreamble_cmd(struct wmi *wmi, u8 status, |
@@ -2234,7 +2236,7 @@ int ath6kl_wmi_addkey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index, | |||
2234 | u8 *key_rsc, u8 *key_material, | 2236 | u8 *key_rsc, u8 *key_material, |
2235 | u8 key_op_ctrl, u8 *mac_addr, | 2237 | u8 key_op_ctrl, u8 *mac_addr, |
2236 | enum wmi_sync_flag sync_flag); | 2238 | enum wmi_sync_flag sync_flag); |
2237 | int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 *krk); | 2239 | int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 if_idx, u8 *krk); |
2238 | int ath6kl_wmi_deletekey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index); | 2240 | int ath6kl_wmi_deletekey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index); |
2239 | int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, u8 if_idx, const u8 *bssid, | 2241 | int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, u8 if_idx, const u8 *bssid, |
2240 | const u8 *pmkid, bool set); | 2242 | const u8 *pmkid, bool set); |