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

mac80211: move TX station pointer and restructure TX

Remove the control.sta pointer from ieee80211_tx_info to free up
sufficient space in the TX skb control buffer for the upcoming
Transmit Power Control (TPC).
Instead, the pointer is now on the stack in a new control struct
that is passed as a function parameter to the drivers' tx method.

Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
[reworded commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Thomas Huehn and committed by
Johannes Berg
36323f81 ab095877

+232 -132
+3 -1
drivers/net/wireless/adm8211.c
··· 1661 1661 } 1662 1662 1663 1663 /* Put adm8211_tx_hdr on skb and transmit */ 1664 - static void adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb) 1664 + static void adm8211_tx(struct ieee80211_hw *dev, 1665 + struct ieee80211_tx_control *control, 1666 + struct sk_buff *skb) 1665 1667 { 1666 1668 struct adm8211_tx_hdr *txhdr; 1667 1669 size_t payload_len, hdrlen;
+3 -1
drivers/net/wireless/at76c50x-usb.c
··· 1726 1726 ieee80211_wake_queues(priv->hw); 1727 1727 } 1728 1728 1729 - static void at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 1729 + static void at76_mac80211_tx(struct ieee80211_hw *hw, 1730 + struct ieee80211_tx_control *control, 1731 + struct sk_buff *skb) 1730 1732 { 1731 1733 struct at76_priv *priv = hw->priv; 1732 1734 struct at76_tx_buffer *tx_buffer = priv->bulk_out_buffer;
+2 -1
drivers/net/wireless/ath/ath5k/mac80211-ops.c
··· 55 55 \********************/ 56 56 57 57 static void 58 - ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 58 + ath5k_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, 59 + struct sk_buff *skb) 59 60 { 60 61 struct ath5k_hw *ah = hw->priv; 61 62 u16 qnum = skb_get_queue_mapping(skb);
+1
drivers/net/wireless/ath/ath9k/ath9k.h
··· 280 280 struct ath_txq *txq; 281 281 struct ath_node *an; 282 282 u8 paprd; 283 + struct ieee80211_sta *sta; 283 284 }; 284 285 285 286 #define ATH_TX_ERROR 0x01
+1
drivers/net/wireless/ath/ath9k/htc.h
··· 542 542 543 543 int ath9k_tx_init(struct ath9k_htc_priv *priv); 544 544 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, 545 + struct ieee80211_sta *sta, 545 546 struct sk_buff *skb, u8 slot, bool is_cab); 546 547 void ath9k_tx_cleanup(struct ath9k_htc_priv *priv); 547 548 bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype);
+1 -1
drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
··· 326 326 goto next; 327 327 } 328 328 329 - ret = ath9k_htc_tx_start(priv, skb, tx_slot, true); 329 + ret = ath9k_htc_tx_start(priv, NULL, skb, tx_slot, true); 330 330 if (ret != 0) { 331 331 ath9k_htc_tx_clear_slot(priv, tx_slot); 332 332 dev_kfree_skb_any(skb);
+4 -2
drivers/net/wireless/ath/ath9k/htc_drv_main.c
··· 856 856 /* mac80211 Callbacks */ 857 857 /**********************/ 858 858 859 - static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 859 + static void ath9k_htc_tx(struct ieee80211_hw *hw, 860 + struct ieee80211_tx_control *control, 861 + struct sk_buff *skb) 860 862 { 861 863 struct ieee80211_hdr *hdr; 862 864 struct ath9k_htc_priv *priv = hw->priv; ··· 885 883 goto fail_tx; 886 884 } 887 885 888 - ret = ath9k_htc_tx_start(priv, skb, slot, false); 886 + ret = ath9k_htc_tx_start(priv, control->sta, skb, slot, false); 889 887 if (ret != 0) { 890 888 ath_dbg(common, XMIT, "Tx failed\n"); 891 889 goto clear_slot;
+1 -1
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
··· 333 333 } 334 334 335 335 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, 336 + struct ieee80211_sta *sta, 336 337 struct sk_buff *skb, 337 338 u8 slot, bool is_cab) 338 339 { 339 340 struct ieee80211_hdr *hdr; 340 341 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 341 - struct ieee80211_sta *sta = tx_info->control.sta; 342 342 struct ieee80211_vif *vif = tx_info->control.vif; 343 343 struct ath9k_htc_sta *ista; 344 344 struct ath9k_htc_vif *avp = NULL;
+4 -1
drivers/net/wireless/ath/ath9k/main.c
··· 694 694 return r; 695 695 } 696 696 697 - static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 697 + static void ath9k_tx(struct ieee80211_hw *hw, 698 + struct ieee80211_tx_control *control, 699 + struct sk_buff *skb) 698 700 { 699 701 struct ath_softc *sc = hw->priv; 700 702 struct ath_common *common = ath9k_hw_common(sc->sc_ah); ··· 756 754 757 755 memset(&txctl, 0, sizeof(struct ath_tx_control)); 758 756 txctl.txq = sc->tx.txq_map[skb_get_queue_mapping(skb)]; 757 + txctl.sta = control->sta; 759 758 760 759 ath_dbg(common, XMIT, "transmitting packet, skb: %p\n", skb); 761 760
+5 -4
drivers/net/wireless/ath/ath9k/xmit.c
··· 1773 1773 TX_STAT_INC(txq->axq_qnum, queued); 1774 1774 } 1775 1775 1776 - static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb, 1776 + static void setup_frame_info(struct ieee80211_hw *hw, 1777 + struct ieee80211_sta *sta, 1778 + struct sk_buff *skb, 1777 1779 int framelen) 1778 1780 { 1779 1781 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 1780 - struct ieee80211_sta *sta = tx_info->control.sta; 1781 1782 struct ieee80211_key_conf *hw_key = tx_info->control.hw_key; 1782 1783 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 1783 1784 const struct ieee80211_rate *rate; ··· 1936 1935 { 1937 1936 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; 1938 1937 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 1939 - struct ieee80211_sta *sta = info->control.sta; 1938 + struct ieee80211_sta *sta = txctl->sta; 1940 1939 struct ieee80211_vif *vif = info->control.vif; 1941 1940 struct ath_softc *sc = hw->priv; 1942 1941 struct ath_txq *txq = txctl->txq; ··· 1980 1979 !ieee80211_is_data(hdr->frame_control)) 1981 1980 info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT; 1982 1981 1983 - setup_frame_info(hw, skb, frmlen); 1982 + setup_frame_info(hw, sta, skb, frmlen); 1984 1983 1985 1984 /* 1986 1985 * At this point, the vif, hw_key and sta pointers in the tx control
+3 -1
drivers/net/wireless/ath/carl9170/carl9170.h
··· 577 577 void carl9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len); 578 578 579 579 /* TX */ 580 - void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb); 580 + void carl9170_op_tx(struct ieee80211_hw *hw, 581 + struct ieee80211_tx_control *control, 582 + struct sk_buff *skb); 581 583 void carl9170_tx_janitor(struct work_struct *work); 582 584 void carl9170_tx_process_status(struct ar9170 *ar, 583 585 const struct carl9170_rsp *cmd);
+8 -8
drivers/net/wireless/ath/carl9170/tx.c
··· 867 867 return false; 868 868 } 869 869 870 - static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb) 870 + static int carl9170_tx_prepare(struct ar9170 *ar, 871 + struct ieee80211_sta *sta, 872 + struct sk_buff *skb) 871 873 { 872 874 struct ieee80211_hdr *hdr; 873 875 struct _carl9170_tx_superframe *txc; 874 876 struct carl9170_vif_info *cvif; 875 877 struct ieee80211_tx_info *info; 876 878 struct ieee80211_tx_rate *txrate; 877 - struct ieee80211_sta *sta; 878 879 struct carl9170_tx_info *arinfo; 879 880 unsigned int hw_queue; 880 881 int i; ··· 910 909 cvif = (void *) info->control.vif->drv_priv; 911 910 else 912 911 cvif = NULL; 913 - 914 - sta = info->control.sta; 915 912 916 913 txc = (void *)skb_push(skb, sizeof(*txc)); 917 914 memset(txc, 0, sizeof(*txc)); ··· 1456 1457 return false; 1457 1458 } 1458 1459 1459 - void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 1460 + void carl9170_op_tx(struct ieee80211_hw *hw, 1461 + struct ieee80211_tx_control *control, 1462 + struct sk_buff *skb) 1460 1463 { 1461 1464 struct ar9170 *ar = hw->priv; 1462 1465 struct ieee80211_tx_info *info; 1463 - struct ieee80211_sta *sta; 1466 + struct ieee80211_sta *sta = control->sta; 1464 1467 bool run; 1465 1468 1466 1469 if (unlikely(!IS_STARTED(ar))) 1467 1470 goto err_free; 1468 1471 1469 1472 info = IEEE80211_SKB_CB(skb); 1470 - sta = info->control.sta; 1471 1473 1472 - if (unlikely(carl9170_tx_prepare(ar, skb))) 1474 + if (unlikely(carl9170_tx_prepare(ar, sta, skb))) 1473 1475 goto err_free; 1474 1476 1475 1477 carl9170_tx_accounting(ar, skb);
+2 -1
drivers/net/wireless/b43/main.c
··· 3407 3407 } 3408 3408 3409 3409 static void b43_op_tx(struct ieee80211_hw *hw, 3410 - struct sk_buff *skb) 3410 + struct ieee80211_tx_control *control, 3411 + struct sk_buff *skb) 3411 3412 { 3412 3413 struct b43_wl *wl = hw_to_b43_wl(hw); 3413 3414
+1
drivers/net/wireless/b43legacy/main.c
··· 2492 2492 } 2493 2493 2494 2494 static void b43legacy_op_tx(struct ieee80211_hw *hw, 2495 + struct ieee80211_tx_control *control, 2495 2496 struct sk_buff *skb) 2496 2497 { 2497 2498 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
+4 -2
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
··· 264 264 } 265 265 } 266 266 267 - static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 267 + static void brcms_ops_tx(struct ieee80211_hw *hw, 268 + struct ieee80211_tx_control *control, 269 + struct sk_buff *skb) 268 270 { 269 271 struct brcms_info *wl = hw->priv; 270 272 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); ··· 278 276 goto done; 279 277 } 280 278 brcms_c_sendpkt_mac80211(wl->wlc, skb, hw); 281 - tx_info->rate_driver_data[0] = tx_info->control.sta; 279 + tx_info->rate_driver_data[0] = control->sta; 282 280 done: 283 281 spin_unlock_bh(&wl->lock); 284 282 }
+8 -4
drivers/net/wireless/iwlegacy/3945-mac.c
··· 460 460 * start C_TX command process 461 461 */ 462 462 static int 463 - il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) 463 + il3945_tx_skb(struct il_priv *il, 464 + struct ieee80211_sta *sta, 465 + struct sk_buff *skb) 464 466 { 465 467 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 466 468 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); ··· 514 512 hdr_len = ieee80211_hdrlen(fc); 515 513 516 514 /* Find idx into station table for destination station */ 517 - sta_id = il_sta_id_or_broadcast(il, info->control.sta); 515 + sta_id = il_sta_id_or_broadcast(il, sta); 518 516 if (sta_id == IL_INVALID_STATION) { 519 517 D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1); 520 518 goto drop; ··· 2861 2859 } 2862 2860 2863 2861 static void 2864 - il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 2862 + il3945_mac_tx(struct ieee80211_hw *hw, 2863 + struct ieee80211_tx_control *control, 2864 + struct sk_buff *skb) 2865 2865 { 2866 2866 struct il_priv *il = hw->priv; 2867 2867 ··· 2872 2868 D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, 2873 2869 ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); 2874 2870 2875 - if (il3945_tx_skb(il, skb)) 2871 + if (il3945_tx_skb(il, control->sta, skb)) 2876 2872 dev_kfree_skb_any(skb); 2877 2873 2878 2874 D_MAC80211("leave\n");
+15 -11
drivers/net/wireless/iwlegacy/4965-mac.c
··· 1526 1526 } 1527 1527 1528 1528 static void 1529 - il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd, 1530 - struct ieee80211_tx_info *info, __le16 fc) 1529 + il4965_tx_cmd_build_rate(struct il_priv *il, 1530 + struct il_tx_cmd *tx_cmd, 1531 + struct ieee80211_tx_info *info, 1532 + struct ieee80211_sta *sta, 1533 + __le16 fc) 1531 1534 { 1532 1535 const u8 rts_retry_limit = 60; 1533 1536 u32 rate_flags; ··· 1564 1561 rate_idx = info->control.rates[0].idx; 1565 1562 if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || rate_idx < 0 1566 1563 || rate_idx > RATE_COUNT_LEGACY) 1567 - rate_idx = 1568 - rate_lowest_index(&il->bands[info->band], 1569 - info->control.sta); 1564 + rate_idx = rate_lowest_index(&il->bands[info->band], sta); 1570 1565 /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ 1571 1566 if (info->band == IEEE80211_BAND_5GHZ) 1572 1567 rate_idx += IL_FIRST_OFDM_RATE; ··· 1631 1630 * start C_TX command process 1632 1631 */ 1633 1632 int 1634 - il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) 1633 + il4965_tx_skb(struct il_priv *il, 1634 + struct ieee80211_sta *sta, 1635 + struct sk_buff *skb) 1635 1636 { 1636 1637 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 1637 1638 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 1638 - struct ieee80211_sta *sta = info->control.sta; 1639 1639 struct il_station_priv *sta_priv = NULL; 1640 1640 struct il_tx_queue *txq; 1641 1641 struct il_queue *q; ··· 1682 1680 sta_id = il->hw_params.bcast_id; 1683 1681 else { 1684 1682 /* Find idx into station table for destination station */ 1685 - sta_id = il_sta_id_or_broadcast(il, info->control.sta); 1683 + sta_id = il_sta_id_or_broadcast(il, sta); 1686 1684 1687 1685 if (sta_id == IL_INVALID_STATION) { 1688 1686 D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1); ··· 1788 1786 /* TODO need this for burst mode later on */ 1789 1787 il4965_tx_cmd_build_basic(il, skb, tx_cmd, info, hdr, sta_id); 1790 1788 1791 - il4965_tx_cmd_build_rate(il, tx_cmd, info, fc); 1789 + il4965_tx_cmd_build_rate(il, tx_cmd, info, sta, fc); 1792 1790 1793 1791 il_update_stats(il, true, fc, len); 1794 1792 /* ··· 5830 5828 } 5831 5829 5832 5830 void 5833 - il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 5831 + il4965_mac_tx(struct ieee80211_hw *hw, 5832 + struct ieee80211_tx_control *control, 5833 + struct sk_buff *skb) 5834 5834 { 5835 5835 struct il_priv *il = hw->priv; 5836 5836 ··· 5841 5837 D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, 5842 5838 ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); 5843 5839 5844 - if (il4965_tx_skb(il, skb)) 5840 + if (il4965_tx_skb(il, control->sta, skb)) 5845 5841 dev_kfree_skb_any(skb); 5846 5842 5847 5843 D_MACDUMP("leave\n");
+6 -2
drivers/net/wireless/iwlegacy/4965.h
··· 78 78 int il4965_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq); 79 79 void il4965_hwrate_to_tx_control(struct il_priv *il, u32 rate_n_flags, 80 80 struct ieee80211_tx_info *info); 81 - int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb); 81 + int il4965_tx_skb(struct il_priv *il, 82 + struct ieee80211_sta *sta, 83 + struct sk_buff *skb); 82 84 int il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif, 83 85 struct ieee80211_sta *sta, u16 tid, u16 * ssn); 84 86 int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif, ··· 165 163 int il4965_eeprom_check_version(struct il_priv *il); 166 164 167 165 /* mac80211 handlers (for 4965) */ 168 - void il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb); 166 + void il4965_mac_tx(struct ieee80211_hw *hw, 167 + struct ieee80211_tx_control *control, 168 + struct sk_buff *skb); 169 169 int il4965_mac_start(struct ieee80211_hw *hw); 170 170 void il4965_mac_stop(struct ieee80211_hw *hw); 171 171 void il4965_configure_filter(struct ieee80211_hw *hw,
+3 -1
drivers/net/wireless/iwlwifi/dvm/agn.h
··· 201 201 202 202 203 203 /* tx */ 204 - int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb); 204 + int iwlagn_tx_skb(struct iwl_priv *priv, 205 + struct ieee80211_sta *sta, 206 + struct sk_buff *skb); 205 207 int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif, 206 208 struct ieee80211_sta *sta, u16 tid, u16 *ssn); 207 209 int iwlagn_tx_agg_oper(struct iwl_priv *priv, struct ieee80211_vif *vif,
+4 -2
drivers/net/wireless/iwlwifi/dvm/mac80211.c
··· 511 511 } 512 512 #endif 513 513 514 - static void iwlagn_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 514 + static void iwlagn_mac_tx(struct ieee80211_hw *hw, 515 + struct ieee80211_tx_control *control, 516 + struct sk_buff *skb) 515 517 { 516 518 struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); 517 519 518 520 IWL_DEBUG_TX(priv, "dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, 519 521 ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); 520 522 521 - if (iwlagn_tx_skb(priv, skb)) 523 + if (iwlagn_tx_skb(priv, control->sta, skb)) 522 524 dev_kfree_skb_any(skb); 523 525 } 524 526
+9 -7
drivers/net/wireless/iwlwifi/dvm/tx.c
··· 127 127 static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, 128 128 struct iwl_tx_cmd *tx_cmd, 129 129 struct ieee80211_tx_info *info, 130 + struct ieee80211_sta *sta, 130 131 __le16 fc) 131 132 { 132 133 u32 rate_flags; ··· 188 187 if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS || 189 188 (rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY)) 190 189 rate_idx = rate_lowest_index( 191 - &priv->eeprom_data->bands[info->band], 192 - info->control.sta); 190 + &priv->eeprom_data->bands[info->band], sta); 193 191 /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ 194 192 if (info->band == IEEE80211_BAND_5GHZ) 195 193 rate_idx += IWL_FIRST_OFDM_RATE; ··· 291 291 /* 292 292 * start REPLY_TX command process 293 293 */ 294 - int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) 294 + int iwlagn_tx_skb(struct iwl_priv *priv, 295 + struct ieee80211_sta *sta, 296 + struct sk_buff *skb) 295 297 { 296 298 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 297 299 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); ··· 347 345 sta_id = ctx->bcast_sta_id; 348 346 else { 349 347 /* Find index into station table for destination station */ 350 - sta_id = iwl_sta_id_or_broadcast(ctx, info->control.sta); 348 + sta_id = iwl_sta_id_or_broadcast(ctx, sta); 351 349 if (sta_id == IWL_INVALID_STATION) { 352 350 IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", 353 351 hdr->addr1); ··· 357 355 358 356 IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); 359 357 360 - if (info->control.sta) 361 - sta_priv = (void *)info->control.sta->drv_priv; 358 + if (sta) 359 + sta_priv = (void *)sta->drv_priv; 362 360 363 361 if (sta_priv && sta_priv->asleep && 364 362 (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)) { ··· 399 397 /* TODO need this for burst mode later on */ 400 398 iwlagn_tx_cmd_build_basic(priv, skb, tx_cmd, info, hdr, sta_id); 401 399 402 - iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, fc); 400 + iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, sta, fc); 403 401 404 402 memset(&info->status, 0, sizeof(info->status)); 405 403
+3 -1
drivers/net/wireless/libertas_tf/main.c
··· 227 227 lbtf_deb_leave(LBTF_DEB_MAIN); 228 228 } 229 229 230 - static void lbtf_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 230 + static void lbtf_op_tx(struct ieee80211_hw *hw, 231 + struct ieee80211_tx_control *control, 232 + struct sk_buff *skb) 231 233 { 232 234 struct lbtf_private *priv = hw->priv; 233 235
+5 -3
drivers/net/wireless/mac80211_hwsim.c
··· 709 709 return ack; 710 710 } 711 711 712 - static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 712 + static void mac80211_hwsim_tx(struct ieee80211_hw *hw, 713 + struct ieee80211_tx_control *control, 714 + struct sk_buff *skb) 713 715 { 714 716 bool ack; 715 717 struct ieee80211_tx_info *txi; ··· 743 741 744 742 if (txi->control.vif) 745 743 hwsim_check_magic(txi->control.vif); 746 - if (txi->control.sta) 747 - hwsim_check_sta_magic(txi->control.sta); 744 + if (control->sta) 745 + hwsim_check_sta_magic(control->sta); 748 746 749 747 ieee80211_tx_info_clear_status(txi); 750 748
+10 -7
drivers/net/wireless/mwl8k.c
··· 1830 1830 } 1831 1831 1832 1832 static void 1833 - mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb) 1833 + mwl8k_txq_xmit(struct ieee80211_hw *hw, 1834 + int index, 1835 + struct ieee80211_sta *sta, 1836 + struct sk_buff *skb) 1834 1837 { 1835 1838 struct mwl8k_priv *priv = hw->priv; 1836 1839 struct ieee80211_tx_info *tx_info; 1837 1840 struct mwl8k_vif *mwl8k_vif; 1838 - struct ieee80211_sta *sta; 1839 1841 struct ieee80211_hdr *wh; 1840 1842 struct mwl8k_tx_queue *txq; 1841 1843 struct mwl8k_tx_desc *tx; ··· 1869 1867 wh = &((struct mwl8k_dma_data *)skb->data)->wh; 1870 1868 1871 1869 tx_info = IEEE80211_SKB_CB(skb); 1872 - sta = tx_info->control.sta; 1873 1870 mwl8k_vif = MWL8K_VIF(tx_info->control.vif); 1874 1871 1875 1872 if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { ··· 2020 2019 tx->pkt_phys_addr = cpu_to_le32(dma); 2021 2020 tx->pkt_len = cpu_to_le16(skb->len); 2022 2021 tx->rate_info = 0; 2023 - if (!priv->ap_fw && tx_info->control.sta != NULL) 2024 - tx->peer_id = MWL8K_STA(tx_info->control.sta)->peer_id; 2022 + if (!priv->ap_fw && sta != NULL) 2023 + tx->peer_id = MWL8K_STA(sta)->peer_id; 2025 2024 else 2026 2025 tx->peer_id = 0; 2027 2026 ··· 4365 4364 /* 4366 4365 * Core driver operations. 4367 4366 */ 4368 - static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 4367 + static void mwl8k_tx(struct ieee80211_hw *hw, 4368 + struct ieee80211_tx_control *control, 4369 + struct sk_buff *skb) 4369 4370 { 4370 4371 struct mwl8k_priv *priv = hw->priv; 4371 4372 int index = skb_get_queue_mapping(skb); ··· 4379 4376 return; 4380 4377 } 4381 4378 4382 - mwl8k_txq_xmit(hw, index, skb); 4379 + mwl8k_txq_xmit(hw, index, control->sta, skb); 4383 4380 } 4384 4381 4385 4382 static int mwl8k_start(struct ieee80211_hw *hw)
+3 -1
drivers/net/wireless/p54/lmac.h
··· 526 526 void p54_unregister_leds(struct p54_common *priv); 527 527 528 528 /* xmit functions */ 529 - void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb); 529 + void p54_tx_80211(struct ieee80211_hw *dev, 530 + struct ieee80211_tx_control *control, 531 + struct sk_buff *skb); 530 532 int p54_tx_cancel(struct p54_common *priv, __le32 req_id); 531 533 void p54_tx(struct p54_common *priv, struct sk_buff *skb); 532 534
+1 -1
drivers/net/wireless/p54/main.c
··· 158 158 * to cancel the old beacon template by hand, instead the firmware 159 159 * will release the previous one through the feedback mechanism. 160 160 */ 161 - p54_tx_80211(priv->hw, beacon); 161 + p54_tx_80211(priv->hw, NULL, beacon); 162 162 priv->tsf_high32 = 0; 163 163 priv->tsf_low32 = 0; 164 164
+9 -6
drivers/net/wireless/p54/txrx.c
··· 676 676 EXPORT_SYMBOL_GPL(p54_rx); 677 677 678 678 static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb, 679 - struct ieee80211_tx_info *info, u8 *queue, 680 - u32 *extra_len, u16 *flags, u16 *aid, 679 + struct ieee80211_tx_info *info, 680 + struct ieee80211_sta *sta, 681 + u8 *queue, u32 *extra_len, u16 *flags, u16 *aid, 681 682 bool *burst_possible) 682 683 { 683 684 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; ··· 747 746 } 748 747 } 749 748 750 - if (info->control.sta) 751 - *aid = info->control.sta->aid; 749 + if (sta) 750 + *aid = sta->aid; 752 751 break; 753 752 } 754 753 } ··· 768 767 } 769 768 } 770 769 771 - void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb) 770 + void p54_tx_80211(struct ieee80211_hw *dev, 771 + struct ieee80211_tx_control *control, 772 + struct sk_buff *skb) 772 773 { 773 774 struct p54_common *priv = dev->priv; 774 775 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); ··· 787 784 u8 nrates = 0, nremaining = 8; 788 785 bool burst_allowed = false; 789 786 790 - p54_tx_80211_header(priv, skb, info, &queue, &extra_len, 787 + p54_tx_80211_header(priv, skb, info, control->sta, &queue, &extra_len, 791 788 &hdr_flags, &aid, &burst_allowed); 792 789 793 790 if (p54_tx_qos_accounting_alloc(priv, skb, queue)) {
+3 -1
drivers/net/wireless/rt2x00/rt2x00.h
··· 1287 1287 /* 1288 1288 * mac80211 handlers. 1289 1289 */ 1290 - void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb); 1290 + void rt2x00mac_tx(struct ieee80211_hw *hw, 1291 + struct ieee80211_tx_control *control, 1292 + struct sk_buff *skb); 1291 1293 int rt2x00mac_start(struct ieee80211_hw *hw); 1292 1294 void rt2x00mac_stop(struct ieee80211_hw *hw); 1293 1295 int rt2x00mac_add_interface(struct ieee80211_hw *hw,
+1 -1
drivers/net/wireless/rt2x00/rt2x00dev.c
··· 194 194 */ 195 195 skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); 196 196 while (skb) { 197 - rt2x00mac_tx(rt2x00dev->hw, skb); 197 + rt2x00mac_tx(rt2x00dev->hw, NULL, skb); 198 198 skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); 199 199 } 200 200 }
+3 -1
drivers/net/wireless/rt2x00/rt2x00mac.c
··· 99 99 return retval; 100 100 } 101 101 102 - void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 102 + void rt2x00mac_tx(struct ieee80211_hw *hw, 103 + struct ieee80211_tx_control *control, 104 + struct sk_buff *skb) 103 105 { 104 106 struct rt2x00_dev *rt2x00dev = hw->priv; 105 107 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
+11 -9
drivers/net/wireless/rt2x00/rt2x00queue.c
··· 315 315 static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev, 316 316 struct sk_buff *skb, 317 317 struct txentry_desc *txdesc, 318 + struct ieee80211_sta *sta, 318 319 const struct rt2x00_rate *hwrate) 319 320 { 320 321 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); ··· 323 322 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 324 323 struct rt2x00_sta *sta_priv = NULL; 325 324 326 - if (tx_info->control.sta) { 325 + if (sta) { 327 326 txdesc->u.ht.mpdu_density = 328 - tx_info->control.sta->ht_cap.ampdu_density; 327 + sta->ht_cap.ampdu_density; 329 328 330 - sta_priv = sta_to_rt2x00_sta(tx_info->control.sta); 329 + sta_priv = sta_to_rt2x00_sta(sta); 331 330 txdesc->u.ht.wcid = sta_priv->wcid; 332 331 } 333 332 ··· 342 341 * MIMO PS should be set to 1 for STA's using dynamic SM PS 343 342 * when using more then one tx stream (>MCS7). 344 343 */ 345 - if (tx_info->control.sta && txdesc->u.ht.mcs > 7 && 346 - ((tx_info->control.sta->ht_cap.cap & 344 + if (sta && txdesc->u.ht.mcs > 7 && 345 + ((sta->ht_cap.cap & 347 346 IEEE80211_HT_CAP_SM_PS) >> 348 347 IEEE80211_HT_CAP_SM_PS_SHIFT) == 349 348 WLAN_HT_CAP_SM_PS_DYNAMIC) ··· 410 409 411 410 static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev, 412 411 struct sk_buff *skb, 413 - struct txentry_desc *txdesc) 412 + struct txentry_desc *txdesc, 413 + struct ieee80211_sta *sta) 414 414 { 415 415 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 416 416 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; ··· 505 503 506 504 if (test_bit(REQUIRE_HT_TX_DESC, &rt2x00dev->cap_flags)) 507 505 rt2x00queue_create_tx_descriptor_ht(rt2x00dev, skb, txdesc, 508 - hwrate); 506 + sta, hwrate); 509 507 else 510 508 rt2x00queue_create_tx_descriptor_plcp(rt2x00dev, skb, txdesc, 511 509 hwrate); ··· 597 595 * after that we are free to use the skb->cb array 598 596 * for our information. 599 597 */ 600 - rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc); 598 + rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc, NULL); 601 599 602 600 /* 603 601 * All information is retrieved from the skb->cb array, ··· 742 740 * after that we are free to use the skb->cb array 743 741 * for our information. 744 742 */ 745 - rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc); 743 + rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc, NULL); 746 744 747 745 /* 748 746 * Fill in skb descriptor
+4 -2
drivers/net/wireless/rtl818x/rtl8180/dev.c
··· 244 244 return IRQ_HANDLED; 245 245 } 246 246 247 - static void rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb) 247 + static void rtl8180_tx(struct ieee80211_hw *dev, 248 + struct ieee80211_tx_control *control, 249 + struct sk_buff *skb) 248 250 { 249 251 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 250 252 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; ··· 712 710 /* TODO: use actual beacon queue */ 713 711 skb_set_queue_mapping(skb, 0); 714 712 715 - rtl8180_tx(dev, skb); 713 + rtl8180_tx(dev, NULL, skb); 716 714 717 715 resched: 718 716 /*
+4 -2
drivers/net/wireless/rtl818x/rtl8187/dev.c
··· 228 228 } 229 229 } 230 230 231 - static void rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb) 231 + static void rtl8187_tx(struct ieee80211_hw *dev, 232 + struct ieee80211_tx_control *control, 233 + struct sk_buff *skb) 232 234 { 233 235 struct rtl8187_priv *priv = dev->priv; 234 236 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); ··· 1078 1076 /* TODO: use actual beacon queue */ 1079 1077 skb_set_queue_mapping(skb, 0); 1080 1078 1081 - rtl8187_tx(dev, skb); 1079 + rtl8187_tx(dev, NULL, skb); 1082 1080 1083 1081 resched: 1084 1082 /*
+1 -2
drivers/net/wireless/rtlwifi/base.c
··· 1341 1341 rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0); 1342 1342 1343 1343 info->control.rates[0].idx = 0; 1344 - info->control.sta = sta; 1345 1344 info->band = hw->conf.channel->band; 1346 - rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc); 1345 + rtlpriv->intf_ops->adapter_tx(hw, sta, skb, &tcb_desc); 1347 1346 } 1348 1347 err_free: 1349 1348 return 0;
+5 -3
drivers/net/wireless/rtlwifi/core.c
··· 124 124 mutex_unlock(&rtlpriv->locks.conf_mutex); 125 125 } 126 126 127 - static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 127 + static void rtl_op_tx(struct ieee80211_hw *hw, 128 + struct ieee80211_tx_control *control, 129 + struct sk_buff *skb) 128 130 { 129 131 struct rtl_priv *rtlpriv = rtl_priv(hw); 130 132 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); ··· 140 138 if (!test_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status)) 141 139 goto err_free; 142 140 143 - if (!rtlpriv->intf_ops->waitq_insert(hw, skb)) 144 - rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc); 141 + if (!rtlpriv->intf_ops->waitq_insert(hw, control->sta, skb)) 142 + rtlpriv->intf_ops->adapter_tx(hw, control->sta, skb, &tcb_desc); 145 143 146 144 return; 147 145
+8 -8
drivers/net/wireless/rtlwifi/pci.c
··· 504 504 _rtl_update_earlymode_info(hw, skb, 505 505 &tcb_desc, tid); 506 506 507 - rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc); 507 + rtlpriv->intf_ops->adapter_tx(hw, NULL, skb, &tcb_desc); 508 508 } 509 509 } 510 510 } ··· 929 929 info = IEEE80211_SKB_CB(pskb); 930 930 pdesc = &ring->desc[0]; 931 931 rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *) pdesc, 932 - info, pskb, BEACON_QUEUE, &tcb_desc); 932 + info, NULL, pskb, BEACON_QUEUE, &tcb_desc); 933 933 934 934 __skb_queue_tail(&ring->queue, pskb); 935 935 ··· 1305 1305 } 1306 1306 1307 1307 static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw, 1308 + struct ieee80211_sta *sta, 1308 1309 struct sk_buff *skb) 1309 1310 { 1310 1311 struct rtl_priv *rtlpriv = rtl_priv(hw); 1311 - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 1312 - struct ieee80211_sta *sta = info->control.sta; 1313 1312 struct rtl_sta_info *sta_entry = NULL; 1314 1313 u8 tid = rtl_get_tid(skb); 1315 1314 ··· 1336 1337 return true; 1337 1338 } 1338 1339 1339 - static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb, 1340 - struct rtl_tcb_desc *ptcb_desc) 1340 + static int rtl_pci_tx(struct ieee80211_hw *hw, 1341 + struct ieee80211_sta *sta, 1342 + struct sk_buff *skb, 1343 + struct rtl_tcb_desc *ptcb_desc) 1341 1344 { 1342 1345 struct rtl_priv *rtlpriv = rtl_priv(hw); 1343 1346 struct rtl_sta_info *sta_entry = NULL; 1344 1347 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 1345 - struct ieee80211_sta *sta = info->control.sta; 1346 1348 struct rtl8192_tx_ring *ring; 1347 1349 struct rtl_tx_desc *pdesc; 1348 1350 u8 idx; ··· 1418 1418 rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX); 1419 1419 1420 1420 rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, 1421 - info, skb, hw_queue, ptcb_desc); 1421 + info, sta, skb, hw_queue, ptcb_desc); 1422 1422 1423 1423 __skb_queue_tail(&ring->queue, skb); 1424 1424
+3 -2
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
··· 596 596 597 597 void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, 598 598 struct ieee80211_hdr *hdr, u8 *pdesc_tx, 599 - struct ieee80211_tx_info *info, struct sk_buff *skb, 599 + struct ieee80211_tx_info *info, 600 + struct ieee80211_sta *sta, 601 + struct sk_buff *skb, 600 602 u8 hw_queue, struct rtl_tcb_desc *tcb_desc) 601 603 { 602 604 struct rtl_priv *rtlpriv = rtl_priv(hw); ··· 606 604 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); 607 605 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); 608 606 bool defaultadapter = true; 609 - struct ieee80211_sta *sta; 610 607 u8 *pdesc = pdesc_tx; 611 608 u16 seq_number; 612 609 __le16 fc = hdr->frame_control;
+1
drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
··· 713 713 void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, 714 714 struct ieee80211_hdr *hdr, 715 715 u8 *pdesc, struct ieee80211_tx_info *info, 716 + struct ieee80211_sta *sta, 716 717 struct sk_buff *skb, u8 hw_queue, 717 718 struct rtl_tcb_desc *ptcb_desc); 718 719 bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
+3 -2
drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
··· 496 496 497 497 void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, 498 498 struct ieee80211_hdr *hdr, u8 *pdesc_tx, 499 - struct ieee80211_tx_info *info, struct sk_buff *skb, 499 + struct ieee80211_tx_info *info, 500 + struct ieee80211_sta *sta, 501 + struct sk_buff *skb, 500 502 u8 queue_index, 501 503 struct rtl_tcb_desc *tcb_desc) 502 504 { ··· 506 504 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); 507 505 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); 508 506 bool defaultadapter = true; 509 - struct ieee80211_sta *sta = info->control.sta = info->control.sta; 510 507 u8 *qc = ieee80211_get_qos_ctl(hdr); 511 508 u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK; 512 509 u16 seq_number;
+3 -1
drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
··· 420 420 struct sk_buff_head *); 421 421 void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, 422 422 struct ieee80211_hdr *hdr, u8 *pdesc_tx, 423 - struct ieee80211_tx_info *info, struct sk_buff *skb, 423 + struct ieee80211_tx_info *info, 424 + struct ieee80211_sta *sta, 425 + struct sk_buff *skb, 424 426 u8 queue_index, 425 427 struct rtl_tcb_desc *tcb_desc); 426 428 void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 * pDesc,
+3 -2
drivers/net/wireless/rtlwifi/rtl8192de/trx.c
··· 551 551 552 552 void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, 553 553 struct ieee80211_hdr *hdr, u8 *pdesc_tx, 554 - struct ieee80211_tx_info *info, struct sk_buff *skb, 554 + struct ieee80211_tx_info *info, 555 + struct ieee80211_sta *sta, 556 + struct sk_buff *skb, 555 557 u8 hw_queue, struct rtl_tcb_desc *ptcb_desc) 556 558 { 557 559 struct rtl_priv *rtlpriv = rtl_priv(hw); ··· 561 559 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); 562 560 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); 563 561 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); 564 - struct ieee80211_sta *sta = info->control.sta; 565 562 u8 *pdesc = pdesc_tx; 566 563 u16 seq_number; 567 564 __le16 fc = hdr->frame_control;
+1
drivers/net/wireless/rtlwifi/rtl8192de/trx.h
··· 730 730 void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, 731 731 struct ieee80211_hdr *hdr, 732 732 u8 *pdesc, struct ieee80211_tx_info *info, 733 + struct ieee80211_sta *sta, 733 734 struct sk_buff *skb, u8 hw_queue, 734 735 struct rtl_tcb_desc *ptcb_desc); 735 736 bool rtl92de_rx_query_desc(struct ieee80211_hw *hw,
+3 -2
drivers/net/wireless/rtlwifi/rtl8192se/trx.c
··· 591 591 592 592 void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, 593 593 struct ieee80211_hdr *hdr, u8 *pdesc_tx, 594 - struct ieee80211_tx_info *info, struct sk_buff *skb, 594 + struct ieee80211_tx_info *info, 595 + struct ieee80211_sta *sta, 596 + struct sk_buff *skb, 595 597 u8 hw_queue, struct rtl_tcb_desc *ptcb_desc) 596 598 { 597 599 struct rtl_priv *rtlpriv = rtl_priv(hw); 598 600 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); 599 601 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); 600 602 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); 601 - struct ieee80211_sta *sta = info->control.sta; 602 603 u8 *pdesc = pdesc_tx; 603 604 u16 seq_number; 604 605 __le16 fc = hdr->frame_control;
+1
drivers/net/wireless/rtlwifi/rtl8192se/trx.h
··· 31 31 32 32 void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr, 33 33 u8 *pdesc, struct ieee80211_tx_info *info, 34 + struct ieee80211_sta *sta, 34 35 struct sk_buff *skb, u8 hw_queue, 35 36 struct rtl_tcb_desc *ptcb_desc); 36 37 void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, bool firstseg,
+10 -5
drivers/net/wireless/rtlwifi/usb.c
··· 848 848 _rtl_submit_tx_urb(hw, _urb); 849 849 } 850 850 851 - static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb, 852 - u16 hw_queue) 851 + static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, 852 + struct ieee80211_sta *sta, 853 + struct sk_buff *skb, 854 + u16 hw_queue) 853 855 { 854 856 struct rtl_priv *rtlpriv = rtl_priv(hw); 855 857 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); ··· 893 891 seq_number += 1; 894 892 seq_number <<= 4; 895 893 } 896 - rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, skb, 894 + rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, sta, skb, 897 895 hw_queue, &tcb_desc); 898 896 if (!ieee80211_has_morefrags(hdr->frame_control)) { 899 897 if (qc) ··· 903 901 rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX); 904 902 } 905 903 906 - static int rtl_usb_tx(struct ieee80211_hw *hw, struct sk_buff *skb, 904 + static int rtl_usb_tx(struct ieee80211_hw *hw, 905 + struct ieee80211_sta *sta, 906 + struct sk_buff *skb, 907 907 struct rtl_tcb_desc *dummy) 908 908 { 909 909 struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw)); ··· 917 913 if (unlikely(is_hal_stop(rtlhal))) 918 914 goto err_free; 919 915 hw_queue = rtlusb->usb_mq_to_hwq(fc, skb_get_queue_mapping(skb)); 920 - _rtl_usb_tx_preprocess(hw, skb, hw_queue); 916 + _rtl_usb_tx_preprocess(hw, sta, skb, hw_queue); 921 917 _rtl_usb_transmit(hw, skb, hw_queue); 922 918 return NETDEV_TX_OK; 923 919 ··· 927 923 } 928 924 929 925 static bool rtl_usb_tx_chk_waitq_insert(struct ieee80211_hw *hw, 926 + struct ieee80211_sta *sta, 930 927 struct sk_buff *skb) 931 928 { 932 929 return false;
+9 -4
drivers/net/wireless/rtlwifi/wifi.h
··· 122 122 EEPROM_BOOT_EFUSE, 123 123 }; 124 124 125 - enum rtl_status { 125 + enum ttl_status { 126 126 RTL_STATUS_INTERFACE_START = 0, 127 127 }; 128 128 ··· 1418 1418 void (*fill_tx_desc) (struct ieee80211_hw *hw, 1419 1419 struct ieee80211_hdr *hdr, u8 *pdesc_tx, 1420 1420 struct ieee80211_tx_info *info, 1421 + struct ieee80211_sta *sta, 1421 1422 struct sk_buff *skb, u8 hw_queue, 1422 1423 struct rtl_tcb_desc *ptcb_desc); 1423 1424 void (*fill_fake_txdesc) (struct ieee80211_hw *hw, u8 *pDesc, ··· 1476 1475 int (*adapter_start) (struct ieee80211_hw *hw); 1477 1476 void (*adapter_stop) (struct ieee80211_hw *hw); 1478 1477 1479 - int (*adapter_tx) (struct ieee80211_hw *hw, struct sk_buff *skb, 1480 - struct rtl_tcb_desc *ptcb_desc); 1478 + int (*adapter_tx) (struct ieee80211_hw *hw, 1479 + struct ieee80211_sta *sta, 1480 + struct sk_buff *skb, 1481 + struct rtl_tcb_desc *ptcb_desc); 1481 1482 void (*flush)(struct ieee80211_hw *hw, bool drop); 1482 1483 int (*reset_trx_ring) (struct ieee80211_hw *hw); 1483 - bool (*waitq_insert) (struct ieee80211_hw *hw, struct sk_buff *skb); 1484 + bool (*waitq_insert) (struct ieee80211_hw *hw, 1485 + struct ieee80211_sta *sta, 1486 + struct sk_buff *skb); 1484 1487 1485 1488 /*pci */ 1486 1489 void (*disable_aspm) (struct ieee80211_hw *hw);
+3 -1
drivers/net/wireless/ti/wl1251/main.c
··· 354 354 return ret; 355 355 } 356 356 357 - static void wl1251_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 357 + static void wl1251_op_tx(struct ieee80211_hw *hw, 358 + struct ieee80211_tx_control *control, 359 + struct sk_buff *skb) 358 360 { 359 361 struct wl1251 *wl = hw->priv; 360 362 unsigned long flags;
+4 -2
drivers/net/wireless/ti/wlcore/main.c
··· 1181 1181 return ret; 1182 1182 } 1183 1183 1184 - static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 1184 + static void wl1271_op_tx(struct ieee80211_hw *hw, 1185 + struct ieee80211_tx_control *control, 1186 + struct sk_buff *skb) 1185 1187 { 1186 1188 struct wl1271 *wl = hw->priv; 1187 1189 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); ··· 1199 1197 mapping = skb_get_queue_mapping(skb); 1200 1198 q = wl1271_tx_get_queue(mapping); 1201 1199 1202 - hlid = wl12xx_tx_get_hlid(wl, wlvif, skb, info->control.sta); 1200 + hlid = wl12xx_tx_get_hlid(wl, wlvif, skb, control->sta); 1203 1201 1204 1202 spin_lock_irqsave(&wl->wl_lock, flags); 1205 1203
+4 -2
drivers/net/wireless/zd1211rw/zd_mac.c
··· 937 937 * control block of the skbuff will be initialized. If necessary the incoming 938 938 * mac80211 queues will be stopped. 939 939 */ 940 - static void zd_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 940 + static void zd_op_tx(struct ieee80211_hw *hw, 941 + struct ieee80211_tx_control *control, 942 + struct sk_buff *skb) 941 943 { 942 944 struct zd_mac *mac = zd_hw_mac(hw); 943 945 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); ··· 1178 1176 skb = ieee80211_get_buffered_bc(mac->hw, mac->vif); 1179 1177 if (!skb) 1180 1178 break; 1181 - zd_op_tx(mac->hw, skb); 1179 + zd_op_tx(mac->hw, NULL, skb); 1182 1180 } 1183 1181 1184 1182 /*
+3 -1
drivers/staging/winbond/wbusb.c
··· 119 119 *total_flags = new_flags; 120 120 } 121 121 122 - static void wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb) 122 + static void wbsoft_tx(struct ieee80211_hw *dev, 123 + struct ieee80211_tx_control *control, 124 + struct sk_buff *skb) 123 125 { 124 126 struct wbsoft_priv *priv = dev->priv; 125 127
+15 -5
include/net/mac80211.h
··· 527 527 * (2) driver internal use (if applicable) 528 528 * (3) TX status information - driver tells mac80211 what happened 529 529 * 530 - * The TX control's sta pointer is only valid during the ->tx call, 531 - * it may be NULL. 532 - * 533 530 * @flags: transmit info flags, defined above 534 531 * @band: the band to transmit on (use for checking for races) 535 532 * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC ··· 557 560 struct ieee80211_tx_rate rates[ 558 561 IEEE80211_TX_MAX_RATES]; 559 562 s8 rts_cts_rate_idx; 563 + /* 3 bytes free */ 560 564 }; 561 565 /* only needed before rate control */ 562 566 unsigned long jiffies; ··· 565 567 /* NB: vif can be NULL for injected frames */ 566 568 struct ieee80211_vif *vif; 567 569 struct ieee80211_key_conf *hw_key; 568 - struct ieee80211_sta *sta; 570 + /* 8 bytes free */ 569 571 } control; 570 572 struct { 571 573 struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES]; ··· 1074 1076 */ 1075 1077 enum sta_notify_cmd { 1076 1078 STA_NOTIFY_SLEEP, STA_NOTIFY_AWAKE, 1079 + }; 1080 + 1081 + /** 1082 + * struct ieee80211_tx_control - TX control data 1083 + * 1084 + * @sta: station table entry, this sta pointer may be NULL and 1085 + * it is not allowed to copy the pointer, due to RCU. 1086 + */ 1087 + struct ieee80211_tx_control { 1088 + struct ieee80211_sta *sta; 1077 1089 }; 1078 1090 1079 1091 /** ··· 2277 2269 * The callback is optional and can (should!) sleep. 2278 2270 */ 2279 2271 struct ieee80211_ops { 2280 - void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 2272 + void (*tx)(struct ieee80211_hw *hw, 2273 + struct ieee80211_tx_control *control, 2274 + struct sk_buff *skb); 2281 2275 int (*start)(struct ieee80211_hw *hw); 2282 2276 void (*stop)(struct ieee80211_hw *hw); 2283 2277 #ifdef CONFIG_PM
+4 -2
net/mac80211/driver-ops.h
··· 22 22 return sdata; 23 23 } 24 24 25 - static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb) 25 + static inline void drv_tx(struct ieee80211_local *local, 26 + struct ieee80211_tx_control *control, 27 + struct sk_buff *skb) 26 28 { 27 - local->ops->tx(&local->hw, skb); 29 + local->ops->tx(&local->hw, control, skb); 28 30 } 29 31 30 32 static inline void drv_get_et_strings(struct ieee80211_sub_if_data *sdata,
+3 -2
net/mac80211/tx.c
··· 1204 1204 struct sk_buff_head *skbs, 1205 1205 bool txpending) 1206 1206 { 1207 + struct ieee80211_tx_control control; 1207 1208 struct sk_buff *skb, *tmp; 1208 1209 unsigned long flags; 1209 1210 ··· 1241 1240 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); 1242 1241 1243 1242 info->control.vif = vif; 1244 - info->control.sta = sta; 1243 + control.sta = sta; 1245 1244 1246 1245 __skb_unlink(skb, skbs); 1247 - drv_tx(local, skb); 1246 + drv_tx(local, &control, skb); 1248 1247 } 1249 1248 1250 1249 return true;