aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/main.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/main.c20
1 files changed, 13 insertions, 7 deletions
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
23struct ath6kl_sta *ath6kl_find_sta(struct ath6kl *ar, u8 *node_addr) 23struct 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,
1089void ath6kl_tkip_micerr_event(struct ath6kl *ar, u8 keyid, bool ismcast) 1091void 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