Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+4 -11
+4 -11
net/mac80211/tx.c
··· 1617 1617 1618 1618 static bool ieee80211_tx_frags(struct ieee80211_local *local, 1619 1619 struct ieee80211_vif *vif, 1620 - struct ieee80211_sta *sta, 1620 + struct sta_info *sta, 1621 1621 struct sk_buff_head *skbs, 1622 1622 bool txpending) 1623 1623 { ··· 1679 1679 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); 1680 1680 1681 1681 info->control.vif = vif; 1682 - control.sta = sta; 1682 + control.sta = sta ? &sta->sta : NULL; 1683 1683 1684 1684 __skb_unlink(skb, skbs); 1685 1685 drv_tx(local, &control, skb); ··· 1698 1698 struct ieee80211_tx_info *info; 1699 1699 struct ieee80211_sub_if_data *sdata; 1700 1700 struct ieee80211_vif *vif; 1701 - struct ieee80211_sta *pubsta; 1702 1701 struct sk_buff *skb; 1703 1702 bool result = true; 1704 1703 __le16 fc; ··· 1711 1712 sdata = vif_to_sdata(info->control.vif); 1712 1713 if (sta && !sta->uploaded) 1713 1714 sta = NULL; 1714 - 1715 - if (sta) 1716 - pubsta = &sta->sta; 1717 - else 1718 - pubsta = NULL; 1719 1715 1720 1716 switch (sdata->vif.type) { 1721 1717 case NL80211_IFTYPE_MONITOR: ··· 1738 1744 break; 1739 1745 } 1740 1746 1741 - result = ieee80211_tx_frags(local, vif, pubsta, skbs, 1742 - txpending); 1747 + result = ieee80211_tx_frags(local, vif, sta, skbs, txpending); 1743 1748 1744 1749 ieee80211_tpt_led_trig_tx(local, fc, led_len); 1745 1750 ··· 3522 3529 struct ieee80211_sub_if_data, u.ap); 3523 3530 3524 3531 __skb_queue_tail(&tx.skbs, skb); 3525 - ieee80211_tx_frags(local, &sdata->vif, &sta->sta, &tx.skbs, false); 3532 + ieee80211_tx_frags(local, &sdata->vif, sta, &tx.skbs, false); 3526 3533 return true; 3527 3534 } 3528 3535