aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-06-10 04:21:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-14 15:39:27 -0400
commit5d22c89b9bea17a0e48e7534a9b237885e2c0809 (patch)
treeed4f1de2efaa41368a2774adc0e07d903f65ed98
parenta622ab72b4dcfdf53e24b16e9530cb876979a00c (diff)
mac80211: remove non-irqsafe aggregation callbacks
The non-irqsafe aggregation start/stop done callbacks are currently only used by ath9k_htc, and can cause callbacks into the driver again. This might lead to locking issues, which will only get worse as we modify locking. To avoid trouble, remove the non-irqsafe versions and change ath9k_htc to use those instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c6
-rw-r--r--include/net/mac80211.h32
-rw-r--r--net/mac80211/agg-tx.c2
-rw-r--r--net/mac80211/ieee80211_i.h2
4 files changed, 10 insertions, 32 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 7aefbc63877..8c463f5965f 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -510,13 +510,13 @@ void ath9k_htc_aggr_work(struct work_struct *work)
510 ret = ath9k_htc_aggr_oper(priv, wk->vif, wk->sta_addr, 510 ret = ath9k_htc_aggr_oper(priv, wk->vif, wk->sta_addr,
511 wk->tid, true); 511 wk->tid, true);
512 if (!ret) 512 if (!ret)
513 ieee80211_start_tx_ba_cb(wk->vif, wk->sta_addr, 513 ieee80211_start_tx_ba_cb_irqsafe(wk->vif, wk->sta_addr,
514 wk->tid); 514 wk->tid);
515 break; 515 break;
516 case IEEE80211_AMPDU_TX_STOP: 516 case IEEE80211_AMPDU_TX_STOP:
517 ath9k_htc_aggr_oper(priv, wk->vif, wk->sta_addr, 517 ath9k_htc_aggr_oper(priv, wk->vif, wk->sta_addr,
518 wk->tid, false); 518 wk->tid, false);
519 ieee80211_stop_tx_ba_cb(wk->vif, wk->sta_addr, wk->tid); 519 ieee80211_stop_tx_ba_cb_irqsafe(wk->vif, wk->sta_addr, wk->tid);
520 break; 520 break;
521 default: 521 default:
522 ath_print(ath9k_hw_common(priv->ah), ATH_DBG_FATAL, 522 ath_print(ath9k_hw_common(priv->ah), ATH_DBG_FATAL,
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index abb3b1a9ddc..7f9401b3d3c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1445,7 +1445,7 @@ enum ieee80211_filter_flags {
1445 * 1445 *
1446 * Note that drivers MUST be able to deal with a TX aggregation 1446 * Note that drivers MUST be able to deal with a TX aggregation
1447 * session being stopped even before they OK'ed starting it by 1447 * session being stopped even before they OK'ed starting it by
1448 * calling ieee80211_start_tx_ba_cb(_irqsafe), because the peer 1448 * calling ieee80211_start_tx_ba_cb_irqsafe, because the peer
1449 * might receive the addBA frame and send a delBA right away! 1449 * might receive the addBA frame and send a delBA right away!
1450 * 1450 *
1451 * @IEEE80211_AMPDU_RX_START: start Rx aggregation 1451 * @IEEE80211_AMPDU_RX_START: start Rx aggregation
@@ -2314,25 +2314,14 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
2314int ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, u16 tid); 2314int ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, u16 tid);
2315 2315
2316/** 2316/**
2317 * ieee80211_start_tx_ba_cb - low level driver ready to aggregate.
2318 * @vif: &struct ieee80211_vif pointer from the add_interface callback
2319 * @ra: receiver address of the BA session recipient.
2320 * @tid: the TID to BA on.
2321 *
2322 * This function must be called by low level driver once it has
2323 * finished with preparations for the BA session.
2324 */
2325void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid);
2326
2327/**
2328 * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate. 2317 * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate.
2329 * @vif: &struct ieee80211_vif pointer from the add_interface callback 2318 * @vif: &struct ieee80211_vif pointer from the add_interface callback
2330 * @ra: receiver address of the BA session recipient. 2319 * @ra: receiver address of the BA session recipient.
2331 * @tid: the TID to BA on. 2320 * @tid: the TID to BA on.
2332 * 2321 *
2333 * This function must be called by low level driver once it has 2322 * This function must be called by low level driver once it has
2334 * finished with preparations for the BA session. 2323 * finished with preparations for the BA session. It can be called
2335 * This version of the function is IRQ-safe. 2324 * from any context.
2336 */ 2325 */
2337void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra, 2326void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
2338 u16 tid); 2327 u16 tid);
@@ -2351,25 +2340,14 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
2351int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid); 2340int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid);
2352 2341
2353/** 2342/**
2354 * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate.
2355 * @vif: &struct ieee80211_vif pointer from the add_interface callback
2356 * @ra: receiver address of the BA session recipient.
2357 * @tid: the desired TID to BA on.
2358 *
2359 * This function must be called by low level driver once it has
2360 * finished with preparations for the BA session tear down.
2361 */
2362void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid);
2363
2364/**
2365 * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate. 2343 * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate.
2366 * @vif: &struct ieee80211_vif pointer from the add_interface callback 2344 * @vif: &struct ieee80211_vif pointer from the add_interface callback
2367 * @ra: receiver address of the BA session recipient. 2345 * @ra: receiver address of the BA session recipient.
2368 * @tid: the desired TID to BA on. 2346 * @tid: the desired TID to BA on.
2369 * 2347 *
2370 * This function must be called by low level driver once it has 2348 * This function must be called by low level driver once it has
2371 * finished with preparations for the BA session tear down. 2349 * finished with preparations for the BA session tear down. It
2372 * This version of the function is IRQ-safe. 2350 * can be called from any context.
2373 */ 2351 */
2374void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra, 2352void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
2375 u16 tid); 2353 u16 tid);
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 7d8656d51c6..5a7ef51e302 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -479,7 +479,6 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid)
479 spin_unlock_bh(&sta->lock); 479 spin_unlock_bh(&sta->lock);
480 rcu_read_unlock(); 480 rcu_read_unlock();
481} 481}
482EXPORT_SYMBOL(ieee80211_start_tx_ba_cb);
483 482
484void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, 483void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
485 const u8 *ra, u16 tid) 484 const u8 *ra, u16 tid)
@@ -619,7 +618,6 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid)
619 spin_unlock_bh(&sta->lock); 618 spin_unlock_bh(&sta->lock);
620 rcu_read_unlock(); 619 rcu_read_unlock();
621} 620}
622EXPORT_SYMBOL(ieee80211_stop_tx_ba_cb);
623 621
624void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, 622void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
625 const u8 *ra, u16 tid) 623 const u8 *ra, u16 tid)
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 71bdd8b3c3f..a3ae5130803 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1119,6 +1119,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
1119 1119
1120int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, 1120int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
1121 enum ieee80211_back_parties initiator); 1121 enum ieee80211_back_parties initiator);
1122void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid);
1123void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid);
1122 1124
1123/* Spectrum management */ 1125/* Spectrum management */
1124void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, 1126void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,