提交 8e7be8da 编写于 作者: R Rami Rosen 提交者: John W. Linville

mac80211: tx module cleanup.

This patch removes unnecessary parameter in ieee80211_beacon_add_tim() and
removes unneeded definition and assignment for bdev (instance of net_device) in
ieee80211_beacon_get() and in ieee80211_get_buffered_bc()
(all in tx.c).
Signed-off-by: NRami Rosen <ramirose@gmail.com>
Acked-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 4a4f4d80
...@@ -1779,8 +1779,7 @@ void ieee80211_tx_pending(unsigned long data) ...@@ -1779,8 +1779,7 @@ void ieee80211_tx_pending(unsigned long data)
/* functions for drivers to get certain frames */ /* functions for drivers to get certain frames */
static void ieee80211_beacon_add_tim(struct ieee80211_local *local, static void ieee80211_beacon_add_tim(struct ieee80211_if_ap *bss,
struct ieee80211_if_ap *bss,
struct sk_buff *skb, struct sk_buff *skb,
struct beacon_data *beacon) struct beacon_data *beacon)
{ {
...@@ -1848,7 +1847,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, ...@@ -1848,7 +1847,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_local *local = hw_to_local(hw);
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
struct ieee80211_tx_info *info; struct ieee80211_tx_info *info;
struct net_device *bdev;
struct ieee80211_sub_if_data *sdata = NULL; struct ieee80211_sub_if_data *sdata = NULL;
struct ieee80211_if_ap *ap = NULL; struct ieee80211_if_ap *ap = NULL;
struct ieee80211_if_sta *ifsta = NULL; struct ieee80211_if_sta *ifsta = NULL;
...@@ -1861,7 +1859,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, ...@@ -1861,7 +1859,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
rcu_read_lock(); rcu_read_lock();
sdata = vif_to_sdata(vif); sdata = vif_to_sdata(vif);
bdev = sdata->dev;
if (sdata->vif.type == NL80211_IFTYPE_AP) { if (sdata->vif.type == NL80211_IFTYPE_AP) {
ap = &sdata->u.ap; ap = &sdata->u.ap;
...@@ -1889,12 +1886,12 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, ...@@ -1889,12 +1886,12 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
* of the tim bitmap in mac80211 and the driver. * of the tim bitmap in mac80211 and the driver.
*/ */
if (local->tim_in_locked_section) { if (local->tim_in_locked_section) {
ieee80211_beacon_add_tim(local, ap, skb, beacon); ieee80211_beacon_add_tim(ap, skb, beacon);
} else { } else {
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&local->sta_lock, flags); spin_lock_irqsave(&local->sta_lock, flags);
ieee80211_beacon_add_tim(local, ap, skb, beacon); ieee80211_beacon_add_tim(ap, skb, beacon);
spin_unlock_irqrestore(&local->sta_lock, flags); spin_unlock_irqrestore(&local->sta_lock, flags);
} }
...@@ -2016,14 +2013,12 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw, ...@@ -2016,14 +2013,12 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
struct sta_info *sta; struct sta_info *sta;
struct ieee80211_tx_data tx; struct ieee80211_tx_data tx;
struct net_device *bdev;
struct ieee80211_sub_if_data *sdata; struct ieee80211_sub_if_data *sdata;
struct ieee80211_if_ap *bss = NULL; struct ieee80211_if_ap *bss = NULL;
struct beacon_data *beacon; struct beacon_data *beacon;
struct ieee80211_tx_info *info; struct ieee80211_tx_info *info;
sdata = vif_to_sdata(vif); sdata = vif_to_sdata(vif);
bdev = sdata->dev;
bss = &sdata->u.ap; bss = &sdata->u.ap;
if (!bss) if (!bss)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册