diff options
Diffstat (limited to 'net/mac80211/ht.c')
-rw-r--r-- | net/mac80211/ht.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index c5c0c5271096..7a38d2e76ca9 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -130,14 +130,15 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
133 | ht_changed = local->hw.conf.ht.enabled != enable_ht || | 133 | ht_changed = conf_is_ht(&local->hw.conf) != enable_ht || |
134 | channel_type != local->hw.conf.ht.channel_type; | 134 | channel_type != local->hw.conf.channel_type; |
135 | 135 | ||
136 | local->oper_channel_type = channel_type; | 136 | local->oper_channel_type = channel_type; |
137 | local->hw.conf.ht.enabled = enable_ht; | ||
138 | 137 | ||
139 | if (ht_changed) | 138 | if (ht_changed) { |
140 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT); | 139 | /* channel_type change automatically detected */ |
140 | ieee80211_hw_config(local, 0); | ||
141 | } | ||
141 | 142 | ||
142 | /* disable HT */ | 143 | /* disable HT */ |
143 | if (!enable_ht) | 144 | if (!enable_ht) |
@@ -201,7 +202,7 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata, | |||
201 | mgmt->u.action.u.addba_req.start_seq_num = | 202 | mgmt->u.action.u.addba_req.start_seq_num = |
202 | cpu_to_le16(start_seq_num << 4); | 203 | cpu_to_le16(start_seq_num << 4); |
203 | 204 | ||
204 | ieee80211_tx_skb(sdata, skb, 0); | 205 | ieee80211_tx_skb(sdata, skb, 1); |
205 | } | 206 | } |
206 | 207 | ||
207 | static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *da, u16 tid, | 208 | static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *da, u16 tid, |
@@ -247,7 +248,7 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d | |||
247 | mgmt->u.action.u.addba_resp.timeout = cpu_to_le16(timeout); | 248 | mgmt->u.action.u.addba_resp.timeout = cpu_to_le16(timeout); |
248 | mgmt->u.action.u.addba_resp.status = cpu_to_le16(status); | 249 | mgmt->u.action.u.addba_resp.status = cpu_to_le16(status); |
249 | 250 | ||
250 | ieee80211_tx_skb(sdata, skb, 0); | 251 | ieee80211_tx_skb(sdata, skb, 1); |
251 | } | 252 | } |
252 | 253 | ||
253 | static void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata, | 254 | static void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata, |
@@ -290,7 +291,7 @@ static void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata, | |||
290 | mgmt->u.action.u.delba.params = cpu_to_le16(params); | 291 | mgmt->u.action.u.delba.params = cpu_to_le16(params); |
291 | mgmt->u.action.u.delba.reason_code = cpu_to_le16(reason_code); | 292 | mgmt->u.action.u.delba.reason_code = cpu_to_le16(reason_code); |
292 | 293 | ||
293 | ieee80211_tx_skb(sdata, skb, 0); | 294 | ieee80211_tx_skb(sdata, skb, 1); |
294 | } | 295 | } |
295 | 296 | ||
296 | void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn) | 297 | void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn) |
@@ -949,7 +950,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
949 | 950 | ||
950 | /* prepare reordering buffer */ | 951 | /* prepare reordering buffer */ |
951 | tid_agg_rx->reorder_buf = | 952 | tid_agg_rx->reorder_buf = |
952 | kmalloc(buf_size * sizeof(struct sk_buff *), GFP_ATOMIC); | 953 | kcalloc(buf_size, sizeof(struct sk_buff *), GFP_ATOMIC); |
953 | if (!tid_agg_rx->reorder_buf) { | 954 | if (!tid_agg_rx->reorder_buf) { |
954 | #ifdef CONFIG_MAC80211_HT_DEBUG | 955 | #ifdef CONFIG_MAC80211_HT_DEBUG |
955 | if (net_ratelimit()) | 956 | if (net_ratelimit()) |
@@ -959,8 +960,6 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
959 | kfree(sta->ampdu_mlme.tid_rx[tid]); | 960 | kfree(sta->ampdu_mlme.tid_rx[tid]); |
960 | goto end; | 961 | goto end; |
961 | } | 962 | } |
962 | memset(tid_agg_rx->reorder_buf, 0, | ||
963 | buf_size * sizeof(struct sk_buff *)); | ||
964 | 963 | ||
965 | if (local->ops->ampdu_action) | 964 | if (local->ops->ampdu_action) |
966 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, | 965 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, |