mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 13:51:52 +00:00
mac80211: pass internal sta to ieee80211_tx_frags()
This simplifies the code somewhat, and if necessary would let us access the sta itself in that code. Link: https://lore.kernel.org/r/1569965193-Id656db92703dded4bb2e3ec5dc329529f58e58f0@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
4b76f9ed47
commit
4fd0328d2f
1 changed files with 4 additions and 11 deletions
|
@ -1617,7 +1617,7 @@ static bool ieee80211_queue_skb(struct ieee80211_local *local,
|
||||||
|
|
||||||
static bool ieee80211_tx_frags(struct ieee80211_local *local,
|
static bool ieee80211_tx_frags(struct ieee80211_local *local,
|
||||||
struct ieee80211_vif *vif,
|
struct ieee80211_vif *vif,
|
||||||
struct ieee80211_sta *sta,
|
struct sta_info *sta,
|
||||||
struct sk_buff_head *skbs,
|
struct sk_buff_head *skbs,
|
||||||
bool txpending)
|
bool txpending)
|
||||||
{
|
{
|
||||||
|
@ -1679,7 +1679,7 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
|
||||||
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
|
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
|
||||||
|
|
||||||
info->control.vif = vif;
|
info->control.vif = vif;
|
||||||
control.sta = sta;
|
control.sta = sta ? &sta->sta : NULL;
|
||||||
|
|
||||||
__skb_unlink(skb, skbs);
|
__skb_unlink(skb, skbs);
|
||||||
drv_tx(local, &control, skb);
|
drv_tx(local, &control, skb);
|
||||||
|
@ -1698,7 +1698,6 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
|
||||||
struct ieee80211_tx_info *info;
|
struct ieee80211_tx_info *info;
|
||||||
struct ieee80211_sub_if_data *sdata;
|
struct ieee80211_sub_if_data *sdata;
|
||||||
struct ieee80211_vif *vif;
|
struct ieee80211_vif *vif;
|
||||||
struct ieee80211_sta *pubsta;
|
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
bool result = true;
|
bool result = true;
|
||||||
__le16 fc;
|
__le16 fc;
|
||||||
|
@ -1713,11 +1712,6 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
|
||||||
if (sta && !sta->uploaded)
|
if (sta && !sta->uploaded)
|
||||||
sta = NULL;
|
sta = NULL;
|
||||||
|
|
||||||
if (sta)
|
|
||||||
pubsta = &sta->sta;
|
|
||||||
else
|
|
||||||
pubsta = NULL;
|
|
||||||
|
|
||||||
switch (sdata->vif.type) {
|
switch (sdata->vif.type) {
|
||||||
case NL80211_IFTYPE_MONITOR:
|
case NL80211_IFTYPE_MONITOR:
|
||||||
if (sdata->u.mntr.flags & MONITOR_FLAG_ACTIVE) {
|
if (sdata->u.mntr.flags & MONITOR_FLAG_ACTIVE) {
|
||||||
|
@ -1744,8 +1738,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = ieee80211_tx_frags(local, vif, pubsta, skbs,
|
result = ieee80211_tx_frags(local, vif, sta, skbs, txpending);
|
||||||
txpending);
|
|
||||||
|
|
||||||
ieee80211_tpt_led_trig_tx(local, fc, led_len);
|
ieee80211_tpt_led_trig_tx(local, fc, led_len);
|
||||||
|
|
||||||
|
@ -3529,7 +3522,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
|
||||||
struct ieee80211_sub_if_data, u.ap);
|
struct ieee80211_sub_if_data, u.ap);
|
||||||
|
|
||||||
__skb_queue_tail(&tx.skbs, skb);
|
__skb_queue_tail(&tx.skbs, skb);
|
||||||
ieee80211_tx_frags(local, &sdata->vif, &sta->sta, &tx.skbs, false);
|
ieee80211_tx_frags(local, &sdata->vif, sta, &tx.skbs, false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue