aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-07-26 08:07:46 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-08-20 08:13:39 -0400
commite31583cdf0e2eb71c44b1288a2d93405f972da68 (patch)
treebfdd2c00ce3d10538b77a5c998ef0a09e940f8b6 /net/mac80211/tx.c
parent466f310d100ff54f346c1be481af9935c42467b3 (diff)
mac80211: remove almost unused local variable
In ieee80211_beacon_get_tim() we can use the txrc.sband instead of a separate local variable. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 2d004ba0615e..2d2f45ecca4d 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2300,12 +2300,9 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
2300 struct ieee80211_sub_if_data *sdata = NULL; 2300 struct ieee80211_sub_if_data *sdata = NULL;
2301 struct ieee80211_if_ap *ap = NULL; 2301 struct ieee80211_if_ap *ap = NULL;
2302 struct beacon_data *beacon; 2302 struct beacon_data *beacon;
2303 struct ieee80211_supported_band *sband;
2304 enum ieee80211_band band = local->oper_channel->band; 2303 enum ieee80211_band band = local->oper_channel->band;
2305 struct ieee80211_tx_rate_control txrc; 2304 struct ieee80211_tx_rate_control txrc;
2306 2305
2307 sband = local->hw.wiphy->bands[band];
2308
2309 rcu_read_lock(); 2306 rcu_read_lock();
2310 2307
2311 sdata = vif_to_sdata(vif); 2308 sdata = vif_to_sdata(vif);
@@ -2452,12 +2449,12 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
2452 2449
2453 memset(&txrc, 0, sizeof(txrc)); 2450 memset(&txrc, 0, sizeof(txrc));
2454 txrc.hw = hw; 2451 txrc.hw = hw;
2455 txrc.sband = sband; 2452 txrc.sband = local->hw.wiphy->bands[band];
2456 txrc.bss_conf = &sdata->vif.bss_conf; 2453 txrc.bss_conf = &sdata->vif.bss_conf;
2457 txrc.skb = skb; 2454 txrc.skb = skb;
2458 txrc.reported_rate.idx = -1; 2455 txrc.reported_rate.idx = -1;
2459 txrc.rate_idx_mask = sdata->rc_rateidx_mask[band]; 2456 txrc.rate_idx_mask = sdata->rc_rateidx_mask[band];
2460 if (txrc.rate_idx_mask == (1 << sband->n_bitrates) - 1) 2457 if (txrc.rate_idx_mask == (1 << txrc.sband->n_bitrates) - 1)
2461 txrc.max_rate_idx = -1; 2458 txrc.max_rate_idx = -1;
2462 else 2459 else
2463 txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1; 2460 txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1;