mbox series

[0/4] wcn36xx: Add in debugfs export of firmware feature bits

Message ID 20220719121600.1847440-1-bryan.odonoghue@linaro.org (mailing list archive)
Headers show
Series wcn36xx: Add in debugfs export of firmware feature bits | expand

Message

Bryan O'Donoghue July 19, 2022, 12:15 p.m. UTC
This series tidies up the code to get/set/clear discovered firmware feature
bits and adds a new debugfs entry to read the feature bits as strings.

cat /sys/kernel/debug/ieee80211/phy0/wcn36xx/firmware_feat_caps

wcn3680b:
FW Cap = MCC
FW Cap = P2P
FW Cap = DOT11AC
FW Cap = SLM_SESSIONIZATION
FW Cap = DOT11AC_OPMODE
FW Cap = SAP32STA
FW Cap = TDLS
FW Cap = P2P_GO_NOA_DECOUPLE_INIT_SCAN
FW Cap = WLANACTIVE_OFFLOAD
FW Cap = BEACON_OFFLOAD
FW Cap = SCAN_OFFLOAD
FW Cap = BCN_MISS_OFFLOAD
FW Cap = STA_POWERSAVE
FW Cap = STA_ADVANCED_PWRSAVE
FW Cap = BCN_FILTER
FW Cap = RTT
FW Cap = RATECTRL
FW Cap = WOW
FW Cap = WLAN_ROAM_SCAN_OFFLOAD
FW Cap = SPECULATIVE_PS_POLL
FW Cap = IBSS_HEARTBEAT_OFFLOAD
FW Cap = WLAN_SCAN_OFFLOAD
FW Cap = WLAN_PERIODIC_TX_PTRN
FW Cap = ADVANCE_TDLS
FW Cap = BATCH_SCAN
FW Cap = FW_IN_TX_PATH
FW Cap = EXTENDED_NSOFFLOAD_SLOT
FW Cap = CH_SWITCH_V1
FW Cap = HT40_OBSS_SCAN
FW Cap = UPDATE_CHANNEL_LIST
FW Cap = WLAN_MCADDR_FLT
FW Cap = WLAN_CH144
FW Cap = TDLS_SCAN_COEXISTENCE
FW Cap = LINK_LAYER_STATS_MEAS
FW Cap = MU_MIMO
FW Cap = EXTENDED_SCAN
FW Cap = DYNAMIC_WMM_PS
FW Cap = MAC_SPOOFED_SCAN
FW Cap = FW_STATS
FW Cap = WPS_PRBRSP_TMPL
FW Cap = BCN_IE_FLT_DELTA

wcn3620:
FW Cap = MCC
FW Cap = P2P
FW Cap = SLM_SESSIONIZATION
FW Cap = DOT11AC_OPMODE
FW Cap = SAP32STA
FW Cap = TDLS
FW Cap = P2P_GO_NOA_DECOUPLE_INIT_SCAN
FW Cap = WLANACTIVE_OFFLOAD
FW Cap = BEACON_OFFLOAD
FW Cap = SCAN_OFFLOAD
FW Cap = BCN_MISS_OFFLOAD
FW Cap = STA_POWERSAVE
FW Cap = STA_ADVANCED_PWRSAVE
FW Cap = BCN_FILTER
FW Cap = RTT
FW Cap = RATECTRL
FW Cap = WOW
FW Cap = WLAN_ROAM_SCAN_OFFLOAD
FW Cap = SPECULATIVE_PS_POLL
FW Cap = IBSS_HEARTBEAT_OFFLOAD
FW Cap = WLAN_SCAN_OFFLOAD
FW Cap = WLAN_PERIODIC_TX_PTRN
FW Cap = ADVANCE_TDLS
FW Cap = BATCH_SCAN
FW Cap = FW_IN_TX_PATH
FW Cap = EXTENDED_NSOFFLOAD_SLOT
FW Cap = CH_SWITCH_V1
FW Cap = HT40_OBSS_SCAN
FW Cap = UPDATE_CHANNEL_LIST
FW Cap = WLAN_MCADDR_FLT
FW Cap = WLAN_CH144
FW Cap = TDLS_SCAN_COEXISTENCE
FW Cap = LINK_LAYER_STATS_MEAS
FW Cap = EXTENDED_SCAN
FW Cap = DYNAMIC_WMM_PS
FW Cap = MAC_SPOOFED_SCAN
FW Cap = FW_STATS
FW Cap = WPS_PRBRSP_TMPL
FW Cap = BCN_IE_FLT_DELTA

This is a handy way of debugging WiFi on different platforms without
necessarily having to recompile to see the debug printout on firmware boot.

Bryan O'Donoghue (4):
  wcn36xx: Rename clunky firmware feature bit enum
  wcn36xx: Move firmware feature bit storage to dedicated firmware.c
    file
  wcn36xx: Move capability bitmap to string translation function to
    firmware.c
  wcn36xx: Add debugfs entry to read firmware feature strings

 drivers/net/wireless/ath/wcn36xx/Makefile   |   3 +-
 drivers/net/wireless/ath/wcn36xx/debug.c    |  37 ++++++
 drivers/net/wireless/ath/wcn36xx/debug.h    |   1 +
 drivers/net/wireless/ath/wcn36xx/firmware.c | 125 ++++++++++++++++++++
 drivers/net/wireless/ath/wcn36xx/firmware.h |  84 +++++++++++++
 drivers/net/wireless/ath/wcn36xx/hal.h      |  68 -----------
 drivers/net/wireless/ath/wcn36xx/main.c     |  86 ++------------
 drivers/net/wireless/ath/wcn36xx/smd.c      |  57 ++-------
 drivers/net/wireless/ath/wcn36xx/smd.h      |   3 -
 9 files changed, 264 insertions(+), 200 deletions(-)
 create mode 100644 drivers/net/wireless/ath/wcn36xx/firmware.c
 create mode 100644 drivers/net/wireless/ath/wcn36xx/firmware.h

Comments

Loic Poulain July 19, 2022, 1:06 p.m. UTC | #1
On Tue, 19 Jul 2022 at 14:16, Bryan O'Donoghue
<bryan.odonoghue@linaro.org> wrote:
>
> This series tidies up the code to get/set/clear discovered firmware feature
> bits and adds a new debugfs entry to read the feature bits as strings.
>
> cat /sys/kernel/debug/ieee80211/phy0/wcn36xx/firmware_feat_caps
>
> wcn3680b:
> FW Cap = MCC

Nice, but why prepending with 'FW Cap = ' string, we already know it's
a list of firmware features.


> FW Cap = P2P
> FW Cap = DOT11AC
> FW Cap = SLM_SESSIONIZATION
> FW Cap = DOT11AC_OPMODE
> FW Cap = SAP32STA
> FW Cap = TDLS
Bryan O'Donoghue July 19, 2022, 1:39 p.m. UTC | #2
On 19/07/2022 14:06, Loic Poulain wrote:
> Nice, but why prepending with 'FW Cap = ' string, we already know it's
> a list of firmware features.

I literally just copied the debug printout which also prefixes with FW Cap..

I can drop