Commit e238e62b authored by Aditya Kumar Singh's avatar Aditya Kumar Singh Committed by Kalle Valo

wifi: ath11k: add debug prints in regulatory WMI event processing

Add some more debug prints in processing regulatory WMI event in order to
increase more debuggability.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
Signed-off-by: default avatarAditya Kumar Singh <quic_adisi@quicinc.com>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230110121024.14051-4-quic_adisi@quicinc.com
parent 91fa00fa
......@@ -646,7 +646,7 @@ ath11k_reg_build_regd(struct ath11k_base *ab,
tmp_regd->dfs_region = ath11k_map_fw_dfs_region(reg_info->dfs_region);
ath11k_dbg(ab, ATH11K_DBG_REG,
"\r\nCountry %s, CFG Regdomain %s FW Regdomain %d, num_reg_rules %d\n",
"Country %s, CFG Regdomain %s FW Regdomain %d, num_reg_rules %d\n",
alpha2, ath11k_reg_get_regdom_str(tmp_regd->dfs_region),
reg_info->dfs_region, num_rules);
/* Update reg_rules[] below. Firmware is expected to
......
This diff is collapsed.
......@@ -4139,6 +4139,7 @@ enum cc_setting_code {
/* add new setting code above, update in
* @enum wmi_reg_cc_setting_code as well.
* Also handle it in ath11k_cc_status_to_str()
*/
};
......@@ -4163,21 +4164,162 @@ ath11k_wmi_cc_setting_code_to_reg(enum wmi_reg_cc_setting_code status_code)
return REG_SET_CC_STATUS_FAIL;
}
static inline const char *ath11k_cc_status_to_str(enum cc_setting_code code)
{
switch (code) {
case REG_SET_CC_STATUS_PASS:
return "REG_SET_CC_STATUS_PASS";
case REG_CURRENT_ALPHA2_NOT_FOUND:
return "REG_CURRENT_ALPHA2_NOT_FOUND";
case REG_INIT_ALPHA2_NOT_FOUND:
return "REG_INIT_ALPHA2_NOT_FOUND";
case REG_SET_CC_CHANGE_NOT_ALLOWED:
return "REG_SET_CC_CHANGE_NOT_ALLOWED";
case REG_SET_CC_STATUS_NO_MEMORY:
return "REG_SET_CC_STATUS_NO_MEMORY";
case REG_SET_CC_STATUS_FAIL:
return "REG_SET_CC_STATUS_FAIL";
}
return "Unknown CC status";
}
enum wmi_reg_6ghz_ap_type {
WMI_REG_INDOOR_AP = 0,
WMI_REG_STANDARD_POWER_AP = 1,
WMI_REG_VERY_LOW_POWER_AP = 2,
/* add AP type above, handle in ath11k_6ghz_ap_type_to_str()
*/
WMI_REG_CURRENT_MAX_AP_TYPE,
WMI_REG_MAX_AP_TYPE = 7,
};
static inline const char *
ath11k_6ghz_ap_type_to_str(enum wmi_reg_6ghz_ap_type type)
{
switch (type) {
case WMI_REG_INDOOR_AP:
return "INDOOR AP";
case WMI_REG_STANDARD_POWER_AP:
return "STANDARD POWER AP";
case WMI_REG_VERY_LOW_POWER_AP:
return "VERY LOW POWER AP";
case WMI_REG_CURRENT_MAX_AP_TYPE:
return "CURRENT_MAX_AP_TYPE";
case WMI_REG_MAX_AP_TYPE:
return "MAX_AP_TYPE";
}
return "unknown 6 GHz AP type";
}
enum wmi_reg_6ghz_client_type {
WMI_REG_DEFAULT_CLIENT = 0,
WMI_REG_SUBORDINATE_CLIENT = 1,
WMI_REG_MAX_CLIENT_TYPE = 2,
/* add client type above, handle it in
* ath11k_6ghz_client_type_to_str()
*/
};
static inline const char *
ath11k_6ghz_client_type_to_str(enum wmi_reg_6ghz_client_type type)
{
switch (type) {
case WMI_REG_DEFAULT_CLIENT:
return "DEFAULT CLIENT";
case WMI_REG_SUBORDINATE_CLIENT:
return "SUBORDINATE CLIENT";
case WMI_REG_MAX_CLIENT_TYPE:
return "MAX_CLIENT_TYPE";
}
return "unknown 6 GHz client type";
}
enum reg_subdomains_6ghz {
EMPTY_6GHZ = 0x0,
FCC1_CLIENT_LPI_REGULAR_6GHZ = 0x01,
FCC1_CLIENT_SP_6GHZ = 0x02,
FCC1_AP_LPI_6GHZ = 0x03,
FCC1_CLIENT_LPI_SUBORDINATE = FCC1_AP_LPI_6GHZ,
FCC1_AP_SP_6GHZ = 0x04,
ETSI1_LPI_6GHZ = 0x10,
ETSI1_VLP_6GHZ = 0x11,
ETSI2_LPI_6GHZ = 0x12,
ETSI2_VLP_6GHZ = 0x13,
APL1_LPI_6GHZ = 0x20,
APL1_VLP_6GHZ = 0x21,
/* add sub-domain above, handle it in
* ath11k_sub_reg_6ghz_to_str()
*/
};
static inline const char *
ath11k_sub_reg_6ghz_to_str(enum reg_subdomains_6ghz sub_id)
{
switch (sub_id) {
case EMPTY_6GHZ:
return "N/A";
case FCC1_CLIENT_LPI_REGULAR_6GHZ:
return "FCC1_CLIENT_LPI_REGULAR_6GHZ";
case FCC1_CLIENT_SP_6GHZ:
return "FCC1_CLIENT_SP_6GHZ";
case FCC1_AP_LPI_6GHZ:
return "FCC1_AP_LPI_6GHZ/FCC1_CLIENT_LPI_SUBORDINATE";
case FCC1_AP_SP_6GHZ:
return "FCC1_AP_SP_6GHZ";
case ETSI1_LPI_6GHZ:
return "ETSI1_LPI_6GHZ";
case ETSI1_VLP_6GHZ:
return "ETSI1_VLP_6GHZ";
case ETSI2_LPI_6GHZ:
return "ETSI2_LPI_6GHZ";
case ETSI2_VLP_6GHZ:
return "ETSI2_VLP_6GHZ";
case APL1_LPI_6GHZ:
return "APL1_LPI_6GHZ";
case APL1_VLP_6GHZ:
return "APL1_VLP_6GHZ";
}
return "unknown sub reg id";
}
enum reg_super_domain_6ghz {
FCC1_6GHZ = 0x01,
ETSI1_6GHZ = 0x02,
ETSI2_6GHZ = 0x03,
APL1_6GHZ = 0x04,
FCC1_6GHZ_CL = 0x05,
/* add super domain above, handle it in
* ath11k_super_reg_6ghz_to_str()
*/
};
static inline const char *
ath11k_super_reg_6ghz_to_str(enum reg_super_domain_6ghz domain_id)
{
switch (domain_id) {
case FCC1_6GHZ:
return "FCC1_6GHZ";
case ETSI1_6GHZ:
return "ETSI1_6GHZ";
case ETSI2_6GHZ:
return "ETSI2_6GHZ";
case APL1_6GHZ:
return "APL1_6GHZ";
case FCC1_6GHZ_CL:
return "FCC1_6GHZ_CL";
}
return "unknown domain id";
}
struct cur_reg_rule {
u16 start_freq;
u16 end_freq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment