diff options
author | David S. Miller <davem@davemloft.net> | 2009-12-01 18:46:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-01 18:46:35 -0500 |
commit | 7e8f44f8d4fa9bb35e32c161fbcdbd6b9e6400e3 (patch) | |
tree | cf6d526a070a06b365ab0ceb4e1c3ca9ad94666e /net | |
parent | 138f3c8518976953563a1316d7e0420c72d4ab96 (diff) | |
parent | 2127816366e0ffbc1426fa69e7b9b2bebd2e2288 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/agg-rx.c | 4 | ||||
-rw-r--r-- | net/mac80211/agg-tx.c | 17 | ||||
-rw-r--r-- | net/mac80211/ht.c | 8 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/sunrpc/addr.c | 18 |
5 files changed, 21 insertions, 28 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index bc064d7933ff..ce8e0e772bab 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -85,10 +85,6 @@ void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *r | |||
85 | struct ieee80211_local *local = sdata->local; | 85 | struct ieee80211_local *local = sdata->local; |
86 | struct sta_info *sta; | 86 | struct sta_info *sta; |
87 | 87 | ||
88 | /* stop HW Rx aggregation. ampdu_action existence | ||
89 | * already verified in session init so we add the BUG_ON */ | ||
90 | BUG_ON(!local->ops->ampdu_action); | ||
91 | |||
92 | rcu_read_lock(); | 88 | rcu_read_lock(); |
93 | 89 | ||
94 | sta = sta_info_get(local, ra); | 90 | sta = sta_info_get(local, ra); |
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index 206fd82f0c76..89e238b001de 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c | |||
@@ -123,13 +123,18 @@ void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u1 | |||
123 | ieee80211_tx_skb(sdata, skb, 0); | 123 | ieee80211_tx_skb(sdata, skb, 0); |
124 | } | 124 | } |
125 | 125 | ||
126 | static int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, | 126 | int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, |
127 | enum ieee80211_back_parties initiator) | 127 | enum ieee80211_back_parties initiator) |
128 | { | 128 | { |
129 | struct ieee80211_local *local = sta->local; | 129 | struct ieee80211_local *local = sta->local; |
130 | int ret; | 130 | int ret; |
131 | u8 *state; | 131 | u8 *state; |
132 | 132 | ||
133 | #ifdef CONFIG_MAC80211_HT_DEBUG | ||
134 | printk(KERN_DEBUG "Tx BA session stop requested for %pM tid %u\n", | ||
135 | sta->sta.addr, tid); | ||
136 | #endif /* CONFIG_MAC80211_HT_DEBUG */ | ||
137 | |||
133 | state = &sta->ampdu_mlme.tid_state_tx[tid]; | 138 | state = &sta->ampdu_mlme.tid_state_tx[tid]; |
134 | 139 | ||
135 | if (*state == HT_AGG_STATE_OPERATIONAL) | 140 | if (*state == HT_AGG_STATE_OPERATIONAL) |
@@ -143,7 +148,6 @@ static int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, | |||
143 | 148 | ||
144 | /* HW shall not deny going back to legacy */ | 149 | /* HW shall not deny going back to legacy */ |
145 | if (WARN_ON(ret)) { | 150 | if (WARN_ON(ret)) { |
146 | *state = HT_AGG_STATE_OPERATIONAL; | ||
147 | /* | 151 | /* |
148 | * We may have pending packets get stuck in this case... | 152 | * We may have pending packets get stuck in this case... |
149 | * Not bothering with a workaround for now. | 153 | * Not bothering with a workaround for now. |
@@ -525,11 +529,6 @@ int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, | |||
525 | goto unlock; | 529 | goto unlock; |
526 | } | 530 | } |
527 | 531 | ||
528 | #ifdef CONFIG_MAC80211_HT_DEBUG | ||
529 | printk(KERN_DEBUG "Tx BA session stop requested for %pM tid %u\n", | ||
530 | sta->sta.addr, tid); | ||
531 | #endif /* CONFIG_MAC80211_HT_DEBUG */ | ||
532 | |||
533 | ret = ___ieee80211_stop_tx_ba_session(sta, tid, initiator); | 532 | ret = ___ieee80211_stop_tx_ba_session(sta, tid, initiator); |
534 | 533 | ||
535 | unlock: | 534 | unlock: |
@@ -545,7 +544,7 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw, | |||
545 | struct sta_info *sta; | 544 | struct sta_info *sta; |
546 | int ret = 0; | 545 | int ret = 0; |
547 | 546 | ||
548 | if (WARN_ON(!local->ops->ampdu_action)) | 547 | if (!local->ops->ampdu_action) |
549 | return -EINVAL; | 548 | return -EINVAL; |
550 | 549 | ||
551 | if (tid >= STA_TID_NUM) | 550 | if (tid >= STA_TID_NUM) |
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index 48ef1a282b91..cdc58e61d921 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -141,7 +141,6 @@ void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata, | |||
141 | struct sta_info *sta, | 141 | struct sta_info *sta, |
142 | struct ieee80211_mgmt *mgmt, size_t len) | 142 | struct ieee80211_mgmt *mgmt, size_t len) |
143 | { | 143 | { |
144 | struct ieee80211_local *local = sdata->local; | ||
145 | u16 tid, params; | 144 | u16 tid, params; |
146 | u16 initiator; | 145 | u16 initiator; |
147 | 146 | ||
@@ -161,10 +160,9 @@ void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata, | |||
161 | WLAN_BACK_INITIATOR, 0); | 160 | WLAN_BACK_INITIATOR, 0); |
162 | else { /* WLAN_BACK_RECIPIENT */ | 161 | else { /* WLAN_BACK_RECIPIENT */ |
163 | spin_lock_bh(&sta->lock); | 162 | spin_lock_bh(&sta->lock); |
164 | sta->ampdu_mlme.tid_state_tx[tid] = | 163 | if (sta->ampdu_mlme.tid_state_tx[tid] & HT_ADDBA_REQUESTED_MSK) |
165 | HT_AGG_STATE_OPERATIONAL; | 164 | ___ieee80211_stop_tx_ba_session(sta, tid, |
165 | WLAN_BACK_RECIPIENT); | ||
166 | spin_unlock_bh(&sta->lock); | 166 | spin_unlock_bh(&sta->lock); |
167 | ieee80211_stop_tx_ba_session(&local->hw, sta->sta.addr, tid, | ||
168 | WLAN_BACK_RECIPIENT); | ||
169 | } | 167 | } |
170 | } | 168 | } |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index a910bf1f092f..10d316e455de 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1091,6 +1091,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
1091 | 1091 | ||
1092 | int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, | 1092 | int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, |
1093 | enum ieee80211_back_parties initiator); | 1093 | enum ieee80211_back_parties initiator); |
1094 | int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, | ||
1095 | enum ieee80211_back_parties initiator); | ||
1094 | 1096 | ||
1095 | /* Spectrum management */ | 1097 | /* Spectrum management */ |
1096 | void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, | 1098 | void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, |
diff --git a/net/sunrpc/addr.c b/net/sunrpc/addr.c index 22e8fd89477f..c7450c8f0a7c 100644 --- a/net/sunrpc/addr.c +++ b/net/sunrpc/addr.c | |||
@@ -306,24 +306,25 @@ EXPORT_SYMBOL_GPL(rpc_sockaddr2uaddr); | |||
306 | * @sap: buffer into which to plant socket address | 306 | * @sap: buffer into which to plant socket address |
307 | * @salen: size of buffer | 307 | * @salen: size of buffer |
308 | * | 308 | * |
309 | * @uaddr does not have to be '\0'-terminated, but strict_strtoul() and | ||
310 | * rpc_pton() require proper string termination to be successful. | ||
311 | * | ||
309 | * Returns the size of the socket address if successful; otherwise | 312 | * Returns the size of the socket address if successful; otherwise |
310 | * zero is returned. | 313 | * zero is returned. |
311 | */ | 314 | */ |
312 | size_t rpc_uaddr2sockaddr(const char *uaddr, const size_t uaddr_len, | 315 | size_t rpc_uaddr2sockaddr(const char *uaddr, const size_t uaddr_len, |
313 | struct sockaddr *sap, const size_t salen) | 316 | struct sockaddr *sap, const size_t salen) |
314 | { | 317 | { |
315 | char *c, buf[RPCBIND_MAXUADDRLEN]; | 318 | char *c, buf[RPCBIND_MAXUADDRLEN + sizeof('\0')]; |
316 | unsigned long portlo, porthi; | 319 | unsigned long portlo, porthi; |
317 | unsigned short port; | 320 | unsigned short port; |
318 | 321 | ||
319 | if (uaddr_len > sizeof(buf)) | 322 | if (uaddr_len > RPCBIND_MAXUADDRLEN) |
320 | return 0; | 323 | return 0; |
321 | 324 | ||
322 | memcpy(buf, uaddr, uaddr_len); | 325 | memcpy(buf, uaddr, uaddr_len); |
323 | 326 | ||
324 | buf[uaddr_len] = '\n'; | 327 | buf[uaddr_len] = '\0'; |
325 | buf[uaddr_len + 1] = '\0'; | ||
326 | |||
327 | c = strrchr(buf, '.'); | 328 | c = strrchr(buf, '.'); |
328 | if (unlikely(c == NULL)) | 329 | if (unlikely(c == NULL)) |
329 | return 0; | 330 | return 0; |
@@ -332,9 +333,7 @@ size_t rpc_uaddr2sockaddr(const char *uaddr, const size_t uaddr_len, | |||
332 | if (unlikely(portlo > 255)) | 333 | if (unlikely(portlo > 255)) |
333 | return 0; | 334 | return 0; |
334 | 335 | ||
335 | c[0] = '\n'; | 336 | *c = '\0'; |
336 | c[1] = '\0'; | ||
337 | |||
338 | c = strrchr(buf, '.'); | 337 | c = strrchr(buf, '.'); |
339 | if (unlikely(c == NULL)) | 338 | if (unlikely(c == NULL)) |
340 | return 0; | 339 | return 0; |
@@ -345,8 +344,7 @@ size_t rpc_uaddr2sockaddr(const char *uaddr, const size_t uaddr_len, | |||
345 | 344 | ||
346 | port = (unsigned short)((porthi << 8) | portlo); | 345 | port = (unsigned short)((porthi << 8) | portlo); |
347 | 346 | ||
348 | c[0] = '\0'; | 347 | *c = '\0'; |
349 | |||
350 | if (rpc_pton(buf, strlen(buf), sap, salen) == 0) | 348 | if (rpc_pton(buf, strlen(buf), sap, salen) == 0) |
351 | return 0; | 349 | return 0; |
352 | 350 | ||