From 589052904a60f00dd2cbc1d3488ee3f520a7de21 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Thu, 31 Jan 2008 19:48:25 +0100 Subject: mac80211: remove "dynamic" RX/TX handlers It doesn't really make sense to have extra pointers to the RX/TX handler arrays instead of just using the arrays directly, that also allows us to make them static. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- net/mac80211/tx.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'net/mac80211/tx.c') diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 0cba4a214876..181d97015f61 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -813,10 +813,9 @@ ieee80211_tx_h_load_stats(struct ieee80211_txrx_data *tx) return TX_CONTINUE; } -/* TODO: implement register/unregister functions for adding TX/RX handlers - * into ordered list */ -ieee80211_tx_handler ieee80211_tx_handlers[] = +typedef ieee80211_tx_result (*ieee80211_tx_handler)(struct ieee80211_txrx_data *); +static ieee80211_tx_handler ieee80211_tx_handlers[] = { ieee80211_tx_h_check_assoc, ieee80211_tx_h_sequence, @@ -1158,7 +1157,7 @@ static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb, sta = tx.sta; tx.u.tx.channel = local->hw.conf.channel; - for (handler = local->tx_handlers; *handler != NULL; + for (handler = ieee80211_tx_handlers; *handler != NULL; handler++) { res = (*handler)(&tx); if (res != TX_CONTINUE) @@ -1914,7 +1913,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw, tx.flags |= IEEE80211_TXRXD_TXPS_BUFFERED; tx.u.tx.channel = local->hw.conf.channel; - for (handler = local->tx_handlers; *handler != NULL; handler++) { + for (handler = ieee80211_tx_handlers; *handler != NULL; handler++) { res = (*handler)(&tx); if (res == TX_DROP || res == TX_QUEUED) break; -- cgit v1.2.3