diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 42 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/main.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/txrx.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 8 |
6 files changed, 55 insertions, 39 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 2b6f09a8b4a4..37be03b65713 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -443,7 +443,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
443 | } | 443 | } |
444 | } | 444 | } |
445 | 445 | ||
446 | ar->nw_type = ar->next_mode; | 446 | vif->nw_type = vif->next_mode; |
447 | 447 | ||
448 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, | 448 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, |
449 | "%s: connect called with authmode %d dot11 auth %d" | 449 | "%s: connect called with authmode %d dot11 auth %d" |
@@ -455,7 +455,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
455 | vif->grp_crypto_len, ar->ch_hint); | 455 | vif->grp_crypto_len, ar->ch_hint); |
456 | 456 | ||
457 | ar->reconnect_flag = 0; | 457 | ar->reconnect_flag = 0; |
458 | status = ath6kl_wmi_connect_cmd(ar->wmi, ar->nw_type, | 458 | status = ath6kl_wmi_connect_cmd(ar->wmi, vif->nw_type, |
459 | vif->dot11_auth_mode, vif->auth_mode, | 459 | vif->dot11_auth_mode, vif->auth_mode, |
460 | vif->prwise_crypto, | 460 | vif->prwise_crypto, |
461 | vif->prwise_crypto_len, | 461 | vif->prwise_crypto_len, |
@@ -665,7 +665,7 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason, | |||
665 | ar->scan_req = NULL; | 665 | ar->scan_req = NULL; |
666 | } | 666 | } |
667 | 667 | ||
668 | if (ar->nw_type & ADHOC_NETWORK) { | 668 | if (vif->nw_type & ADHOC_NETWORK) { |
669 | if (ar->wdev->iftype != NL80211_IFTYPE_ADHOC) { | 669 | if (ar->wdev->iftype != NL80211_IFTYPE_ADHOC) { |
670 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, | 670 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, |
671 | "%s: ath6k not in ibss mode\n", __func__); | 671 | "%s: ath6k not in ibss mode\n", __func__); |
@@ -676,7 +676,7 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason, | |||
676 | return; | 676 | return; |
677 | } | 677 | } |
678 | 678 | ||
679 | if (ar->nw_type & INFRA_NETWORK) { | 679 | if (vif->nw_type & INFRA_NETWORK) { |
680 | if (ar->wdev->iftype != NL80211_IFTYPE_STATION && | 680 | if (ar->wdev->iftype != NL80211_IFTYPE_STATION && |
681 | ar->wdev->iftype != NL80211_IFTYPE_P2P_CLIENT) { | 681 | ar->wdev->iftype != NL80211_IFTYPE_P2P_CLIENT) { |
682 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, | 682 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, |
@@ -906,7 +906,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, | |||
906 | 906 | ||
907 | vif->def_txkey_index = key_index; | 907 | vif->def_txkey_index = key_index; |
908 | 908 | ||
909 | if (ar->nw_type == AP_NETWORK && !pairwise && | 909 | if (vif->nw_type == AP_NETWORK && !pairwise && |
910 | (key_type == TKIP_CRYPT || key_type == AES_CRYPT) && params) { | 910 | (key_type == TKIP_CRYPT || key_type == AES_CRYPT) && params) { |
911 | ar->ap_mode_bkey.valid = true; | 911 | ar->ap_mode_bkey.valid = true; |
912 | ar->ap_mode_bkey.key_index = key_index; | 912 | ar->ap_mode_bkey.key_index = key_index; |
@@ -925,7 +925,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, | |||
925 | } | 925 | } |
926 | } | 926 | } |
927 | 927 | ||
928 | if (ar->next_mode == AP_NETWORK && key_type == WEP_CRYPT && | 928 | if (vif->next_mode == AP_NETWORK && key_type == WEP_CRYPT && |
929 | !test_bit(CONNECTED, &vif->flags)) { | 929 | !test_bit(CONNECTED, &vif->flags)) { |
930 | /* | 930 | /* |
931 | * Store the key locally so that it can be re-configured after | 931 | * Store the key locally so that it can be re-configured after |
@@ -1054,7 +1054,7 @@ static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy, | |||
1054 | if (multicast) | 1054 | if (multicast) |
1055 | key_type = vif->grp_crypto; | 1055 | key_type = vif->grp_crypto; |
1056 | 1056 | ||
1057 | if (ar->next_mode == AP_NETWORK && !test_bit(CONNECTED, &vif->flags)) | 1057 | if (vif->next_mode == AP_NETWORK && !test_bit(CONNECTED, &vif->flags)) |
1058 | return 0; /* Delay until AP mode has been started */ | 1058 | return 0; /* Delay until AP mode has been started */ |
1059 | 1059 | ||
1060 | status = ath6kl_wmi_addkey_cmd(ar->wmi, vif->def_txkey_index, | 1060 | status = ath6kl_wmi_addkey_cmd(ar->wmi, vif->def_txkey_index, |
@@ -1201,6 +1201,7 @@ static int ath6kl_cfg80211_change_iface(struct wiphy *wiphy, | |||
1201 | { | 1201 | { |
1202 | struct ath6kl *ar = ath6kl_priv(ndev); | 1202 | struct ath6kl *ar = ath6kl_priv(ndev); |
1203 | struct wireless_dev *wdev = ar->wdev; | 1203 | struct wireless_dev *wdev = ar->wdev; |
1204 | struct ath6kl_vif *vif = netdev_priv(ndev); | ||
1204 | 1205 | ||
1205 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: type %u\n", __func__, type); | 1206 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: type %u\n", __func__, type); |
1206 | 1207 | ||
@@ -1209,19 +1210,19 @@ static int ath6kl_cfg80211_change_iface(struct wiphy *wiphy, | |||
1209 | 1210 | ||
1210 | switch (type) { | 1211 | switch (type) { |
1211 | case NL80211_IFTYPE_STATION: | 1212 | case NL80211_IFTYPE_STATION: |
1212 | ar->next_mode = INFRA_NETWORK; | 1213 | vif->next_mode = INFRA_NETWORK; |
1213 | break; | 1214 | break; |
1214 | case NL80211_IFTYPE_ADHOC: | 1215 | case NL80211_IFTYPE_ADHOC: |
1215 | ar->next_mode = ADHOC_NETWORK; | 1216 | vif->next_mode = ADHOC_NETWORK; |
1216 | break; | 1217 | break; |
1217 | case NL80211_IFTYPE_AP: | 1218 | case NL80211_IFTYPE_AP: |
1218 | ar->next_mode = AP_NETWORK; | 1219 | vif->next_mode = AP_NETWORK; |
1219 | break; | 1220 | break; |
1220 | case NL80211_IFTYPE_P2P_CLIENT: | 1221 | case NL80211_IFTYPE_P2P_CLIENT: |
1221 | ar->next_mode = INFRA_NETWORK; | 1222 | vif->next_mode = INFRA_NETWORK; |
1222 | break; | 1223 | break; |
1223 | case NL80211_IFTYPE_P2P_GO: | 1224 | case NL80211_IFTYPE_P2P_GO: |
1224 | ar->next_mode = AP_NETWORK; | 1225 | vif->next_mode = AP_NETWORK; |
1225 | break; | 1226 | break; |
1226 | default: | 1227 | default: |
1227 | ath6kl_err("invalid interface type %u\n", type); | 1228 | ath6kl_err("invalid interface type %u\n", type); |
@@ -1278,7 +1279,7 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy, | |||
1278 | ath6kl_set_cipher(ar, 0, false); | 1279 | ath6kl_set_cipher(ar, 0, false); |
1279 | } | 1280 | } |
1280 | 1281 | ||
1281 | ar->nw_type = ar->next_mode; | 1282 | vif->nw_type = vif->next_mode; |
1282 | 1283 | ||
1283 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, | 1284 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, |
1284 | "%s: connect called with authmode %d dot11 auth %d" | 1285 | "%s: connect called with authmode %d dot11 auth %d" |
@@ -1289,7 +1290,7 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy, | |||
1289 | vif->prwise_crypto_len, vif->grp_crypto, | 1290 | vif->prwise_crypto_len, vif->grp_crypto, |
1290 | vif->grp_crypto_len, ar->ch_hint); | 1291 | vif->grp_crypto_len, ar->ch_hint); |
1291 | 1292 | ||
1292 | status = ath6kl_wmi_connect_cmd(ar->wmi, ar->nw_type, | 1293 | status = ath6kl_wmi_connect_cmd(ar->wmi, vif->nw_type, |
1293 | vif->dot11_auth_mode, vif->auth_mode, | 1294 | vif->dot11_auth_mode, vif->auth_mode, |
1294 | vif->prwise_crypto, | 1295 | vif->prwise_crypto, |
1295 | vif->prwise_crypto_len, | 1296 | vif->prwise_crypto_len, |
@@ -1476,7 +1477,7 @@ static int ath6kl_get_station(struct wiphy *wiphy, struct net_device *dev, | |||
1476 | 1477 | ||
1477 | if (test_bit(CONNECTED, &vif->flags) && | 1478 | if (test_bit(CONNECTED, &vif->flags) && |
1478 | test_bit(DTIM_PERIOD_AVAIL, &vif->flags) && | 1479 | test_bit(DTIM_PERIOD_AVAIL, &vif->flags) && |
1479 | ar->nw_type == INFRA_NETWORK) { | 1480 | vif->nw_type == INFRA_NETWORK) { |
1480 | sinfo->filled |= STATION_INFO_BSS_PARAM; | 1481 | sinfo->filled |= STATION_INFO_BSS_PARAM; |
1481 | sinfo->bss_param.flags = 0; | 1482 | sinfo->bss_param.flags = 0; |
1482 | sinfo->bss_param.dtim_period = ar->assoc_bss_dtim_period; | 1483 | sinfo->bss_param.dtim_period = ar->assoc_bss_dtim_period; |
@@ -1604,7 +1605,7 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev, | |||
1604 | if (!ath6kl_cfg80211_ready(ar)) | 1605 | if (!ath6kl_cfg80211_ready(ar)) |
1605 | return -EIO; | 1606 | return -EIO; |
1606 | 1607 | ||
1607 | if (ar->next_mode != AP_NETWORK) | 1608 | if (vif->next_mode != AP_NETWORK) |
1608 | return -EOPNOTSUPP; | 1609 | return -EOPNOTSUPP; |
1609 | 1610 | ||
1610 | if (info->beacon_ies) { | 1611 | if (info->beacon_ies) { |
@@ -1715,7 +1716,7 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev, | |||
1715 | ath6kl_set_cipher(ar, info->crypto.cipher_group, false); | 1716 | ath6kl_set_cipher(ar, info->crypto.cipher_group, false); |
1716 | 1717 | ||
1717 | p.nw_type = AP_NETWORK; | 1718 | p.nw_type = AP_NETWORK; |
1718 | ar->nw_type = ar->next_mode; | 1719 | vif->nw_type = vif->next_mode; |
1719 | 1720 | ||
1720 | p.ssid_len = vif->ssid_len; | 1721 | p.ssid_len = vif->ssid_len; |
1721 | memcpy(p.ssid, vif->ssid, vif->ssid_len); | 1722 | memcpy(p.ssid, vif->ssid, vif->ssid_len); |
@@ -1746,7 +1747,7 @@ static int ath6kl_del_beacon(struct wiphy *wiphy, struct net_device *dev) | |||
1746 | struct ath6kl *ar = ath6kl_priv(dev); | 1747 | struct ath6kl *ar = ath6kl_priv(dev); |
1747 | struct ath6kl_vif *vif = netdev_priv(dev); | 1748 | struct ath6kl_vif *vif = netdev_priv(dev); |
1748 | 1749 | ||
1749 | if (ar->nw_type != AP_NETWORK) | 1750 | if (vif->nw_type != AP_NETWORK) |
1750 | return -EOPNOTSUPP; | 1751 | return -EOPNOTSUPP; |
1751 | if (!test_bit(CONNECTED, &vif->flags)) | 1752 | if (!test_bit(CONNECTED, &vif->flags)) |
1752 | return -ENOTCONN; | 1753 | return -ENOTCONN; |
@@ -1761,8 +1762,9 @@ static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev, | |||
1761 | u8 *mac, struct station_parameters *params) | 1762 | u8 *mac, struct station_parameters *params) |
1762 | { | 1763 | { |
1763 | struct ath6kl *ar = ath6kl_priv(dev); | 1764 | struct ath6kl *ar = ath6kl_priv(dev); |
1765 | struct ath6kl_vif *vif = netdev_priv(dev); | ||
1764 | 1766 | ||
1765 | if (ar->nw_type != AP_NETWORK) | 1767 | if (vif->nw_type != AP_NETWORK) |
1766 | return -EOPNOTSUPP; | 1768 | return -EOPNOTSUPP; |
1767 | 1769 | ||
1768 | /* Use this only for authorizing/unauthorizing a station */ | 1770 | /* Use this only for authorizing/unauthorizing a station */ |
@@ -1854,7 +1856,7 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | |||
1854 | 1856 | ||
1855 | mgmt = (const struct ieee80211_mgmt *) buf; | 1857 | mgmt = (const struct ieee80211_mgmt *) buf; |
1856 | if (buf + len >= mgmt->u.probe_resp.variable && | 1858 | if (buf + len >= mgmt->u.probe_resp.variable && |
1857 | ar->nw_type == AP_NETWORK && test_bit(CONNECTED, &vif->flags) && | 1859 | vif->nw_type == AP_NETWORK && test_bit(CONNECTED, &vif->flags) && |
1858 | ieee80211_is_probe_resp(mgmt->frame_control)) { | 1860 | ieee80211_is_probe_resp(mgmt->frame_control)) { |
1859 | /* | 1861 | /* |
1860 | * Send Probe Response frame in AP mode using a separate WMI | 1862 | * Send Probe Response frame in AP mode using a separate WMI |
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index f401715795a8..714092a264a4 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
@@ -407,6 +407,8 @@ struct ath6kl_vif { | |||
407 | u8 grp_crypto; | 407 | u8 grp_crypto; |
408 | u8 grp_crypto_len; | 408 | u8 grp_crypto_len; |
409 | u8 def_txkey_index; | 409 | u8 def_txkey_index; |
410 | u8 next_mode; | ||
411 | u8 nw_type; | ||
410 | }; | 412 | }; |
411 | 413 | ||
412 | /* Flag info */ | 414 | /* Flag info */ |
@@ -435,8 +437,6 @@ struct ath6kl { | |||
435 | struct ath6kl_vif *vif; | 437 | struct ath6kl_vif *vif; |
436 | spinlock_t lock; | 438 | spinlock_t lock; |
437 | struct semaphore sem; | 439 | struct semaphore sem; |
438 | u8 next_mode; | ||
439 | u8 nw_type; | ||
440 | struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1]; | 440 | struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1]; |
441 | u8 bssid[ETH_ALEN]; | 441 | u8 bssid[ETH_ALEN]; |
442 | u8 req_bssid[ETH_ALEN]; | 442 | u8 req_bssid[ETH_ALEN]; |
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index d9dd1828d08a..39cd6c765d26 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c | |||
@@ -91,7 +91,7 @@ void ath6kl_init_profile_info(struct ath6kl *ar) | |||
91 | memset(ar->req_bssid, 0, sizeof(ar->req_bssid)); | 91 | memset(ar->req_bssid, 0, sizeof(ar->req_bssid)); |
92 | memset(ar->bssid, 0, sizeof(ar->bssid)); | 92 | memset(ar->bssid, 0, sizeof(ar->bssid)); |
93 | ar->bss_ch = 0; | 93 | ar->bss_ch = 0; |
94 | ar->nw_type = ar->next_mode = INFRA_NETWORK; | 94 | vif->nw_type = vif->next_mode = INFRA_NETWORK; |
95 | } | 95 | } |
96 | 96 | ||
97 | static int ath6kl_set_host_app_area(struct ath6kl *ar) | 97 | static int ath6kl_set_host_app_area(struct ath6kl *ar) |
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index a207377620c8..4add0efe59b6 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c | |||
@@ -22,10 +22,12 @@ | |||
22 | 22 | ||
23 | struct ath6kl_sta *ath6kl_find_sta(struct ath6kl *ar, u8 *node_addr) | 23 | struct ath6kl_sta *ath6kl_find_sta(struct ath6kl *ar, u8 *node_addr) |
24 | { | 24 | { |
25 | /* TODO: Findout vif */ | ||
26 | struct ath6kl_vif *vif = ar->vif; | ||
25 | struct ath6kl_sta *conn = NULL; | 27 | struct ath6kl_sta *conn = NULL; |
26 | u8 i, max_conn; | 28 | u8 i, max_conn; |
27 | 29 | ||
28 | max_conn = (ar->nw_type == AP_NETWORK) ? AP_MAX_NUM_STA : 0; | 30 | max_conn = (vif->nw_type == AP_NETWORK) ? AP_MAX_NUM_STA : 0; |
29 | 31 | ||
30 | for (i = 0; i < max_conn; i++) { | 32 | for (i = 0; i < max_conn; i++) { |
31 | if (memcmp(node_addr, ar->sta_list[i].mac, ETH_ALEN) == 0) { | 33 | if (memcmp(node_addr, ar->sta_list[i].mac, ETH_ALEN) == 0) { |
@@ -461,7 +463,7 @@ void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile, | |||
461 | */ | 463 | */ |
462 | if (discon_issued) | 464 | if (discon_issued) |
463 | ath6kl_disconnect_event(ar, DISCONNECT_CMD, | 465 | ath6kl_disconnect_event(ar, DISCONNECT_CMD, |
464 | (ar->nw_type & AP_NETWORK) ? | 466 | (vif->nw_type & AP_NETWORK) ? |
465 | bcast_mac : ar->bssid, | 467 | bcast_mac : ar->bssid, |
466 | 0, NULL, 0); | 468 | 0, NULL, 0); |
467 | 469 | ||
@@ -1058,7 +1060,7 @@ void ath6kl_connect_event(struct ath6kl *ar, u16 channel, u8 *bssid, | |||
1058 | memcpy(ar->bssid, bssid, sizeof(ar->bssid)); | 1060 | memcpy(ar->bssid, bssid, sizeof(ar->bssid)); |
1059 | ar->bss_ch = channel; | 1061 | ar->bss_ch = channel; |
1060 | 1062 | ||
1061 | if ((ar->nw_type == INFRA_NETWORK)) | 1063 | if ((vif->nw_type == INFRA_NETWORK)) |
1062 | ath6kl_wmi_listeninterval_cmd(ar->wmi, ar->listen_intvl_t, | 1064 | ath6kl_wmi_listeninterval_cmd(ar->wmi, ar->listen_intvl_t, |
1063 | ar->listen_intvl_b); | 1065 | ar->listen_intvl_b); |
1064 | 1066 | ||
@@ -1074,7 +1076,7 @@ void ath6kl_connect_event(struct ath6kl *ar, u16 channel, u8 *bssid, | |||
1074 | aggr_reset_state(ar->aggr_cntxt); | 1076 | aggr_reset_state(ar->aggr_cntxt); |
1075 | ar->reconnect_flag = 0; | 1077 | ar->reconnect_flag = 0; |
1076 | 1078 | ||
1077 | if ((ar->nw_type == ADHOC_NETWORK) && ar->ibss_ps_enable) { | 1079 | if ((vif->nw_type == ADHOC_NETWORK) && ar->ibss_ps_enable) { |
1078 | memset(ar->node_map, 0, sizeof(ar->node_map)); | 1080 | memset(ar->node_map, 0, sizeof(ar->node_map)); |
1079 | ar->node_num = 0; | 1081 | ar->node_num = 0; |
1080 | ar->next_ep_id = ENDPOINT_2; | 1082 | ar->next_ep_id = ENDPOINT_2; |
@@ -1089,12 +1091,14 @@ void ath6kl_connect_event(struct ath6kl *ar, u16 channel, u8 *bssid, | |||
1089 | void ath6kl_tkip_micerr_event(struct ath6kl *ar, u8 keyid, bool ismcast) | 1091 | void ath6kl_tkip_micerr_event(struct ath6kl *ar, u8 keyid, bool ismcast) |
1090 | { | 1092 | { |
1091 | struct ath6kl_sta *sta; | 1093 | struct ath6kl_sta *sta; |
1094 | /* TODO: Findout vif */ | ||
1095 | struct ath6kl_vif *vif = ar->vif; | ||
1092 | u8 tsc[6]; | 1096 | u8 tsc[6]; |
1093 | /* | 1097 | /* |
1094 | * For AP case, keyid will have aid of STA which sent pkt with | 1098 | * For AP case, keyid will have aid of STA which sent pkt with |
1095 | * MIC error. Use this aid to get MAC & send it to hostapd. | 1099 | * MIC error. Use this aid to get MAC & send it to hostapd. |
1096 | */ | 1100 | */ |
1097 | if (ar->nw_type == AP_NETWORK) { | 1101 | if (vif->nw_type == AP_NETWORK) { |
1098 | sta = ath6kl_find_sta_by_aid(ar, (keyid >> 2)); | 1102 | sta = ath6kl_find_sta_by_aid(ar, (keyid >> 2)); |
1099 | if (!sta) | 1103 | if (!sta) |
1100 | return; | 1104 | return; |
@@ -1227,9 +1231,11 @@ void ath6kl_tgt_stats_event(struct ath6kl *ar, u8 *ptr, u32 len) | |||
1227 | struct wmi_ap_mode_stat *p = (struct wmi_ap_mode_stat *) ptr; | 1231 | struct wmi_ap_mode_stat *p = (struct wmi_ap_mode_stat *) ptr; |
1228 | struct wmi_ap_mode_stat *ap = &ar->ap_stats; | 1232 | struct wmi_ap_mode_stat *ap = &ar->ap_stats; |
1229 | struct wmi_per_sta_stat *st_ap, *st_p; | 1233 | struct wmi_per_sta_stat *st_ap, *st_p; |
1234 | /* TODO: Findout vif */ | ||
1235 | struct ath6kl_vif *vif = ar->vif; | ||
1230 | u8 ac; | 1236 | u8 ac; |
1231 | 1237 | ||
1232 | if (ar->nw_type == AP_NETWORK) { | 1238 | if (vif->nw_type == AP_NETWORK) { |
1233 | if (len < sizeof(*p)) | 1239 | if (len < sizeof(*p)) |
1234 | return; | 1240 | return; |
1235 | 1241 | ||
@@ -1357,7 +1363,7 @@ void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid, | |||
1357 | /* TODO: Findout vif instead of taking it from ar */ | 1363 | /* TODO: Findout vif instead of taking it from ar */ |
1358 | struct ath6kl_vif *vif = ar->vif; | 1364 | struct ath6kl_vif *vif = ar->vif; |
1359 | 1365 | ||
1360 | if (ar->nw_type == AP_NETWORK) { | 1366 | if (vif->nw_type == AP_NETWORK) { |
1361 | if (!ath6kl_remove_sta(ar, bssid, prot_reason_status)) | 1367 | if (!ath6kl_remove_sta(ar, bssid, prot_reason_status)) |
1362 | return; | 1368 | return; |
1363 | 1369 | ||
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index d1652bdb51d8..6b1795c8f554 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c | |||
@@ -258,7 +258,7 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev) | |||
258 | goto fail_tx; | 258 | goto fail_tx; |
259 | 259 | ||
260 | /* AP mode Power saving processing */ | 260 | /* AP mode Power saving processing */ |
261 | if (ar->nw_type == AP_NETWORK) { | 261 | if (vif->nw_type == AP_NETWORK) { |
262 | if (ath6kl_powersave_ap(ar, skb, &more_data)) | 262 | if (ath6kl_powersave_ap(ar, skb, &more_data)) |
263 | return 0; | 263 | return 0; |
264 | } | 264 | } |
@@ -280,7 +280,7 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev) | |||
280 | goto fail_tx; | 280 | goto fail_tx; |
281 | } | 281 | } |
282 | 282 | ||
283 | if ((ar->nw_type == ADHOC_NETWORK) && | 283 | if ((vif->nw_type == ADHOC_NETWORK) && |
284 | ar->ibss_ps_enable && test_bit(CONNECTED, &vif->flags)) | 284 | ar->ibss_ps_enable && test_bit(CONNECTED, &vif->flags)) |
285 | chk_adhoc_ps_mapping = true; | 285 | chk_adhoc_ps_mapping = true; |
286 | else { | 286 | else { |
@@ -450,7 +450,7 @@ enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *target, | |||
450 | if (packet->info.tx.tag == ATH6KL_CONTROL_PKT_TAG) | 450 | if (packet->info.tx.tag == ATH6KL_CONTROL_PKT_TAG) |
451 | return HTC_SEND_FULL_KEEP; | 451 | return HTC_SEND_FULL_KEEP; |
452 | 452 | ||
453 | if (ar->nw_type == ADHOC_NETWORK) | 453 | if (vif->nw_type == ADHOC_NETWORK) |
454 | /* | 454 | /* |
455 | * In adhoc mode, we cannot differentiate traffic | 455 | * In adhoc mode, we cannot differentiate traffic |
456 | * priorities so there is no need to continue, however we | 456 | * priorities so there is no need to continue, however we |
@@ -484,9 +484,11 @@ stop_net_queues: | |||
484 | static void ath6kl_tx_clear_node_map(struct ath6kl *ar, | 484 | static void ath6kl_tx_clear_node_map(struct ath6kl *ar, |
485 | enum htc_endpoint_id eid, u32 map_no) | 485 | enum htc_endpoint_id eid, u32 map_no) |
486 | { | 486 | { |
487 | /* TODO: Findout vif */ | ||
488 | struct ath6kl_vif *vif = ar->vif; | ||
487 | u32 i; | 489 | u32 i; |
488 | 490 | ||
489 | if (ar->nw_type != ADHOC_NETWORK) | 491 | if (vif->nw_type != ADHOC_NETWORK) |
490 | return; | 492 | return; |
491 | 493 | ||
492 | if (!ar->ibss_ps_enable) | 494 | if (!ar->ibss_ps_enable) |
@@ -1048,6 +1050,8 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1048 | struct ath6kl_sta *conn = NULL; | 1050 | struct ath6kl_sta *conn = NULL; |
1049 | struct sk_buff *skb1 = NULL; | 1051 | struct sk_buff *skb1 = NULL; |
1050 | struct ethhdr *datap = NULL; | 1052 | struct ethhdr *datap = NULL; |
1053 | /* TODO: Findout vif */ | ||
1054 | struct ath6kl_vif *vif = ar->vif; | ||
1051 | u16 seq_no, offset; | 1055 | u16 seq_no, offset; |
1052 | u8 tid; | 1056 | u8 tid; |
1053 | 1057 | ||
@@ -1103,7 +1107,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1103 | * that do not have LLC hdr. They are 16 bytes in size. | 1107 | * that do not have LLC hdr. They are 16 bytes in size. |
1104 | * Allow these frames in the AP mode. | 1108 | * Allow these frames in the AP mode. |
1105 | */ | 1109 | */ |
1106 | if (ar->nw_type != AP_NETWORK && | 1110 | if (vif->nw_type != AP_NETWORK && |
1107 | ((packet->act_len < min_hdr_len) || | 1111 | ((packet->act_len < min_hdr_len) || |
1108 | (packet->act_len > WMI_MAX_AMSDU_RX_DATA_FRAME_LENGTH))) { | 1112 | (packet->act_len > WMI_MAX_AMSDU_RX_DATA_FRAME_LENGTH))) { |
1109 | ath6kl_info("frame len is too short or too long\n"); | 1113 | ath6kl_info("frame len is too short or too long\n"); |
@@ -1114,7 +1118,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1114 | } | 1118 | } |
1115 | 1119 | ||
1116 | /* Get the Power save state of the STA */ | 1120 | /* Get the Power save state of the STA */ |
1117 | if (ar->nw_type == AP_NETWORK) { | 1121 | if (vif->nw_type == AP_NETWORK) { |
1118 | meta_type = wmi_data_hdr_get_meta(dhdr); | 1122 | meta_type = wmi_data_hdr_get_meta(dhdr); |
1119 | 1123 | ||
1120 | ps_state = !!((dhdr->info >> WMI_DATA_HDR_PS_SHIFT) & | 1124 | ps_state = !!((dhdr->info >> WMI_DATA_HDR_PS_SHIFT) & |
@@ -1227,7 +1231,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1227 | return; | 1231 | return; |
1228 | } | 1232 | } |
1229 | 1233 | ||
1230 | if (ar->nw_type == AP_NETWORK) { | 1234 | if (vif->nw_type == AP_NETWORK) { |
1231 | datap = (struct ethhdr *) skb->data; | 1235 | datap = (struct ethhdr *) skb->data; |
1232 | if (is_multicast_ether_addr(datap->h_dest)) | 1236 | if (is_multicast_ether_addr(datap->h_dest)) |
1233 | /* | 1237 | /* |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index a71d77311251..701d26d0b577 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -504,6 +504,8 @@ static int ath6kl_wmi_rx_probe_req_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
504 | u32 freq; | 504 | u32 freq; |
505 | u16 dlen; | 505 | u16 dlen; |
506 | struct ath6kl *ar = wmi->parent_dev; | 506 | struct ath6kl *ar = wmi->parent_dev; |
507 | /* TODO: Findout vif */ | ||
508 | struct ath6kl_vif *vif = ar->vif; | ||
507 | 509 | ||
508 | if (len < sizeof(*ev)) | 510 | if (len < sizeof(*ev)) |
509 | return -EINVAL; | 511 | return -EINVAL; |
@@ -520,7 +522,7 @@ static int ath6kl_wmi_rx_probe_req_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
520 | "probe_req_report=%d\n", | 522 | "probe_req_report=%d\n", |
521 | dlen, freq, ar->probe_req_report); | 523 | dlen, freq, ar->probe_req_report); |
522 | 524 | ||
523 | if (ar->probe_req_report || ar->nw_type == AP_NETWORK) | 525 | if (ar->probe_req_report || vif->nw_type == AP_NETWORK) |
524 | cfg80211_rx_mgmt(ar->net_dev, freq, ev->data, dlen, GFP_ATOMIC); | 526 | cfg80211_rx_mgmt(ar->net_dev, freq, ev->data, dlen, GFP_ATOMIC); |
525 | 527 | ||
526 | return 0; | 528 | return 0; |
@@ -727,13 +729,15 @@ static int ath6kl_wmi_connect_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
727 | struct wmi_connect_event *ev; | 729 | struct wmi_connect_event *ev; |
728 | u8 *pie, *peie; | 730 | u8 *pie, *peie; |
729 | struct ath6kl *ar = wmi->parent_dev; | 731 | struct ath6kl *ar = wmi->parent_dev; |
732 | /* TODO: Findout vif */ | ||
733 | struct ath6kl_vif *vif = ar->vif; | ||
730 | 734 | ||
731 | if (len < sizeof(struct wmi_connect_event)) | 735 | if (len < sizeof(struct wmi_connect_event)) |
732 | return -EINVAL; | 736 | return -EINVAL; |
733 | 737 | ||
734 | ev = (struct wmi_connect_event *) datap; | 738 | ev = (struct wmi_connect_event *) datap; |
735 | 739 | ||
736 | if (ar->nw_type == AP_NETWORK) { | 740 | if (vif->nw_type == AP_NETWORK) { |
737 | /* AP mode start/STA connected event */ | 741 | /* AP mode start/STA connected event */ |
738 | struct net_device *dev = ar->net_dev; | 742 | struct net_device *dev = ar->net_dev; |
739 | if (memcmp(dev->dev_addr, ev->u.ap_bss.bssid, ETH_ALEN) == 0) { | 743 | if (memcmp(dev->dev_addr, ev->u.ap_bss.bssid, ETH_ALEN) == 0) { |