1. 25 Aug, 2023 3 commits
  2. 24 Aug, 2023 1 commit
  3. 23 Aug, 2023 13 commits
  4. 22 Aug, 2023 23 commits
    • Jeff Johnson's avatar
      wifi: Fix ieee80211.h kernel-doc issues · 9e261e6d
      Jeff Johnson authored
      The kernel-doc script identified multiple issues in ieee80211.h, so
      fix them. In the process update some references to the latest
      applicable specification.
      
      include/linux/ieee80211.h:848: warning: Function parameter or member 'count' not described in 'ieee80211_quiet_ie'
      include/linux/ieee80211.h:848: warning: Function parameter or member 'period' not described in 'ieee80211_quiet_ie'
      include/linux/ieee80211.h:848: warning: Function parameter or member 'duration' not described in 'ieee80211_quiet_ie'
      include/linux/ieee80211.h:848: warning: Function parameter or member 'offset' not described in 'ieee80211_quiet_ie'
      include/linux/ieee80211.h:860: warning: Function parameter or member 'token' not described in 'ieee80211_msrment_ie'
      include/linux/ieee80211.h:860: warning: Function parameter or member 'mode' not described in 'ieee80211_msrment_ie'
      include/linux/ieee80211.h:860: warning: Function parameter or member 'type' not described in 'ieee80211_msrment_ie'
      include/linux/ieee80211.h:860: warning: Function parameter or member 'request' not described in 'ieee80211_msrment_ie'
      include/linux/ieee80211.h:871: warning: Function parameter or member 'mode' not described in 'ieee80211_channel_sw_ie'
      include/linux/ieee80211.h:871: warning: Function parameter or member 'new_ch_num' not described in 'ieee80211_channel_sw_ie'
      include/linux/ieee80211.h:871: warning: Function parameter or member 'count' not described in 'ieee80211_channel_sw_ie'
      include/linux/ieee80211.h:883: warning: Function parameter or member 'mode' not described in 'ieee80211_ext_chansw_ie'
      include/linux/ieee80211.h:883: warning: Function parameter or member 'new_operating_class' not described in 'ieee80211_ext_chansw_ie'
      include/linux/ieee80211.h:883: warning: Function parameter or member 'new_ch_num' not described in 'ieee80211_ext_chansw_ie'
      include/linux/ieee80211.h:883: warning: Function parameter or member 'count' not described in 'ieee80211_ext_chansw_ie'
      include/linux/ieee80211.h:905: warning: Function parameter or member 'mesh_ttl' not described in 'ieee80211_mesh_chansw_params_ie'
      include/linux/ieee80211.h:905: warning: Function parameter or member 'mesh_flags' not described in 'ieee80211_mesh_chansw_params_ie'
      include/linux/ieee80211.h:905: warning: Function parameter or member 'mesh_reason' not described in 'ieee80211_mesh_chansw_params_ie'
      include/linux/ieee80211.h:905: warning: Function parameter or member 'mesh_pre_value' not described in 'ieee80211_mesh_chansw_params_ie'
      include/linux/ieee80211.h:913: warning: Function parameter or member 'new_channel_width' not described in 'ieee80211_wide_bw_chansw_ie'
      include/linux/ieee80211.h:913: warning: Function parameter or member 'new_center_freq_seg0' not described in 'ieee80211_wide_bw_chansw_ie'
      include/linux/ieee80211.h:913: warning: Function parameter or member 'new_center_freq_seg1' not described in 'ieee80211_wide_bw_chansw_ie'
      include/linux/ieee80211.h:926: warning: expecting prototype for struct ieee80211_tim. Prototype was for struct ieee80211_tim_ie instead
      include/linux/ieee80211.h:941: warning: Function parameter or member 'meshconf_psel' not described in 'ieee80211_meshconf_ie'
      include/linux/ieee80211.h:941: warning: Function parameter or member 'meshconf_pmetric' not described in 'ieee80211_meshconf_ie'
      include/linux/ieee80211.h:941: warning: Function parameter or member 'meshconf_congest' not described in 'ieee80211_meshconf_ie'
      include/linux/ieee80211.h:941: warning: Function parameter or member 'meshconf_synch' not described in 'ieee80211_meshconf_ie'
      include/linux/ieee80211.h:941: warning: Function parameter or member 'meshconf_auth' not described in 'ieee80211_meshconf_ie'
      include/linux/ieee80211.h:941: warning: Function parameter or member 'meshconf_form' not described in 'ieee80211_meshconf_ie'
      include/linux/ieee80211.h:941: warning: Function parameter or member 'meshconf_cap' not described in 'ieee80211_meshconf_ie'
      include/linux/ieee80211.h:964: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
       * mesh channel switch parameters element's flag indicator
      include/linux/ieee80211.h:984: warning: Function parameter or member 'rann_flags' not described in 'ieee80211_rann_ie'
      include/linux/ieee80211.h:984: warning: Function parameter or member 'rann_hopcount' not described in 'ieee80211_rann_ie'
      include/linux/ieee80211.h:984: warning: Function parameter or member 'rann_ttl' not described in 'ieee80211_rann_ie'
      include/linux/ieee80211.h:984: warning: Function parameter or member 'rann_addr' not described in 'ieee80211_rann_ie'
      include/linux/ieee80211.h:984: warning: Function parameter or member 'rann_seq' not described in 'ieee80211_rann_ie'
      include/linux/ieee80211.h:984: warning: Function parameter or member 'rann_interval' not described in 'ieee80211_rann_ie'
      include/linux/ieee80211.h:984: warning: Function parameter or member 'rann_metric' not described in 'ieee80211_rann_ie'
      include/linux/ieee80211.h:1019: warning: expecting prototype for enum ieee80211_opmode_bits. Prototype was for enum ieee80211_vht_opmode_bits instead
      include/linux/ieee80211.h:1052: warning: Function parameter or member 'tx_power' not described in 'ieee80211_tpc_report_ie'
      include/linux/ieee80211.h:1052: warning: Function parameter or member 'link_margin' not described in 'ieee80211_tpc_report_ie'
      include/linux/ieee80211.h:1073: warning: Function parameter or member 'compat_info' not described in 'ieee80211_s1g_bcn_compat_ie'
      include/linux/ieee80211.h:1073: warning: Function parameter or member 'beacon_int' not described in 'ieee80211_s1g_bcn_compat_ie'
      include/linux/ieee80211.h:1073: warning: Function parameter or member 'tsf_completion' not described in 'ieee80211_s1g_bcn_compat_ie'
      include/linux/ieee80211.h:1086: warning: Function parameter or member 'ch_width' not described in 'ieee80211_s1g_oper_ie'
      include/linux/ieee80211.h:1086: warning: Function parameter or member 'oper_class' not described in 'ieee80211_s1g_oper_ie'
      include/linux/ieee80211.h:1086: warning: Function parameter or member 'primary_ch' not described in 'ieee80211_s1g_oper_ie'
      include/linux/ieee80211.h:1086: warning: Function parameter or member 'oper_ch' not described in 'ieee80211_s1g_oper_ie'
      include/linux/ieee80211.h:1086: warning: Function parameter or member 'basic_mcs_nss' not described in 'ieee80211_s1g_oper_ie'
      include/linux/ieee80211.h:1097: warning: Function parameter or member 'aid' not described in 'ieee80211_aid_response_ie'
      include/linux/ieee80211.h:1097: warning: Function parameter or member 'switch_count' not described in 'ieee80211_aid_response_ie'
      include/linux/ieee80211.h:1097: warning: Function parameter or member 'response_int' not described in 'ieee80211_aid_response_ie'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_STATUS' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_MINOR_REASON' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_CAPABILITY' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_DEVICE_ID' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_GO_INTENT' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_GO_CONFIG_TIMEOUT' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_LISTEN_CHANNEL' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_GROUP_BSSID' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_EXT_LISTEN_TIMING' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_INTENDED_IFACE_ADDR' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_MANAGABILITY' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_CHANNEL_LIST' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_ABSENCE_NOTICE' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_DEVICE_INFO' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_GROUP_INFO' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_GROUP_ID' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_INTERFACE' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_OPER_CHANNEL' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_INVITE_FLAGS' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_VENDOR_SPECIFIC' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1519: warning: Enum value 'IEEE80211_P2P_ATTR_MAX' not described in enum 'ieee80211_p2p_attr_id'
      include/linux/ieee80211.h:1554: warning: Function parameter or member 'frame_control' not described in 'ieee80211_bar'
      include/linux/ieee80211.h:1554: warning: Function parameter or member 'duration' not described in 'ieee80211_bar'
      include/linux/ieee80211.h:1554: warning: Function parameter or member 'ra' not described in 'ieee80211_bar'
      include/linux/ieee80211.h:1554: warning: Function parameter or member 'ta' not described in 'ieee80211_bar'
      include/linux/ieee80211.h:1554: warning: Function parameter or member 'control' not described in 'ieee80211_bar'
      include/linux/ieee80211.h:1554: warning: Function parameter or member 'start_seq_num' not described in 'ieee80211_bar'
      include/linux/ieee80211.h:1579: warning: Function parameter or member 'reserved' not described in 'ieee80211_mcs_info'
      include/linux/ieee80211.h:1618: warning: Function parameter or member 'cap_info' not described in 'ieee80211_ht_cap'
      include/linux/ieee80211.h:1618: warning: Function parameter or member 'ampdu_params_info' not described in 'ieee80211_ht_cap'
      include/linux/ieee80211.h:1618: warning: Function parameter or member 'mcs' not described in 'ieee80211_ht_cap'
      include/linux/ieee80211.h:1618: warning: Function parameter or member 'extended_ht_cap_info' not described in 'ieee80211_ht_cap'
      include/linux/ieee80211.h:1618: warning: Function parameter or member 'tx_BF_cap_info' not described in 'ieee80211_ht_cap'
      include/linux/ieee80211.h:1618: warning: Function parameter or member 'antenna_selection_info' not described in 'ieee80211_ht_cap'
      include/linux/ieee80211.h:1704: warning: Function parameter or member 'primary_chan' not described in 'ieee80211_ht_operation'
      include/linux/ieee80211.h:1704: warning: Function parameter or member 'ht_param' not described in 'ieee80211_ht_operation'
      include/linux/ieee80211.h:1704: warning: Function parameter or member 'operation_mode' not described in 'ieee80211_ht_operation'
      include/linux/ieee80211.h:1704: warning: Function parameter or member 'stbc_param' not described in 'ieee80211_ht_operation'
      include/linux/ieee80211.h:1704: warning: Function parameter or member 'basic_set' not described in 'ieee80211_ht_operation'
      include/linux/ieee80211.h:1872: warning: Function parameter or member 'mac_cap_info' not described in 'ieee80211_he_cap_elem'
      include/linux/ieee80211.h:1872: warning: Function parameter or member 'phy_cap_info' not described in 'ieee80211_he_cap_elem'
      include/linux/ieee80211.h:1936: warning: Function parameter or member 'he_oper_params' not described in 'ieee80211_he_operation'
      include/linux/ieee80211.h:1936: warning: Function parameter or member 'he_mcs_nss_set' not described in 'ieee80211_he_operation'
      include/linux/ieee80211.h:1936: warning: Function parameter or member 'optional' not described in 'ieee80211_he_operation'
      include/linux/ieee80211.h:1948: warning: Function parameter or member 'he_sr_control' not described in 'ieee80211_he_spr'
      include/linux/ieee80211.h:1948: warning: Function parameter or member 'optional' not described in 'ieee80211_he_spr'
      include/linux/ieee80211.h:1960: warning: Function parameter or member 'aifsn' not described in 'ieee80211_he_mu_edca_param_ac_rec'
      include/linux/ieee80211.h:1960: warning: Function parameter or member 'ecw_min_max' not described in 'ieee80211_he_mu_edca_param_ac_rec'
      include/linux/ieee80211.h:1960: warning: Function parameter or member 'mu_edca_timer' not described in 'ieee80211_he_mu_edca_param_ac_rec'
      include/linux/ieee80211.h:1974: warning: Function parameter or member 'mu_qos_info' not described in 'ieee80211_mu_edca_param_set'
      include/linux/ieee80211.h:1974: warning: Function parameter or member 'ac_be' not described in 'ieee80211_mu_edca_param_set'
      include/linux/ieee80211.h:1974: warning: Function parameter or member 'ac_bk' not described in 'ieee80211_mu_edca_param_set'
      include/linux/ieee80211.h:1974: warning: Function parameter or member 'ac_vi' not described in 'ieee80211_mu_edca_param_set'
      include/linux/ieee80211.h:1974: warning: Function parameter or member 'ac_vo' not described in 'ieee80211_mu_edca_param_set'
      include/linux/ieee80211.h:2194: warning: Enum value 'IEEE80211_REG_LPI_AP' not described in enum 'ieee80211_ap_reg_power'
      include/linux/ieee80211.h:2194: warning: Enum value 'IEEE80211_REG_SP_AP' not described in enum 'ieee80211_ap_reg_power'
      include/linux/ieee80211.h:2194: warning: Enum value 'IEEE80211_REG_VLP_AP' not described in enum 'ieee80211_ap_reg_power'
      include/linux/ieee80211.h:2194: warning: Excess enum value 'IEEE80211_REG_SP' description in 'ieee80211_ap_reg_power'
      include/linux/ieee80211.h:2194: warning: Excess enum value 'IEEE80211_REG_VLP' description in 'ieee80211_ap_reg_power'
      include/linux/ieee80211.h:2194: warning: Excess enum value 'IEEE80211_REG_LPI' description in 'ieee80211_ap_reg_power'
      include/linux/ieee80211.h:2577: warning: cannot understand function prototype: 'struct ieee80211_he_6ghz_oper '
      include/linux/ieee80211.h:2624: warning: Function parameter or member 'tx_power_info' not described in 'ieee80211_tx_pwr_env'
      include/linux/ieee80211.h:2624: warning: Function parameter or member 'tx_power' not described in 'ieee80211_tx_pwr_env'
      include/linux/ieee80211.h:4485: warning: expecting prototype for RSNX Capabilities(). Prototype was for WLAN_RSNX_CAPA_PROTECTED_TWT() instead
      include/linux/ieee80211.h:4734: warning: expecting prototype for ieee80211_mle_get_eml_sync_delay(). Prototype was for ieee80211_mle_get_eml_med_sync_delay() instead
      117 warnings as Errors
      Signed-off-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
      Link: https://lore.kernel.org/r/20230822-kerneldoc-v1-1-0d42ce5029bf@quicinc.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      9e261e6d
    • Johannes Berg's avatar
      Revert "wifi: mac80211_hwsim: check the return value of nla_put_u32" · 1b78dd34
      Johannes Berg authored
      This reverts commit b970ac68 ("wifi: mac80211_hwsim: check the
      return value of nla_put_u32") since it introduced a memory leak in
      the error path, which seems worse than sending an incomplete skb,
      and the put can't fail anyway since the SKB was just allocated.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      1b78dd34
    • Arnd Bergmann's avatar
      mac80211: make ieee80211_tx_info padding explicit · a7a2ef0c
      Arnd Bergmann authored
      While looking at a bug, I got rather confused by the layout of the
      'status' field in ieee80211_tx_info. Apparently, the intention is that
      status_driver_data[] is used for driver specific data, and fills up the
      size of the union to 40 bytes, just like the other ones.
      
      This is indeed what actually happens, but only because of the
      combination of two mistakes:
      
       - "void *status_driver_data[18 / sizeof(void *)];" is intended
         to be 18 bytes long but is actually two bytes shorter because of
         rounding-down in the division, to a multiple of the pointer
         size (4 bytes or 8 bytes).
      
       - The other fields combined are intended to be 22 bytes long, but
         are actually 24 bytes because of padding in front of the
         unaligned tx_time member, and in front of the pointer array.
      
      The two mistakes cancel out. so the size ends up fine, but it seems
      more helpful to make this explicit, by having a multiple of 8 bytes
      in the size calculation and explicitly describing the padding.
      
      Fixes: ea5907db ("mac80211: fix struct ieee80211_tx_info size")
      Fixes: 02219b3a ("mac80211: add WMM admission control support")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Link: https://lore.kernel.org/r/20230623152443.2296825-2-arnd@kernel.orgSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      a7a2ef0c
    • Randy Dunlap's avatar
      wifi: mac80211: fix kernel-doc notation warning · c6662a4b
      Randy Dunlap authored
      Add description for struct member 'agg' to prevent a kernel-doc
      warning.
      
      mac80211.h:2289: warning: Function parameter or member 'agg' not described in 'ieee80211_link_sta'
      
      Fixes: 4c51541d ("wifi: mac80211: keep A-MSDU data in sta and per-link")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Benjamin Berg <benjamin.berg@intel.com>
      Cc: linux-wireless@vger.kernel.org
      Link: https://lore.kernel.org/r/20230710230312.31197-10-rdunlap@infradead.org
      [reword the kernel-doc comment]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      c6662a4b
    • Randy Dunlap's avatar
      wifi: radiotap: fix kernel-doc notation warnings · 266a5cd7
      Randy Dunlap authored
      Fix a typo (82011 -> 80211) to prevent a kernel-doc warning.
      Add one missing function parameter description to prevent a
      kernel-doc warning.
      
      ieee80211_radiotap.h:52: warning: expecting prototype for struct ieee82011_radiotap_header. Prototype was for struct ieee80211_radiotap_header instead
      ieee80211_radiotap.h:581: warning: Function parameter or member 'data' not described in 'ieee80211_get_radiotap_len'
      
      Fixes: 42f82e2e ("wireless: radiotap: rewrite the radiotap header file")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: linux-wireless@vger.kernel.org
      Link: https://lore.kernel.org/r/20230710230312.31197-7-rdunlap@infradead.orgSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      266a5cd7
    • Randy Dunlap's avatar
      wifi: cfg80211: remove dead/unused enum value · a49a0d4e
      Randy Dunlap authored
      Drop an unused (extra) enum value to prevent a kernel-doc warning.
      
      cfg80211.h:1492: warning: Excess enum value 'STATION_PARAM_APPLY_STA_TXPOWER' description in 'station_parameters_apply_mask'
      
      Fixes: 2d8b08fe ("wifi: cfg80211: fix kernel-doc warnings all over the file")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Link: https://lore.kernel.org/r/20230710230312.31197-3-rdunlap@infradead.orgSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      a49a0d4e
    • Dmitry Antipov's avatar
      wifi: cfg80211: improve documentation for flag fields · 1dcf396b
      Dmitry Antipov authored
      Fix and hopefully improve documentation for 'flag' fields of
      a few types by adding references to relevant enumerations.
      Signed-off-by: default avatarDmitry Antipov <dmantipov@yandex.ru>
      Link: https://lore.kernel.org/r/20230713132957.275859-1-dmantipov@yandex.ruSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      1dcf396b
    • Yue Haibing's avatar
      wifi: nl80211: Remove unused declaration nl80211_pmsr_dump_results() · 9265f78b
      Yue Haibing authored
      nl80211_pmsr_dump_results() is never implemented since it was added in
      commit 9bb7e0f2 ("cfg80211: add peer measurement with FTM initiator
      API").
      Signed-off-by: default avatarYue Haibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/20230729121651.36836-1-yuehaibing@huawei.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      9265f78b
    • Yue Haibing's avatar
      wifi: mac80211: mesh: Remove unused function declaration mesh_ids_set_default() · a3d9c4f7
      Yue Haibing authored
      Commit ccf80ddf ("mac80211: mesh function and data structures
      definitions") introducted this but never implemented it.
      Signed-off-by: default avatarYue Haibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/20230731140712.1204-1-yuehaibing@huawei.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      a3d9c4f7
    • Yue Haibing's avatar
      wifi: mac80211: Remove unused function declarations · f14cef00
      Yue Haibing authored
      Commit 68542962 ("mac80211: Fix circular locking dependency in
      ARP filter handling") left the ieee80211_set_arp_filter() declaration
      unused.
      And commit 164eb02d ("mac80211: add radar detection command/event")
      introducted ieee80211_dfs_cac_timer() declaration but never implemented
      it.
      Signed-off-by: default avatarYue Haibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/20230801134337.24452-1-yuehaibing@huawei.com
      [reword commit message]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      f14cef00
    • Yue Haibing's avatar
      wifi: wext: Remove unused declaration dev_get_wireless_info() · 7bdfda42
      Yue Haibing authored
      Commit 55682965 ("[NL80211]: add netlink interface to cfg80211")
      declared but never implemented this, remove it.
      Commit 11433ee4 ("[WEXT]: Move to net/wireless") rename net/core/wireless.c
      to net/wireless/wext.c, then commit 3d23e349 ("wext: refactor") refactor
      wext.c to wext-core.c, fix the wext comment.
      Signed-off-by: default avatarYue Haibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/20230807145032.44768-1-yuehaibing@huawei.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      7bdfda42
    • Lin Ma's avatar
      wifi: nl80211/cfg80211: add forgotten nla_policy for BSS color attribute · 218d690c
      Lin Ma authored
      The previous commit dd3e4fc7 ("nl80211/cfg80211: add BSS color to
      NDP ranging parameters") adds a parameter for NDP ranging by introducing
      a new attribute type named NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR.
      
      However, the author forgot to also describe the nla_policy at
      nl80211_pmsr_ftm_req_attr_policy (net/wireless/nl80211.c). Just
      complement it to avoid malformed attribute that causes out-of-attribute
      access.
      
      Fixes: dd3e4fc7 ("nl80211/cfg80211: add BSS color to NDP ranging parameters")
      Signed-off-by: default avatarLin Ma <linma@zju.edu.cn>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/20230809033151.768910-1-linma@zju.edu.cnSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      218d690c
    • EN-WEI WU's avatar
      wifi: mac80211_hwsim: avoid calling nlmsg_free() in IRQ or IRQ disabled · d40de0ad
      EN-WEI WU authored
      The nlmsg_free() ends up calling kfree_skb(), and kfree_skb() is not allowed to be called
      from hardware interrupt context or with hardware interrupts being disabled. Replace the
      mistaken usage of nlmsg_free() by dev_kfree_skb_irq(), which is safe in both cases.
      Signed-off-by: default avatarEN-WEI WU <enweiwu@FreeBSD.org>
      Link: https://lore.kernel.org/r/20230815095427.13589-1-enweiwu@FreeBSD.orgSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      d40de0ad
    • Johannes Berg's avatar
      wifi: mac80211: fix puncturing bitmap handling in CSA · 92752117
      Johannes Berg authored
      Code inspection reveals that we switch the puncturing bitmap
      before the real channel switch, since that happens only in
      the second round of the worker after the channel context is
      switched by ieee80211_link_use_reserved_context().
      
      Fixes: 2cc25e4b ("wifi: mac80211: configure puncturing bitmap")
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      92752117
    • Johannes Berg's avatar
      wifi: mac80211_hwsim: drop short frames · fba360a0
      Johannes Berg authored
      While technically some control frames like ACK are shorter and
      end after Address 1, such frames shouldn't be forwarded through
      wmediumd or similar userspace, so require the full 3-address
      header to avoid accessing invalid memory if shorter frames are
      passed in.
      
      Reported-by: syzbot+b2645b5bf1512b81fa22@syzkaller.appspotmail.com
      Reviewed-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      fba360a0
    • Johannes Berg's avatar
      wifi: mac80211: check for station first in client probe · 67dfa589
      Johannes Berg authored
      When probing a client, first check if we have it, and then
      check for the channel context, otherwise you can trigger
      the warning there easily by probing when the AP isn't even
      started yet. Since a client existing means the AP is also
      operating, we can then keep the warning.
      
      Also simplify the moved code a bit.
      
      Reported-by: syzbot+999fac712d84878a7379@syzkaller.appspotmail.com
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      67dfa589
    • Johannes Berg's avatar
      wifi: cfg80211: ocb: don't leave if not joined · abc76cf5
      Johannes Berg authored
      If there's no OCB state, don't ask the driver/mac80211 to
      leave, since that's just confusing. Since set/clear the
      chandef state, that's a simple check.
      
      Reported-by: syzbot+09d1cd2f71e6dd3bfd2c@syzkaller.appspotmail.com
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      abc76cf5
    • Johannes Berg's avatar
      wifi: cfg80211: reject auth/assoc to AP with our address · 5d4e04bf
      Johannes Berg authored
      If the AP uses our own address as its MLD address or BSSID, then
      clearly something's wrong. Reject such connections so we don't
      try and fail later.
      
      Reported-by: syzbot+2676771ed06a6df166ad@syzkaller.appspotmail.com
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      5d4e04bf
    • Johannes Berg's avatar
      wifi: mac80211: check S1G action frame size · 19e4a47e
      Johannes Berg authored
      Before checking the action code, check that it even
      exists in the frame.
      
      Reported-by: syzbot+be9c824e6f269d608288@syzkaller.appspotmail.com
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      19e4a47e
    • Avraham Stern's avatar
      wifi: iwlmei: don't send nic info with invalid mac address · 6d2c360b
      Avraham Stern authored
      In case the SAP connection is established before the interface is
      added, the mac address is still not set. Don't send the nic info
      SAP message in this case since it will result in sending an invalid
      mac address. The nic info message will be sent with a valid mac
      address when the interface is added.
      Signed-off-by: default avatarAvraham Stern <avraham.stern@intel.com>
      Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
      Link: https://lore.kernel.org/r/20230822103048.a49436bed387.I0ca88d72456e6e9f939bbc2e0c52ffb173fbc97e@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      6d2c360b
    • Avraham Stern's avatar
      wifi: iwlmei: send driver down SAP message only if wiamt is enabled · a7d9ac48
      Avraham Stern authored
      When wiamt is disabled the driver up SAP message is not sent, so
      there is no need to send the driver down message as well.
      Signed-off-by: default avatarAvraham Stern <avraham.stern@intel.com>
      Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
      Link: https://lore.kernel.org/r/20230822103048.100f41b84656.I583d3e18ea65793f53aa710af13e47f8af82b53d@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      a7d9ac48
    • Avraham Stern's avatar
      wifi: iwlmei: send HOST_GOES_DOWN message even if wiamt is disabled · 3243aee1
      Avraham Stern authored
      The HOST_GOES_DOWN message should be sent even if wiamt is disabled.
      Otherwise wiamt may still use the shared memory (e.g. if enabled
      later) while it's no longer valid.
      Signed-off-by: default avatarAvraham Stern <avraham.stern@intel.com>
      Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
      Link: https://lore.kernel.org/r/20230822103048.2baad50eb1c3.If7b7c1dc2d6bfc6bacf7f6c72972f19714d9d973@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      3243aee1
    • Avraham Stern's avatar