mbox series

[v2,0/2] wifi: ath11k: fix layout of scan_flags in struct scan_req_params

Message ID 20240209113536.266822-1-nico.escande@gmail.com
Headers show
Series wifi: ath11k: fix layout of scan_flags in struct scan_req_params | expand

Message

Nicolas Escande Feb. 9, 2024, 11:35 a.m. UTC
As previously discussed in [1] we have a mismatch in struct scan_req_params
between the bitfield scan_f_xxx & the scan_flags when used with WMI_SCAN_XXX
values.

To fix the issue & prevent it from happenning again lets stop using & remove
scan_flags altogether in the driver and only use the bitfield instead. That way
even if the bitfield doesn't match the WMI_SCAN_XXX flags, the right value will
still be sent through the wmi command to the firmware (see
ath11k_wmi_copy_scan_event_cntrl_flags).

Questions:
  - In the same rationale shouldn't we remove scan_events from the same struct ?
  - The same goes for ath12k, should I send a seperate patch or respin a v3 with
    similar patches for ath12k ?

[1] https://lore.kernel.org/all/20231127180559.1696041-1-nico.escande@gmail.com/

v2:
  - remove explicit uses of scan_flags with WMI_SCAN_XXX flags
  - remove the underlying union of scan_flags to only leave the bitfield

Nicolas Escande (2):
  wifi: ath11k: Do not directly use scan_flags in struct scan_req_params
  wifi: ath11k: remove scan_flags union from struct scan_req_params

 drivers/net/wireless/ath/ath11k/mac.c |  6 +--
 drivers/net/wireless/ath/ath11k/wmi.c |  2 +-
 drivers/net/wireless/ath/ath11k/wmi.h | 55 ++++++++++++---------------
 3 files changed, 29 insertions(+), 34 deletions(-)