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

Merge tag 'wireless-2024-10-21' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless

wireless fixes for v6.12-rc5

The first set of wireless fixes for v6.12. We have been busy and have
not been able to send this earlier, so there are more fixes than
usual. The fixes are all over, both in stack and in drivers, but
nothing special really standing out.

+222 -72
+6 -1
drivers/net/wireless/ath/ath10k/wmi-tlv.c
··· 3043 3043 struct sk_buff *msdu) 3044 3044 { 3045 3045 struct ath10k_skb_cb *cb = ATH10K_SKB_CB(msdu); 3046 + struct ath10k_mgmt_tx_pkt_addr *pkt_addr; 3046 3047 struct ath10k_wmi *wmi = &ar->wmi; 3047 3048 3048 - idr_remove(&wmi->mgmt_pending_tx, cb->msdu_id); 3049 + spin_lock_bh(&ar->data_lock); 3050 + pkt_addr = idr_remove(&wmi->mgmt_pending_tx, cb->msdu_id); 3051 + spin_unlock_bh(&ar->data_lock); 3052 + 3053 + kfree(pkt_addr); 3049 3054 3050 3055 return 0; 3051 3056 }
+2
drivers/net/wireless/ath/ath10k/wmi.c
··· 2441 2441 dma_unmap_single(ar->dev, pkt_addr->paddr, 2442 2442 msdu->len, DMA_TO_DEVICE); 2443 2443 info = IEEE80211_SKB_CB(msdu); 2444 + kfree(pkt_addr); 2444 2445 2445 2446 if (param->status) { 2446 2447 info->flags &= ~IEEE80211_TX_STAT_ACK; ··· 9613 9612 dma_unmap_single(ar->dev, pkt_addr->paddr, 9614 9613 msdu->len, DMA_TO_DEVICE); 9615 9614 ieee80211_free_txskb(ar->hw, msdu); 9615 + kfree(pkt_addr); 9616 9616 9617 9617 return 0; 9618 9618 }
+5 -2
drivers/net/wireless/ath/ath11k/dp_rx.c
··· 5291 5291 hal_status == HAL_TLV_STATUS_PPDU_DONE) { 5292 5292 rx_mon_stats->status_ppdu_done++; 5293 5293 pmon->mon_ppdu_status = DP_PPDU_STATUS_DONE; 5294 - ath11k_dp_rx_mon_dest_process(ar, mac_id, budget, napi); 5295 - pmon->mon_ppdu_status = DP_PPDU_STATUS_START; 5294 + if (!ab->hw_params.full_monitor_mode) { 5295 + ath11k_dp_rx_mon_dest_process(ar, mac_id, 5296 + budget, napi); 5297 + pmon->mon_ppdu_status = DP_PPDU_STATUS_START; 5298 + } 5296 5299 } 5297 5300 5298 5301 if (ppdu_info->peer_id == HAL_INVALID_PEERID ||
+1 -1
drivers/net/wireless/ath/wil6210/txrx.c
··· 306 306 struct sk_buff *skb) 307 307 { 308 308 struct wil6210_rtap { 309 - struct ieee80211_radiotap_header rthdr; 309 + struct ieee80211_radiotap_header_fixed rthdr; 310 310 /* fields should be in the order of bits in rthdr.it_present */ 311 311 /* flags */ 312 312 u8 flags;
+1
drivers/net/wireless/broadcom/brcm80211/Kconfig
··· 27 27 config BRCM_TRACING 28 28 bool "Broadcom device tracing" 29 29 depends on BRCMSMAC || BRCMFMAC 30 + depends on TRACING 30 31 help 31 32 If you say Y here, the Broadcom wireless drivers will register 32 33 with ftrace to dump event information into the trace ringbuffer.
+1 -1
drivers/net/wireless/intel/ipw2x00/ipw2100.c
··· 2518 2518 * to build this manually element by element, we can write it much 2519 2519 * more efficiently than we can parse it. ORDER MATTERS HERE */ 2520 2520 struct ipw_rt_hdr { 2521 - struct ieee80211_radiotap_header rt_hdr; 2521 + struct ieee80211_radiotap_header_fixed rt_hdr; 2522 2522 s8 rt_dbmsignal; /* signal in dbM, kluged to signed */ 2523 2523 } *ipw_rt; 2524 2524
+1 -1
drivers/net/wireless/intel/ipw2x00/ipw2200.h
··· 1143 1143 * structure is provided regardless of any bits unset. 1144 1144 */ 1145 1145 struct ipw_rt_hdr { 1146 - struct ieee80211_radiotap_header rt_hdr; 1146 + struct ieee80211_radiotap_header_fixed rt_hdr; 1147 1147 u64 rt_tsf; /* TSF */ /* XXX */ 1148 1148 u8 rt_flags; /* radiotap packet flags */ 1149 1149 u8 rt_rate; /* rate in 500kb/s */
+14 -1
drivers/net/wireless/intel/iwlegacy/common.c
··· 3122 3122 struct il_cmd_meta *out_meta; 3123 3123 dma_addr_t phys_addr; 3124 3124 unsigned long flags; 3125 + u8 *out_payload; 3125 3126 u32 idx; 3126 3127 u16 fix_size; 3127 3128 ··· 3158 3157 out_cmd = txq->cmd[idx]; 3159 3158 out_meta = &txq->meta[idx]; 3160 3159 3160 + /* The payload is in the same place in regular and huge 3161 + * command buffers, but we need to let the compiler know when 3162 + * we're using a larger payload buffer to avoid "field- 3163 + * spanning write" warnings at run-time for huge commands. 3164 + */ 3165 + if (cmd->flags & CMD_SIZE_HUGE) 3166 + out_payload = ((struct il_device_cmd_huge *)out_cmd)->cmd.payload; 3167 + else 3168 + out_payload = out_cmd->cmd.payload; 3169 + 3161 3170 if (WARN_ON(out_meta->flags & CMD_MAPPED)) { 3162 3171 spin_unlock_irqrestore(&il->hcmd_lock, flags); 3163 3172 return -ENOSPC; ··· 3181 3170 out_meta->callback = cmd->callback; 3182 3171 3183 3172 out_cmd->hdr.cmd = cmd->id; 3184 - memcpy(&out_cmd->cmd.payload, cmd->data, cmd->len); 3173 + memcpy(out_payload, cmd->data, cmd->len); 3185 3174 3186 3175 /* At this point, the out_cmd now has all of the incoming cmd 3187 3176 * information */ ··· 4973 4962 */ 4974 4963 pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00); 4975 4964 4965 + _il_wr(il, CSR_INT, 0xffffffff); 4966 + _il_wr(il, CSR_FH_INT_STATUS, 0xffffffff); 4976 4967 il_enable_interrupts(il); 4977 4968 4978 4969 if (!(_il_rd(il, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW))
+12
drivers/net/wireless/intel/iwlegacy/common.h
··· 560 560 561 561 #define TFD_MAX_PAYLOAD_SIZE (sizeof(struct il_device_cmd)) 562 562 563 + /** 564 + * struct il_device_cmd_huge 565 + * 566 + * For use when sending huge commands. 567 + */ 568 + struct il_device_cmd_huge { 569 + struct il_cmd_header hdr; /* uCode API */ 570 + union { 571 + u8 payload[IL_MAX_CMD_SIZE - sizeof(struct il_cmd_header)]; 572 + } __packed cmd; 573 + } __packed; 574 + 563 575 struct il_host_cmd { 564 576 const void *data; 565 577 unsigned long reply_page;
+2 -2
drivers/net/wireless/marvell/libertas/radiotap.h
··· 2 2 #include <net/ieee80211_radiotap.h> 3 3 4 4 struct tx_radiotap_hdr { 5 - struct ieee80211_radiotap_header hdr; 5 + struct ieee80211_radiotap_header_fixed hdr; 6 6 u8 rate; 7 7 u8 txpower; 8 8 u8 rts_retries; ··· 31 31 #define IEEE80211_FC_DSTODS 0x0300 32 32 33 33 struct rx_radiotap_hdr { 34 - struct ieee80211_radiotap_header hdr; 34 + struct ieee80211_radiotap_header_fixed hdr; 35 35 u8 flags; 36 36 u8 rate; 37 37 u8 antsignal;
+5 -2
drivers/net/wireless/mediatek/mt76/mcu.c
··· 84 84 mutex_lock(&dev->mcu.mutex); 85 85 86 86 if (dev->mcu_ops->mcu_skb_prepare_msg) { 87 + orig_skb = skb; 87 88 ret = dev->mcu_ops->mcu_skb_prepare_msg(dev, skb, cmd, &seq); 88 89 if (ret < 0) 89 90 goto out; 90 91 } 91 92 92 93 retry: 93 - orig_skb = skb_get(skb); 94 + /* orig skb might be needed for retry, mcu_skb_send_msg consumes it */ 95 + if (orig_skb) 96 + skb_get(orig_skb); 94 97 ret = dev->mcu_ops->mcu_skb_send_msg(dev, skb, cmd, &seq); 95 98 if (ret < 0) 96 99 goto out; ··· 108 105 do { 109 106 skb = mt76_mcu_get_response(dev, expires); 110 107 if (!skb && !test_bit(MT76_MCU_RESET, &dev->phy.state) && 111 - retry++ < dev->mcu_ops->max_retry) { 108 + orig_skb && retry++ < dev->mcu_ops->max_retry) { 112 109 dev_err(dev->dev, "Retry message %08x (seq %d)\n", 113 110 cmd, seq); 114 111 skb = orig_skb;
+2 -2
drivers/net/wireless/microchip/wilc1000/mon.c
··· 7 7 #include "cfg80211.h" 8 8 9 9 struct wilc_wfi_radiotap_hdr { 10 - struct ieee80211_radiotap_header hdr; 10 + struct ieee80211_radiotap_header_fixed hdr; 11 11 u8 rate; 12 12 } __packed; 13 13 14 14 struct wilc_wfi_radiotap_cb_hdr { 15 - struct ieee80211_radiotap_header hdr; 15 + struct ieee80211_radiotap_header_fixed hdr; 16 16 u8 rate; 17 17 u8 dump; 18 18 u16 tx_flags;
-1
drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c
··· 352 352 {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8194, rtl92du_hal_cfg)}, 353 353 {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8111, rtl92du_hal_cfg)}, 354 354 {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x0193, rtl92du_hal_cfg)}, 355 - {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8171, rtl92du_hal_cfg)}, 356 355 {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0xe194, rtl92du_hal_cfg)}, 357 356 {RTL_USB_DEVICE(0x2019, 0xab2c, rtl92du_hal_cfg)}, 358 357 {RTL_USB_DEVICE(0x2019, 0xab2d, rtl92du_hal_cfg)},
-1
drivers/net/wireless/realtek/rtw88/usb.c
··· 771 771 u8 size, timeout; 772 772 u16 val16; 773 773 774 - rtw_write32_set(rtwdev, REG_RXDMA_AGG_PG_TH, BIT_EN_PRE_CALC); 775 774 rtw_write8_set(rtwdev, REG_TXDMA_PQ_MAP, BIT_RXDMA_AGG_EN); 776 775 rtw_write8_clr(rtwdev, REG_RXDMA_AGG_PG_TH + 3, BIT(7)); 777 776
+2
drivers/net/wireless/realtek/rtw89/coex.c
··· 6445 6445 6446 6446 /* todo DBCC related event */ 6447 6447 rtw89_debug(rtwdev, RTW89_DBG_BTC, "[BTC] wl_info phy_now=%d\n", phy_now); 6448 + rtw89_debug(rtwdev, RTW89_DBG_BTC, 6449 + "[BTC] rlink cnt_2g=%d cnt_5g=%d\n", cnt_2g, cnt_5g); 6448 6450 6449 6451 if (wl_rinfo->dbcc_en != rtwdev->dbcc_en) { 6450 6452 wl_rinfo->dbcc_chg = 1;
+41 -7
drivers/net/wireless/realtek/rtw89/pci.c
··· 3026 3026 pci_disable_device(pdev); 3027 3027 } 3028 3028 3029 - static void rtw89_pci_cfg_dac(struct rtw89_dev *rtwdev) 3029 + static bool rtw89_pci_chip_is_manual_dac(struct rtw89_dev *rtwdev) 3030 3030 { 3031 - struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv; 3032 3031 const struct rtw89_chip_info *chip = rtwdev->chip; 3033 - 3034 - if (!rtwpci->enable_dac) 3035 - return; 3036 3032 3037 3033 switch (chip->chip_id) { 3038 3034 case RTL8852A: 3039 3035 case RTL8852B: 3040 3036 case RTL8851B: 3041 3037 case RTL8852BT: 3042 - break; 3038 + return true; 3043 3039 default: 3044 - return; 3040 + return false; 3045 3041 } 3042 + } 3043 + 3044 + static bool rtw89_pci_is_dac_compatible_bridge(struct rtw89_dev *rtwdev) 3045 + { 3046 + struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv; 3047 + struct pci_dev *bridge = pci_upstream_bridge(rtwpci->pdev); 3048 + 3049 + if (!rtw89_pci_chip_is_manual_dac(rtwdev)) 3050 + return true; 3051 + 3052 + if (!bridge) 3053 + return false; 3054 + 3055 + switch (bridge->vendor) { 3056 + case PCI_VENDOR_ID_INTEL: 3057 + return true; 3058 + case PCI_VENDOR_ID_ASMEDIA: 3059 + if (bridge->device == 0x2806) 3060 + return true; 3061 + break; 3062 + } 3063 + 3064 + return false; 3065 + } 3066 + 3067 + static void rtw89_pci_cfg_dac(struct rtw89_dev *rtwdev) 3068 + { 3069 + struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv; 3070 + 3071 + if (!rtwpci->enable_dac) 3072 + return; 3073 + 3074 + if (!rtw89_pci_chip_is_manual_dac(rtwdev)) 3075 + return; 3046 3076 3047 3077 rtw89_pci_config_byte_set(rtwdev, RTW89_PCIE_L1_CTRL, RTW89_PCIE_BIT_EN_64BITS); 3048 3078 } ··· 3091 3061 goto err; 3092 3062 } 3093 3063 3064 + if (!rtw89_pci_is_dac_compatible_bridge(rtwdev)) 3065 + goto no_dac; 3066 + 3094 3067 ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(36)); 3095 3068 if (!ret) { 3096 3069 rtwpci->enable_dac = true; ··· 3106 3073 goto err_release_regions; 3107 3074 } 3108 3075 } 3076 + no_dac: 3109 3077 3110 3078 resource_len = pci_resource_len(pdev, bar_id); 3111 3079 rtwpci->mmap = pci_iomap(pdev, bar_id, resource_len);
+2 -2
drivers/net/wireless/virtual/mac80211_hwsim.c
··· 763 763 }; 764 764 765 765 struct hwsim_radiotap_hdr { 766 - struct ieee80211_radiotap_header hdr; 766 + struct ieee80211_radiotap_header_fixed hdr; 767 767 __le64 rt_tsft; 768 768 u8 rt_flags; 769 769 u8 rt_rate; ··· 772 772 } __packed; 773 773 774 774 struct hwsim_radiotap_ack_hdr { 775 - struct ieee80211_radiotap_header hdr; 775 + struct ieee80211_radiotap_header_fixed hdr; 776 776 u8 rt_flags; 777 777 u8 pad; 778 778 __le16 rt_channel;
+44
include/net/cfg80211.h
··· 6130 6130 struct wiphy_delayed_work *dwork); 6131 6131 6132 6132 /** 6133 + * wiphy_delayed_work_pending - Find out whether a wiphy delayable 6134 + * work item is currently pending. 6135 + * 6136 + * @wiphy: the wiphy, for debug purposes 6137 + * @dwork: the delayed work in question 6138 + * 6139 + * Return: true if timer is pending, false otherwise 6140 + * 6141 + * How wiphy_delayed_work_queue() works is by setting a timer which 6142 + * when it expires calls wiphy_work_queue() to queue the wiphy work. 6143 + * Because wiphy_delayed_work_queue() uses mod_timer(), if it is 6144 + * called twice and the second call happens before the first call 6145 + * deadline, the work will rescheduled for the second deadline and 6146 + * won't run before that. 6147 + * 6148 + * wiphy_delayed_work_pending() can be used to detect if calling 6149 + * wiphy_work_delayed_work_queue() would start a new work schedule 6150 + * or delayed a previous one. As seen below it cannot be used to 6151 + * detect precisely if the work has finished to execute nor if it 6152 + * is currently executing. 6153 + * 6154 + * CPU0 CPU1 6155 + * wiphy_delayed_work_queue(wk) 6156 + * mod_timer(wk->timer) 6157 + * wiphy_delayed_work_pending(wk) -> true 6158 + * 6159 + * [...] 6160 + * expire_timers(wk->timer) 6161 + * detach_timer(wk->timer) 6162 + * wiphy_delayed_work_pending(wk) -> false 6163 + * wk->timer->function() | 6164 + * wiphy_work_queue(wk) | delayed work pending 6165 + * list_add_tail() | returns false but 6166 + * queue_work(cfg80211_wiphy_work) | wk->func() has not 6167 + * | been run yet 6168 + * [...] | 6169 + * cfg80211_wiphy_work() | 6170 + * wk->func() V 6171 + * 6172 + */ 6173 + bool wiphy_delayed_work_pending(struct wiphy *wiphy, 6174 + struct wiphy_delayed_work *dwork); 6175 + 6176 + /** 6133 6177 * enum ieee80211_ap_reg_power - regulatory power for an Access Point 6134 6178 * 6135 6179 * @IEEE80211_REG_UNSET_AP: Access Point has no regulatory power mode
+21 -16
include/net/ieee80211_radiotap.h
··· 24 24 * struct ieee80211_radiotap_header - base radiotap header 25 25 */ 26 26 struct ieee80211_radiotap_header { 27 - /** 28 - * @it_version: radiotap version, always 0 29 - */ 30 - uint8_t it_version; 27 + __struct_group(ieee80211_radiotap_header_fixed, hdr, __packed, 28 + /** 29 + * @it_version: radiotap version, always 0 30 + */ 31 + uint8_t it_version; 31 32 32 - /** 33 - * @it_pad: padding (or alignment) 34 - */ 35 - uint8_t it_pad; 33 + /** 34 + * @it_pad: padding (or alignment) 35 + */ 36 + uint8_t it_pad; 36 37 37 - /** 38 - * @it_len: overall radiotap header length 39 - */ 40 - __le16 it_len; 38 + /** 39 + * @it_len: overall radiotap header length 40 + */ 41 + __le16 it_len; 41 42 42 - /** 43 - * @it_present: (first) present word 44 - */ 45 - __le32 it_present; 43 + /** 44 + * @it_present: (first) present word 45 + */ 46 + __le32 it_present; 47 + ); 46 48 47 49 /** 48 50 * @it_optional: all remaining presence bitmaps 49 51 */ 50 52 __le32 it_optional[]; 51 53 } __packed; 54 + 55 + static_assert(offsetof(struct ieee80211_radiotap_header, it_optional) == sizeof(struct ieee80211_radiotap_header_fixed), 56 + "struct member likely outside of __struct_group()"); 52 57 53 58 /* version is always 0 */ 54 59 #define PKTHDR_RADIOTAP_VERSION 0
+1 -1
net/mac80211/Kconfig
··· 96 96 97 97 config MAC80211_MESSAGE_TRACING 98 98 bool "Trace all mac80211 debug messages" 99 - depends on MAC80211 99 + depends on MAC80211 && TRACING 100 100 help 101 101 Select this option to have mac80211 register the 102 102 mac80211_msg trace subsystem with tracepoints to
+16 -9
net/mac80211/cfg.c
··· 3046 3046 enum nl80211_tx_power_setting txp_type = type; 3047 3047 bool update_txp_type = false; 3048 3048 bool has_monitor = false; 3049 + int old_power = local->user_power_level; 3049 3050 3050 3051 lockdep_assert_wiphy(local->hw.wiphy); 3051 3052 ··· 3129 3128 } 3130 3129 } 3131 3130 3131 + if (local->emulate_chanctx && 3132 + (old_power != local->user_power_level)) 3133 + ieee80211_hw_conf_chan(local); 3134 + 3132 3135 return 0; 3133 3136 } 3134 3137 ··· 3143 3138 struct ieee80211_local *local = wiphy_priv(wiphy); 3144 3139 struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev); 3145 3140 3146 - if (local->ops->get_txpower) 3141 + if (local->ops->get_txpower && 3142 + (sdata->flags & IEEE80211_SDATA_IN_DRIVER)) 3147 3143 return drv_get_txpower(local, sdata, dbm); 3148 3144 3149 3145 if (local->emulate_chanctx) ··· 4832 4826 ieee80211_color_change_finalize(link); 4833 4827 } 4834 4828 4835 - void ieee80211_color_collision_detection_work(struct work_struct *work) 4829 + void ieee80211_color_collision_detection_work(struct wiphy *wiphy, 4830 + struct wiphy_work *work) 4836 4831 { 4837 - struct delayed_work *delayed_work = to_delayed_work(work); 4838 4832 struct ieee80211_link_data *link = 4839 - container_of(delayed_work, struct ieee80211_link_data, 4840 - color_collision_detect_work); 4833 + container_of(work, struct ieee80211_link_data, 4834 + color_collision_detect_work.work); 4841 4835 struct ieee80211_sub_if_data *sdata = link->sdata; 4842 4836 4843 4837 cfg80211_obss_color_collision_notify(sdata->dev, link->color_bitmap, ··· 4890 4884 return; 4891 4885 } 4892 4886 4893 - if (delayed_work_pending(&link->color_collision_detect_work)) { 4887 + if (wiphy_delayed_work_pending(sdata->local->hw.wiphy, 4888 + &link->color_collision_detect_work)) { 4894 4889 rcu_read_unlock(); 4895 4890 return; 4896 4891 } ··· 4900 4893 /* queue the color collision detection event every 500 ms in order to 4901 4894 * avoid sending too much netlink messages to userspace. 4902 4895 */ 4903 - ieee80211_queue_delayed_work(&sdata->local->hw, 4904 - &link->color_collision_detect_work, 4905 - msecs_to_jiffies(500)); 4896 + wiphy_delayed_work_queue(sdata->local->hw.wiphy, 4897 + &link->color_collision_detect_work, 4898 + msecs_to_jiffies(500)); 4906 4899 4907 4900 rcu_read_unlock(); 4908 4901 }
+3 -2
net/mac80211/ieee80211_i.h
··· 1053 1053 } csa; 1054 1054 1055 1055 struct wiphy_work color_change_finalize_work; 1056 - struct delayed_work color_collision_detect_work; 1056 + struct wiphy_delayed_work color_collision_detect_work; 1057 1057 u64 color_bitmap; 1058 1058 1059 1059 /* context reservation -- protected with wiphy mutex */ ··· 2005 2005 /* color change handling */ 2006 2006 void ieee80211_color_change_finalize_work(struct wiphy *wiphy, 2007 2007 struct wiphy_work *work); 2008 - void ieee80211_color_collision_detection_work(struct work_struct *work); 2008 + void ieee80211_color_collision_detection_work(struct wiphy *wiphy, 2009 + struct wiphy_work *work); 2009 2010 2010 2011 /* interface handling */ 2011 2012 #define MAC80211_SUPPORTED_FEATURES_TX (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
+25 -17
net/mac80211/key.c
··· 987 987 } 988 988 } 989 989 990 + static void 991 + ieee80211_key_iter(struct ieee80211_hw *hw, 992 + struct ieee80211_vif *vif, 993 + struct ieee80211_key *key, 994 + void (*iter)(struct ieee80211_hw *hw, 995 + struct ieee80211_vif *vif, 996 + struct ieee80211_sta *sta, 997 + struct ieee80211_key_conf *key, 998 + void *data), 999 + void *iter_data) 1000 + { 1001 + /* skip keys of station in removal process */ 1002 + if (key->sta && key->sta->removed) 1003 + return; 1004 + if (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) 1005 + return; 1006 + iter(hw, vif, key->sta ? &key->sta->sta : NULL, 1007 + &key->conf, iter_data); 1008 + } 1009 + 990 1010 void ieee80211_iter_keys(struct ieee80211_hw *hw, 991 1011 struct ieee80211_vif *vif, 992 1012 void (*iter)(struct ieee80211_hw *hw, ··· 1025 1005 if (vif) { 1026 1006 sdata = vif_to_sdata(vif); 1027 1007 list_for_each_entry_safe(key, tmp, &sdata->key_list, list) 1028 - iter(hw, &sdata->vif, 1029 - key->sta ? &key->sta->sta : NULL, 1030 - &key->conf, iter_data); 1008 + ieee80211_key_iter(hw, vif, key, iter, iter_data); 1031 1009 } else { 1032 1010 list_for_each_entry(sdata, &local->interfaces, list) 1033 1011 list_for_each_entry_safe(key, tmp, 1034 1012 &sdata->key_list, list) 1035 - iter(hw, &sdata->vif, 1036 - key->sta ? &key->sta->sta : NULL, 1037 - &key->conf, iter_data); 1013 + ieee80211_key_iter(hw, &sdata->vif, key, 1014 + iter, iter_data); 1038 1015 } 1039 1016 } 1040 1017 EXPORT_SYMBOL(ieee80211_iter_keys); ··· 1048 1031 { 1049 1032 struct ieee80211_key *key; 1050 1033 1051 - list_for_each_entry_rcu(key, &sdata->key_list, list) { 1052 - /* skip keys of station in removal process */ 1053 - if (key->sta && key->sta->removed) 1054 - continue; 1055 - if (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) 1056 - continue; 1057 - 1058 - iter(hw, &sdata->vif, 1059 - key->sta ? &key->sta->sta : NULL, 1060 - &key->conf, iter_data); 1061 - } 1034 + list_for_each_entry_rcu(key, &sdata->key_list, list) 1035 + ieee80211_key_iter(hw, &sdata->vif, key, iter, iter_data); 1062 1036 } 1063 1037 1064 1038 void ieee80211_iter_keys_rcu(struct ieee80211_hw *hw,
+4 -3
net/mac80211/link.c
··· 41 41 ieee80211_csa_finalize_work); 42 42 wiphy_work_init(&link->color_change_finalize_work, 43 43 ieee80211_color_change_finalize_work); 44 - INIT_DELAYED_WORK(&link->color_collision_detect_work, 45 - ieee80211_color_collision_detection_work); 44 + wiphy_delayed_work_init(&link->color_collision_detect_work, 45 + ieee80211_color_collision_detection_work); 46 46 INIT_LIST_HEAD(&link->assigned_chanctx_list); 47 47 INIT_LIST_HEAD(&link->reserved_chanctx_list); 48 48 wiphy_delayed_work_init(&link->dfs_cac_timer_work, ··· 72 72 if (link->sdata->vif.type == NL80211_IFTYPE_STATION) 73 73 ieee80211_mgd_stop_link(link); 74 74 75 - cancel_delayed_work_sync(&link->color_collision_detect_work); 75 + wiphy_delayed_work_cancel(link->sdata->local->hw.wiphy, 76 + &link->color_collision_detect_work); 76 77 wiphy_work_cancel(link->sdata->local->hw.wiphy, 77 78 &link->color_change_finalize_work); 78 79 wiphy_work_cancel(link->sdata->local->hw.wiphy,
+7
net/wireless/core.c
··· 1704 1704 } 1705 1705 EXPORT_SYMBOL_GPL(wiphy_delayed_work_flush); 1706 1706 1707 + bool wiphy_delayed_work_pending(struct wiphy *wiphy, 1708 + struct wiphy_delayed_work *dwork) 1709 + { 1710 + return timer_pending(&dwork->timer); 1711 + } 1712 + EXPORT_SYMBOL_GPL(wiphy_delayed_work_pending); 1713 + 1707 1714 static int __init cfg80211_init(void) 1708 1715 { 1709 1716 int err;
+4
net/wireless/scan.c
··· 3050 3050 freq = ieee80211_channel_to_freq_khz(ap_info->channel, band); 3051 3051 data.channel = ieee80211_get_channel_khz(wiphy, freq); 3052 3052 3053 + /* Skip if RNR element specifies an unsupported channel */ 3054 + if (!data.channel) 3055 + continue; 3056 + 3053 3057 /* Skip if BSS entry generated from MBSSID or DIRECT source 3054 3058 * frame data available already. 3055 3059 */