Add QCA vendor subcmd/attribute to check wlan firmware state

Allow user space applications to check whether wlan firmware is alive
through an nl80211 vendor command.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Qun Zhang 2019-02-13 10:35:26 +08:00 committed by Jouni Malinen
parent 810dcfb667
commit 31ee2992c7

View file

@ -507,6 +507,9 @@ enum qca_radiotap_vendor_ids {
* @QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_AKMS: This command is used to query
* the supported AKM suite selectorss from the driver. It returns the list
* of supported AKMs in the attribute NL80211_ATTR_AKM_SUITES.
* @QCA_NL80211_VENDOR_SUBCMD_GET_FW_STATE: This command is used to get firmware
* state from the driver. It returns the firmware state in the attribute
* QCA_WLAN_VENDOR_ATTR_FW_STATE.
*/
enum qca_nl80211_vendor_subcmds {
QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
@ -672,6 +675,7 @@ enum qca_nl80211_vendor_subcmds {
QCA_NL80211_VENDOR_SUBCMD_THROUGHPUT_CHANGE_EVENT = 174,
QCA_NL80211_VENDOR_SUBCMD_COEX_CONFIG = 175,
QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_AKMS = 176,
QCA_NL80211_VENDOR_SUBCMD_GET_FW_STATE = 177,
};
enum qca_wlan_vendor_attr {
@ -858,6 +862,12 @@ enum qca_wlan_vendor_attr {
* for each antenna ID, and application extract them in user space.
*/
QCA_WLAN_VENDOR_ATTR_CHAIN_EVM = 41,
/*
* Used in QCA_NL80211_VENDOR_SUBCMD_GET_FW_STATE command to report
* wlan firmware current state. FW state is an unsigned 8 bit value,
* one of the values in enum qca_wlan_vendor_attr_fw_state.
*/
QCA_WLAN_VENDOR_ATTR_FW_STATE = 42,
/* keep last */
QCA_WLAN_VENDOR_ATTR_AFTER_LAST,
@ -2452,6 +2462,18 @@ enum qca_wlan_vendor_attr_dmg_rf_sector_type {
QCA_WLAN_VENDOR_ATTR_DMG_RF_SECTOR_TYPE_MAX
};
/**
* enum qca_wlan_vendor_attr_fw_state - State of firmware
*
* @QCA_WLAN_VENDOR_ATTR_FW_STATE_ERROR: FW is in bad state
* @QCA_WLAN_VENDOR_ATTR_FW_STATE_ACTIVE: FW is active
*/
enum qca_wlan_vendor_attr_fw_state {
QCA_WLAN_VENDOR_ATTR_FW_STATE_ERROR,
QCA_WLAN_VENDOR_ATTR_FW_STATE_ACTIVE,
QCA_WLAN_VENDOR_ATTR_FW_STATE_MAX
};
/**
* BRP antenna limit mode
*