From 2132c69cb9efaf2b7300f6da916ab5f96c9c95b7 Mon Sep 17 00:00:00 2001 From: Vasanthakumar Thiagarajan Date: Tue, 25 Oct 2011 19:34:07 +0530 Subject: [PATCH] ath6kl: Move aggregation information to vif structure Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath6kl/cfg80211.c | 10 ++++------ drivers/net/wireless/ath/ath6kl/core.h | 2 +- drivers/net/wireless/ath/ath6kl/main.c | 4 ++-- drivers/net/wireless/ath/ath6kl/txrx.c | 10 +++++++--- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index a5c0a58..d08f755 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -2064,8 +2064,8 @@ static int ath6kl_init_if_data(struct ath6kl_vif *vif) { struct ath6kl *ar = vif->ar; - ar->aggr_cntxt = aggr_init(vif->ndev); - if (!ar->aggr_cntxt) { + vif->aggr_cntxt = aggr_init(vif->ndev); + if (!vif->aggr_cntxt) { ath6kl_err("failed to initialize aggr\n"); return -ENOMEM; } @@ -2078,11 +2078,9 @@ static int ath6kl_init_if_data(struct ath6kl_vif *vif) void ath6kl_deinit_if_data(struct ath6kl_vif *vif) { - struct ath6kl *ar = vif->ar; - - aggr_module_destroy(ar->aggr_cntxt); + aggr_module_destroy(vif->aggr_cntxt); - ar->aggr_cntxt = NULL; + vif->aggr_cntxt = NULL; if (test_bit(NETDEV_REGISTERED, &vif->flags)) { unregister_netdev(vif->ndev); diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index dc21d7a..f15dd6d 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h @@ -415,6 +415,7 @@ struct ath6kl_vif { u16 bss_ch; struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1]; struct ath6kl_key keys[WMI_MAX_KEY_INDEX + 1]; + struct aggr_info *aggr_cntxt; }; /* Flag info */ @@ -473,7 +474,6 @@ struct ath6kl { struct sk_buff_head mcastpsq; spinlock_t mcastpsq_lock; u8 intra_bss; - struct aggr_info *aggr_cntxt; struct wmi_ap_mode_stat ap_stats; u8 ap_country_code[3]; struct list_head amsdu_rx_buffer_queue; diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index eb2137c..0bdb73c 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c @@ -1073,7 +1073,7 @@ void ath6kl_connect_event(struct ath6kl *ar, u16 channel, u8 *bssid, netif_carrier_on(ar->net_dev); spin_unlock_bh(&ar->lock); - aggr_reset_state(ar->aggr_cntxt); + aggr_reset_state(vif->aggr_cntxt); ar->reconnect_flag = 0; if ((vif->nw_type == ADHOC_NETWORK) && ar->ibss_ps_enable) { @@ -1394,7 +1394,7 @@ void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid, assoc_resp_len, assoc_info, prot_reason_status); - aggr_reset_state(ar->aggr_cntxt); + aggr_reset_state(vif->aggr_cntxt); del_timer(&ar->disconnect_timer); diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index 6b1795c..ba1678e 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -1268,7 +1268,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) datap = (struct ethhdr *) skb->data; if (is_unicast_ether_addr(datap->h_dest) && - aggr_process_recv_frm(ar->aggr_cntxt, tid, seq_no, + aggr_process_recv_frm(vif->aggr_cntxt, tid, seq_no, is_amsdu, skb)) /* aggregation code will handle the skb */ return; @@ -1353,7 +1353,9 @@ static void aggr_delete_tid_state(struct aggr_info *p_aggr, u8 tid) void aggr_recv_addba_req_evt(struct ath6kl *ar, u8 tid, u16 seq_no, u8 win_sz) { - struct aggr_info *p_aggr = ar->aggr_cntxt; + /* TODO: Findout vif */ + struct ath6kl_vif *vif = ar->vif; + struct aggr_info *p_aggr = vif->aggr_cntxt; struct rxtid *rxtid; struct rxtid_stats *stats; u16 hold_q_size; @@ -1422,7 +1424,9 @@ struct aggr_info *aggr_init(struct net_device *dev) void aggr_recv_delba_req_evt(struct ath6kl *ar, u8 tid) { - struct aggr_info *p_aggr = ar->aggr_cntxt; + /* TODO: Findout vif */ + struct ath6kl_vif *vif = ar->vif; + struct aggr_info *p_aggr = vif->aggr_cntxt; struct rxtid *rxtid; if (!p_aggr) -- 2.7.4