Skip to content

wifi: ath11k: give the regulatory state the lifetime of the device

Zhao Li ath11k linux-wireless lkml stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3wifi: ath11k: don't walk an unallocated regulatory info storedrivers/net/wireless/ath/ath11k/reg.c+4 -20 replies
2/3wifi: ath11k: free the regulatory state when the device is freeddrivers/net/wireless/ath/ath11k/core.c+1 -10 replies
3/3wifi: ath11k: keep the regulatory info store on a SERVICE_READY_EXT errordrivers/net/wireless/ath/ath11k/wmi.c+0 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH ath-current 0/3] wifi: ath11k: give the regulatory state the lifetime of the device

ab->reg_info_store, with the rules it holds, and the default_regd[] and new_regd[] domains live as long as struct ath11k_base, but their teardown does not follow that lifetime. The SERVICE_READY_EXT error path frees the store from a transient event handler, and the remove paths that follow a failed start never call ath11k_reg_free().

Patch 1 lets ath11k_reg_free() cope with a store that was never allocated. Patch 2 moves ath11k_reg_free() into ath11k_core_free(), so that every teardown path frees the regulatory state. Patch 3 then drops the free from the SERVICE_READY_EXT error path. In this order no step adds a crash or a leak.

A separate patch, sent on its own, makes a failed SERVICE_READY_EXT fail the start instead of letting SERVICE_READY_EXT2 complete it.

Zhao Li (3):
wifi: ath11k: don't walk an unallocated regulatory info store
wifi: ath11k: free the regulatory state when the device is freed
wifi: ath11k: keep the regulatory info store on a SERVICE_READY_EXT
error

 drivers/net/wireless/ath/ath11k/core.c | 2 +-
 drivers/net/wireless/ath/ath11k/reg.c  | 6 ++++--
 drivers/net/wireless/ath/ath11k/wmi.c  | 9 ---------
 3 files changed, 5 insertions(+), 12 deletions(-)

base-commit: b1ed5a45b994a6473ca1cf34f35a1bf87f1d8e2a

Signature · 1 line
2.56.1