@@ -1452,7 +1452,7 @@ ieee80211_rx_h_check_dup(struct ieee80211_rx_data *rx)
14521452 if (unlikely (ieee80211_has_retry (hdr -> frame_control ) &&
14531453 rx -> sta -> last_seq_ctrl [rx -> seqno_idx ] == hdr -> seq_ctrl )) {
14541454 I802_DEBUG_INC (rx -> local -> dot11FrameDuplicateCount );
1455- rx -> sta -> deflink . rx_stats .num_duplicates ++ ;
1455+ rx -> link_sta -> rx_stats .num_duplicates ++ ;
14561456 return RX_DROP_UNUSABLE ;
14571457 } else if (!(status -> flag & RX_FLAG_AMSDU_MORE )) {
14581458 rx -> sta -> last_seq_ctrl [rx -> seqno_idx ] = hdr -> seq_ctrl ;
@@ -1731,12 +1731,13 @@ static ieee80211_rx_result debug_noinline
17311731ieee80211_rx_h_sta_process (struct ieee80211_rx_data * rx )
17321732{
17331733 struct sta_info * sta = rx -> sta ;
1734+ struct link_sta_info * link_sta = rx -> link_sta ;
17341735 struct sk_buff * skb = rx -> skb ;
17351736 struct ieee80211_rx_status * status = IEEE80211_SKB_RXCB (skb );
17361737 struct ieee80211_hdr * hdr = (struct ieee80211_hdr * )skb -> data ;
17371738 int i ;
17381739
1739- if (!sta )
1740+ if (!sta || ! link_sta )
17401741 return RX_CONTINUE ;
17411742
17421743 /*
@@ -1752,47 +1753,47 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
17521753 NL80211_IFTYPE_ADHOC );
17531754 if (ether_addr_equal (bssid , rx -> sdata -> u .ibss .bssid ) &&
17541755 test_sta_flag (sta , WLAN_STA_AUTHORIZED )) {
1755- sta -> deflink . rx_stats .last_rx = jiffies ;
1756+ link_sta -> rx_stats .last_rx = jiffies ;
17561757 if (ieee80211_is_data (hdr -> frame_control ) &&
17571758 !is_multicast_ether_addr (hdr -> addr1 ))
1758- sta -> deflink . rx_stats .last_rate =
1759+ link_sta -> rx_stats .last_rate =
17591760 sta_stats_encode_rate (status );
17601761 }
17611762 } else if (rx -> sdata -> vif .type == NL80211_IFTYPE_OCB ) {
1762- sta -> deflink . rx_stats .last_rx = jiffies ;
1763+ link_sta -> rx_stats .last_rx = jiffies ;
17631764 } else if (!ieee80211_is_s1g_beacon (hdr -> frame_control ) &&
17641765 !is_multicast_ether_addr (hdr -> addr1 )) {
17651766 /*
17661767 * Mesh beacons will update last_rx when if they are found to
17671768 * match the current local configuration when processed.
17681769 */
1769- sta -> deflink . rx_stats .last_rx = jiffies ;
1770+ link_sta -> rx_stats .last_rx = jiffies ;
17701771 if (ieee80211_is_data (hdr -> frame_control ))
1771- sta -> deflink . rx_stats .last_rate = sta_stats_encode_rate (status );
1772+ link_sta -> rx_stats .last_rate = sta_stats_encode_rate (status );
17721773 }
17731774
1774- sta -> deflink . rx_stats .fragments ++ ;
1775+ link_sta -> rx_stats .fragments ++ ;
17751776
1776- u64_stats_update_begin (& rx -> sta -> deflink . rx_stats .syncp );
1777- sta -> deflink . rx_stats .bytes += rx -> skb -> len ;
1778- u64_stats_update_end (& rx -> sta -> deflink . rx_stats .syncp );
1777+ u64_stats_update_begin (& link_sta -> rx_stats .syncp );
1778+ link_sta -> rx_stats .bytes += rx -> skb -> len ;
1779+ u64_stats_update_end (& link_sta -> rx_stats .syncp );
17791780
17801781 if (!(status -> flag & RX_FLAG_NO_SIGNAL_VAL )) {
1781- sta -> deflink . rx_stats .last_signal = status -> signal ;
1782- ewma_signal_add (& sta -> deflink . rx_stats_avg .signal ,
1782+ link_sta -> rx_stats .last_signal = status -> signal ;
1783+ ewma_signal_add (& link_sta -> rx_stats_avg .signal ,
17831784 - status -> signal );
17841785 }
17851786
17861787 if (status -> chains ) {
1787- sta -> deflink . rx_stats .chains = status -> chains ;
1788+ link_sta -> rx_stats .chains = status -> chains ;
17881789 for (i = 0 ; i < ARRAY_SIZE (status -> chain_signal ); i ++ ) {
17891790 int signal = status -> chain_signal [i ];
17901791
17911792 if (!(status -> chains & BIT (i )))
17921793 continue ;
17931794
1794- sta -> deflink . rx_stats .chain_signal_last [i ] = signal ;
1795- ewma_signal_add (& sta -> deflink . rx_stats_avg .chain_signal [i ],
1795+ link_sta -> rx_stats .chain_signal_last [i ] = signal ;
1796+ ewma_signal_add (& link_sta -> rx_stats_avg .chain_signal [i ],
17961797 - signal );
17971798 }
17981799 }
@@ -1853,7 +1854,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
18531854 * Update counter and free packet here to avoid
18541855 * counting this as a dropped packed.
18551856 */
1856- sta -> deflink . rx_stats .packets ++ ;
1857+ link_sta -> rx_stats .packets ++ ;
18571858 dev_kfree_skb (rx -> skb );
18581859 return RX_QUEUED ;
18591860 }
@@ -2389,7 +2390,7 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
23892390 out :
23902391 ieee80211_led_rx (rx -> local );
23912392 if (rx -> sta )
2392- rx -> sta -> deflink . rx_stats .packets ++ ;
2393+ rx -> link_sta -> rx_stats .packets ++ ;
23932394 return RX_CONTINUE ;
23942395}
23952396
@@ -2665,9 +2666,9 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
26652666 * for non-QoS-data frames. Here we know it's a data
26662667 * frame, so count MSDUs.
26672668 */
2668- u64_stats_update_begin (& rx -> sta -> deflink . rx_stats .syncp );
2669- rx -> sta -> deflink . rx_stats .msdu [rx -> seqno_idx ]++ ;
2670- u64_stats_update_end (& rx -> sta -> deflink . rx_stats .syncp );
2669+ u64_stats_update_begin (& rx -> link_sta -> rx_stats .syncp );
2670+ rx -> link_sta -> rx_stats .msdu [rx -> seqno_idx ]++ ;
2671+ u64_stats_update_end (& rx -> link_sta -> rx_stats .syncp );
26712672 }
26722673
26732674 if ((sdata -> vif .type == NL80211_IFTYPE_AP ||
@@ -3364,7 +3365,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
33643365 switch (mgmt -> u .action .category ) {
33653366 case WLAN_CATEGORY_HT :
33663367 /* reject HT action frames from stations not supporting HT */
3367- if (!rx -> sta -> sta . deflink . ht_cap .ht_supported )
3368+ if (!rx -> link_sta -> pub -> ht_cap .ht_supported )
33683369 goto invalid ;
33693370
33703371 if (sdata -> vif .type != NL80211_IFTYPE_STATION &&
@@ -3428,26 +3429,26 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
34283429 struct sta_opmode_info sta_opmode = {};
34293430
34303431 /* If it doesn't support 40 MHz it can't change ... */
3431- if (!(rx -> sta -> sta . deflink . ht_cap .cap &
3432+ if (!(rx -> link_sta -> pub -> ht_cap .cap &
34323433 IEEE80211_HT_CAP_SUP_WIDTH_20_40 ))
34333434 goto handled ;
34343435
34353436 if (chanwidth == IEEE80211_HT_CHANWIDTH_20MHZ )
34363437 max_bw = IEEE80211_STA_RX_BW_20 ;
34373438 else
3438- max_bw = ieee80211_sta_cap_rx_bw (& rx -> sta -> deflink );
3439+ max_bw = ieee80211_sta_cap_rx_bw (rx -> link_sta );
34393440
34403441 /* set cur_max_bandwidth and recalc sta bw */
3441- rx -> sta -> deflink . cur_max_bandwidth = max_bw ;
3442- new_bw = ieee80211_sta_cur_vht_bw (& rx -> sta -> deflink );
3442+ rx -> link_sta -> cur_max_bandwidth = max_bw ;
3443+ new_bw = ieee80211_sta_cur_vht_bw (rx -> link_sta );
34433444
3444- if (rx -> sta -> sta . deflink . bandwidth == new_bw )
3445+ if (rx -> link_sta -> pub -> bandwidth == new_bw )
34453446 goto handled ;
34463447
3447- rx -> sta -> sta . deflink . bandwidth = new_bw ;
3448+ rx -> link_sta -> pub -> bandwidth = new_bw ;
34483449 sband = rx -> local -> hw .wiphy -> bands [status -> band ];
34493450 sta_opmode .bw =
3450- ieee80211_sta_rx_bw_to_chan_width (& rx -> sta -> deflink );
3451+ ieee80211_sta_rx_bw_to_chan_width (rx -> link_sta );
34513452 sta_opmode .changed = STA_OPMODE_MAX_BW_CHANGED ;
34523453
34533454 rate_control_rate_update (local , sband , rx -> sta , 0 ,
@@ -3641,7 +3642,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
36413642
36423643 handled :
36433644 if (rx -> sta )
3644- rx -> sta -> deflink . rx_stats .packets ++ ;
3645+ rx -> link_sta -> rx_stats .packets ++ ;
36453646 dev_kfree_skb (rx -> skb );
36463647 return RX_QUEUED ;
36473648
@@ -3685,7 +3686,7 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx)
36853686
36863687 if (cfg80211_rx_mgmt_ext (& rx -> sdata -> wdev , & info )) {
36873688 if (rx -> sta )
3688- rx -> sta -> deflink . rx_stats .packets ++ ;
3689+ rx -> link_sta -> rx_stats .packets ++ ;
36893690 dev_kfree_skb (rx -> skb );
36903691 return RX_QUEUED ;
36913692 }
@@ -3723,7 +3724,7 @@ ieee80211_rx_h_action_post_userspace(struct ieee80211_rx_data *rx)
37233724
37243725 handled :
37253726 if (rx -> sta )
3726- rx -> sta -> deflink . rx_stats .packets ++ ;
3727+ rx -> link_sta -> rx_stats .packets ++ ;
37273728 dev_kfree_skb (rx -> skb );
37283729 return RX_QUEUED ;
37293730}
@@ -3943,7 +3944,7 @@ static void ieee80211_rx_handlers_result(struct ieee80211_rx_data *rx,
39433944 case RX_DROP_MONITOR :
39443945 I802_DEBUG_INC (rx -> sdata -> local -> rx_handlers_drop );
39453946 if (rx -> sta )
3946- rx -> sta -> deflink . rx_stats .dropped ++ ;
3947+ rx -> link_sta -> rx_stats .dropped ++ ;
39473948 fallthrough ;
39483949 case RX_CONTINUE : {
39493950 struct ieee80211_rate * rate = NULL ;
@@ -3962,7 +3963,7 @@ static void ieee80211_rx_handlers_result(struct ieee80211_rx_data *rx,
39623963 case RX_DROP_UNUSABLE :
39633964 I802_DEBUG_INC (rx -> sdata -> local -> rx_handlers_drop );
39643965 if (rx -> sta )
3965- rx -> sta -> deflink . rx_stats .dropped ++ ;
3966+ rx -> link_sta -> rx_stats .dropped ++ ;
39663967 dev_kfree_skb (rx -> skb );
39673968 break ;
39683969 case RX_QUEUED :
0 commit comments