| OLD | NEW |
| 1 /* | 1 /* |
| 2 * HT handling | 2 * HT handling |
| 3 * | 3 * |
| 4 * Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi> | 4 * Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi> |
| 5 * Copyright 2002-2005, Instant802 Networks, Inc. | 5 * Copyright 2002-2005, Instant802 Networks, Inc. |
| 6 * Copyright 2005-2006, Devicescape Software, Inc. | 6 * Copyright 2005-2006, Devicescape Software, Inc. |
| 7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> | 7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> |
| 8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> | 8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> |
| 9 * Copyright 2007-2010, Intel Corporation | 9 * Copyright 2007-2010, Intel Corporation |
| 10 * | 10 * |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 i < IEEE80211_HT_MCS_MASK_LEN; i++) | 94 i < IEEE80211_HT_MCS_MASK_LEN; i++) |
| 95 ht_cap->mcs.rx_mask[i] = | 95 ht_cap->mcs.rx_mask[i] = |
| 96 sband->ht_cap.mcs.rx_mask[i] & | 96 sband->ht_cap.mcs.rx_mask[i] & |
| 97 ht_cap_ie->mcs.rx_mask[i]; | 97 ht_cap_ie->mcs.rx_mask[i]; |
| 98 | 98 |
| 99 /* handle MCS rate 32 too */ | 99 /* handle MCS rate 32 too */ |
| 100 if (sband->ht_cap.mcs.rx_mask[32/8] & ht_cap_ie->mcs.rx_mask[32/8] & 1) | 100 if (sband->ht_cap.mcs.rx_mask[32/8] & ht_cap_ie->mcs.rx_mask[32/8] & 1) |
| 101 ht_cap->mcs.rx_mask[32/8] |= 1; | 101 ht_cap->mcs.rx_mask[32/8] |= 1; |
| 102 } | 102 } |
| 103 | 103 |
| 104 void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, bool tx) | 104 void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta) |
| 105 { | 105 { |
| 106 int i; | 106 int i; |
| 107 | 107 |
| 108 cancel_work_sync(&sta->ampdu_mlme.work); | 108 cancel_work_sync(&sta->ampdu_mlme.work); |
| 109 | 109 |
| 110 for (i = 0; i < STA_TID_NUM; i++) { | 110 for (i = 0; i < STA_TID_NUM; i++) { |
| 111 » » __ieee80211_stop_tx_ba_session(sta, i, WLAN_BACK_INITIATOR, tx); | 111 » » __ieee80211_stop_tx_ba_session(sta, i, WLAN_BACK_INITIATOR); |
| 112 __ieee80211_stop_rx_ba_session(sta, i, WLAN_BACK_RECIPIENT, | 112 __ieee80211_stop_rx_ba_session(sta, i, WLAN_BACK_RECIPIENT, |
| 113 » » » » » WLAN_REASON_QSTA_LEAVE_QBSS, tx); | 113 » » » » » WLAN_REASON_QSTA_LEAVE_QBSS); |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 | 116 |
| 117 void ieee80211_ba_session_work(struct work_struct *work) | 117 void ieee80211_ba_session_work(struct work_struct *work) |
| 118 { | 118 { |
| 119 struct sta_info *sta = | 119 struct sta_info *sta = |
| 120 container_of(work, struct sta_info, ampdu_mlme.work); | 120 container_of(work, struct sta_info, ampdu_mlme.work); |
| 121 struct tid_ampdu_tx *tid_tx; | 121 struct tid_ampdu_tx *tid_tx; |
| 122 int tid; | 122 int tid; |
| 123 | 123 |
| 124 /* | 124 /* |
| 125 * When this flag is set, new sessions should be | 125 * When this flag is set, new sessions should be |
| 126 * blocked, and existing sessions will be torn | 126 * blocked, and existing sessions will be torn |
| 127 * down by the code that set the flag, so this | 127 * down by the code that set the flag, so this |
| 128 * need not run. | 128 * need not run. |
| 129 */ | 129 */ |
| 130 if (test_sta_flags(sta, WLAN_STA_BLOCK_BA)) | 130 if (test_sta_flags(sta, WLAN_STA_BLOCK_BA)) |
| 131 return; | 131 return; |
| 132 | 132 |
| 133 mutex_lock(&sta->ampdu_mlme.mtx); | 133 mutex_lock(&sta->ampdu_mlme.mtx); |
| 134 for (tid = 0; tid < STA_TID_NUM; tid++) { | 134 for (tid = 0; tid < STA_TID_NUM; tid++) { |
| 135 if (test_and_clear_bit(tid, sta->ampdu_mlme.tid_rx_timer_expired
)) | 135 if (test_and_clear_bit(tid, sta->ampdu_mlme.tid_rx_timer_expired
)) |
| 136 ___ieee80211_stop_rx_ba_session( | 136 ___ieee80211_stop_rx_ba_session( |
| 137 sta, tid, WLAN_BACK_RECIPIENT, | 137 sta, tid, WLAN_BACK_RECIPIENT, |
| 138 » » » » WLAN_REASON_QSTA_TIMEOUT, true); | 138 » » » » WLAN_REASON_QSTA_TIMEOUT); |
| 139 | 139 |
| 140 tid_tx = sta->ampdu_mlme.tid_tx[tid]; | 140 tid_tx = sta->ampdu_mlme.tid_tx[tid]; |
| 141 if (!tid_tx) | 141 if (!tid_tx) |
| 142 continue; | 142 continue; |
| 143 | 143 |
| 144 if (test_bit(HT_AGG_STATE_WANT_START, &tid_tx->state)) | 144 if (test_bit(HT_AGG_STATE_WANT_START, &tid_tx->state)) |
| 145 ieee80211_tx_ba_session_handle_start(sta, tid); | 145 ieee80211_tx_ba_session_handle_start(sta, tid); |
| 146 else if (test_and_clear_bit(HT_AGG_STATE_WANT_STOP, | 146 else if (test_and_clear_bit(HT_AGG_STATE_WANT_STOP, |
| 147 &tid_tx->state)) | 147 &tid_tx->state)) |
| 148 ___ieee80211_stop_tx_ba_session(sta, tid, | 148 ___ieee80211_stop_tx_ba_session(sta, tid, |
| 149 » » » » » » » WLAN_BACK_INITIATOR, | 149 » » » » » » » WLAN_BACK_INITIATOR); |
| 150 » » » » » » » true); | |
| 151 } | 150 } |
| 152 mutex_unlock(&sta->ampdu_mlme.mtx); | 151 mutex_unlock(&sta->ampdu_mlme.mtx); |
| 153 } | 152 } |
| 154 | 153 |
| 155 void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata, | 154 void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata, |
| 156 const u8 *da, u16 tid, | 155 const u8 *da, u16 tid, |
| 157 u16 initiator, u16 reason_code) | 156 u16 initiator, u16 reason_code) |
| 158 { | 157 { |
| 159 struct ieee80211_local *local = sdata->local; | 158 struct ieee80211_local *local = sdata->local; |
| 160 struct sk_buff *skb; | 159 struct sk_buff *skb; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 initiator = (params & IEEE80211_DELBA_PARAM_INITIATOR_MASK) >> 11; | 207 initiator = (params & IEEE80211_DELBA_PARAM_INITIATOR_MASK) >> 11; |
| 209 | 208 |
| 210 #ifdef CONFIG_MAC80211_HT_DEBUG | 209 #ifdef CONFIG_MAC80211_HT_DEBUG |
| 211 if (net_ratelimit()) | 210 if (net_ratelimit()) |
| 212 printk(KERN_DEBUG "delba from %pM (%s) tid %d reason code %d\n", | 211 printk(KERN_DEBUG "delba from %pM (%s) tid %d reason code %d\n", |
| 213 mgmt->sa, initiator ? "initiator" : "recipient", tid, | 212 mgmt->sa, initiator ? "initiator" : "recipient", tid, |
| 214 le16_to_cpu(mgmt->u.action.u.delba.reason_code)); | 213 le16_to_cpu(mgmt->u.action.u.delba.reason_code)); |
| 215 #endif /* CONFIG_MAC80211_HT_DEBUG */ | 214 #endif /* CONFIG_MAC80211_HT_DEBUG */ |
| 216 | 215 |
| 217 if (initiator == WLAN_BACK_INITIATOR) | 216 if (initiator == WLAN_BACK_INITIATOR) |
| 218 » » __ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_INITIATOR, 0, | 217 » » __ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_INITIATOR, 0)
; |
| 219 » » » » » true); | |
| 220 else | 218 else |
| 221 » » __ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_RECIPIENT, | 219 » » __ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_RECIPIENT); |
| 222 » » » » » true); | |
| 223 } | 220 } |
| 224 | 221 |
| 225 int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata, | 222 int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata, |
| 226 enum ieee80211_smps_mode smps, const u8 *da, | 223 enum ieee80211_smps_mode smps, const u8 *da, |
| 227 const u8 *bssid) | 224 const u8 *bssid) |
| 228 { | 225 { |
| 229 struct ieee80211_local *local = sdata->local; | 226 struct ieee80211_local *local = sdata->local; |
| 230 struct sk_buff *skb; | 227 struct sk_buff *skb; |
| 231 struct ieee80211_mgmt *action_frame; | 228 struct ieee80211_mgmt *action_frame; |
| 232 | 229 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 261 WLAN_HT_SMPS_CONTROL_DYNAMIC; | 258 WLAN_HT_SMPS_CONTROL_DYNAMIC; |
| 262 break; | 259 break; |
| 263 } | 260 } |
| 264 | 261 |
| 265 /* we'll do more on status of this frame */ | 262 /* we'll do more on status of this frame */ |
| 266 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; | 263 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; |
| 267 ieee80211_tx_skb(sdata, skb); | 264 ieee80211_tx_skb(sdata, skb); |
| 268 | 265 |
| 269 return 0; | 266 return 0; |
| 270 } | 267 } |
| OLD | NEW |