IPQ807x: No regulatory rules available in the event info
Hi,
I've just tried QC_IMAGE_VERSION_STRING=WLAN.HK.2.4.0.1.r1-00026- QCAHKSWPL_SILICONZ-2 on IPQ8074. The board.bin I am loading *has the regulatory domain information* included. This worked fine in the past but now I get following when I am trying to change the regulatory from US to CA (or DE):
ath11k c000000.wifi1: No regulatory rules available in the event info ath11k c000000.wifi1: failed to extract regulatory info from received event
The data which is send down to the device via WMI_SET_INIT_COUNTRY_CMDID is:
00000000: 0c 00 87 02 02 00 00 00 00 00 00 00 43 41 00 00
Interestingly, this works fine with QC_IMAGE_VERSION_STRING=WLAN.HK. 2.1.0.1-01228-QCAHKSWPL_SILICONZ-1
The skb->data I get in ath11k_pull_reg_chan_list_update_ev is with WLAN.HK. 2.4.0.1.r1-00026-QCAHKSWPL_SILICONZ-2 (fails) is:
00000000: 38 00 61 02 01 00 00 00 01 00 00 00 43 41 00 00
00000010: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 00and with WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1 (works):
00000000: 38 00 61 02 00 00 00 00 00 00 00 00 43 41 00 00
00000010: 02 00 00 00 7c 00 00 00 0f 00 00 00 01 00 00 00
00000020: 00 00 00 00 00 00 00 00 28 00 00 00 02 00 00 00
00000030: a0 00 00 00 01 00 00 00 05 00 00 00 60 00 12 00
00000040: 0c 00 60 02 62 09 a8 09 28 00 1e 00 00 00 00 00
00000050: 0c 00 60 02 1e 14 82 14 50 00 17 06 00 02 00 00
00000060: 0c 00 60 02 82 14 e6 14 50 00 18 06 08 00 00 00
00000070: 0c 00 60 02 5e 15 e0 15 50 00 18 06 08 00 00 00
00000080: 0c 00 60 02 12 16 62 16 50 00 18 06 08 00 00 00
00000090: 0c 00 60 02 67 16 cb 16 50 00 1e 06 00 00 00 00But on bootup (when the US gets "automatically" set), I get with WLAN.HK. 2.4.0.1.r1-00026-QCAHKSWPL_SILICONZ-2 (which usually fails otherwise):
00000000: 38 00 61 02 00 00 00 00 00 00 00 00 55 53 00 00
00000010: 02 00 00 00 48 03 00 00 3d 00 00 00 01 00 00 00
00000020: 00 00 00 00 00 00 00 00 28 00 00 00 02 00 00 00
00000030: a0 00 00 00 01 00 00 00 04 00 00 00 50 00 12 00
00000040: 0c 00 60 02 62 09 a8 09 28 00 1e 06 00 00 00 00
00000050: 0c 00 60 02 32 14 82 14 50 00 17 06 00 00 00 00
00000060: 0c 00 60 02 82 14 d2 14 50 00 17 06 08 00 00 00
00000070: 0c 00 60 02 72 15 62 16 a0 00 17 06 08 00 00 00
00000080: 0c 00 60 02 67 16 cb 16 50 00 1e 06 00 00 00 00
00000000: 38 00 61 02 00 00 00 00 01 00 00 00 55 53 00 00
00000010: 02 00 00 00 48 03 00 00 3d 00 00 00 01 00 00 00
00000020: 00 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00
00000030: 00 00 00 00 01 00 00 00 00 00 00 00 10 00 12 00
00000040: 0c 00 60 02 62 09 a8 09 28 00 1e 06 00 00 00 00Here an overview of tested firmware version:
* WLAN.HK.2.0.0.1-00043-QCAHKSWPL_SILICONZ-1: Q6 fails to boot
* WLAN.HK.2.0.0.1-00240-QCAHKSWPL_SILICONZ-1: Q6 fails to boot
* WLAN.HK.2.1.0.1-00410-QCAHKSWPL_SILICONZ-2: Q6 fails to boot
* WLAN.HK.2.1.0.1-00629-QCAHKSWPL_SILICONZ-1: Q6 fails to boot
* WLAN.HK.2.1.0.1-01161-QCAHKSWPL_SILICONZ-1: works
* WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1: works
* WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2: works
* WLAN.HK.2.4.0.1.r1-00019-QCAHKSWPL_SILICONZ-1: fails
* WLAN.HK.2.4.0.1.r1-00026-QCAHKSWPL_SILICONZ-2: fails
A board.bin is attached which causes the problem. It is just the bus=ahb,qmi-chip-id=0,qmi-board-id=255.bin (from IPQ8074/hw2.0/board-2.bin) with the REGULATORY_DB_SECTION.regDbFlag set to 1 and the regdb included.
Kind regards,
Sven
drivers/net/wireless/ath/ath11k/reg.c +5 -0
@@ -63,24 +64,29 @@ ath11k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)return ; } +printk ("%s:%u\n" , __func__, __LINE__);if (!IS_ENABLED (CPTCFG_ATH_REG_DYNAMIC_USER_REG_HINTS )) {ath11k_dbg (ar->ab,ATH11K_DBG_REG ,"Country Setting is not allowed\n" );return ; } +printk ("%s:%u\n" , __func__, __LINE__);if (!ath11k_regdom_changes (ar, request->alpha2)) {ath11k_dbg (ar->ab,ATH11K_DBG_REG ,"Country is already set\n" );return ; } +printk ("%s:%u\n" , __func__, __LINE__);/* Set the country code to the firmware and wait for * the WMI_REG_CHAN_LIST_CC EVENT for updating the * reg info */ init_country_param.flags =ALPHA_IS_SET ;memcpy (&init_country_param.cc_info.alpha2, request->alpha2,2 ); + init_country_param.cc_info.alpha2[2 ] =0 ; +printk ("%s:%u\n" , __func__, __LINE__); ret =ath11k_wmi_send_init_country_cmd (ar, init_country_param);if (ret) ath11k_warn(ar->ab,
drivers/net/wireless/ath/ath11k/wmi.c +15 -1
@@ -3110,42 +3110,55 @@ ath11k_wmi_send_init_country_cmd(struct ath11k *ar,struct sk_buff *skb;int ret; +printk ("%s:%u\n" , __func__, __LINE__); skb =ath11k_wmi_alloc_skb (wmi->wmi_ab,sizeof (*cmd));if (!skb)return -ENOMEM ; +printk ("%s:%u\n" , __func__, __LINE__); cmd = (struct wmi_init_country_cmd *)skb->data; cmd->tlv_header =FIELD_PREP (WMI_TLV_TAG ,WMI_TAG_SET_INIT_COUNTRY_CMD ) |FIELD_PREP (WMI_TLV_LEN ,sizeof (*cmd) -TLV_HDR_SIZE ); +printk ("%s:%u\n" , __func__, __LINE__); cmd->pdev_id = ar->pdev->pdev_id; +printk ("%s:%u\n" , __func__, __LINE__);switch (init_cc_params.flags) {case ALPHA_IS_SET : cmd->init_cc_type =WMI_COUNTRY_INFO_TYPE_ALPHA ;memcpy ((u8 *)&cmd->cc_info.alpha2, init_cc_params.cc_info.alpha2,3 ); +printk ("%s:%u %s\n" , __func__, __LINE__, init_cc_params.cc_info.alpha2);break ;case CC_IS_SET : +printk ("%s:%u\n" , __func__, __LINE__); cmd->init_cc_type =WMI_COUNTRY_INFO_TYPE_COUNTRY_CODE ; cmd->cc_info.country_code = init_cc_params.cc_info.country_code;break ;case REGDMN_IS_SET : +printk ("%s:%u\n" , __func__, __LINE__); cmd->init_cc_type =WMI_COUNTRY_INFO_TYPE_REGDOMAIN ; cmd->cc_info.regdom_id = init_cc_params.cc_info.regdom_id;break ;default : +printk ("%s:%u\n" , __func__, __LINE__); ret = -EINVAL ; goto out; } +print_hex_dump (KERN_CRIT ,"" ,DUMP_PREFIX_OFFSET , +16 ,1 , cmd,sizeof (*cmd), false); +printk ("%s:%u\n" , __func__, __LINE__); ret =ath11k_wmi_cmd_send (wmi, skb,WMI_SET_INIT_COUNTRY_CMDID ); +printk ("%s:%u\n" , __func__, __LINE__); out:if (ret) { +printk ("%s:%u\n" , __func__, __LINE__);ath11k_warn (ar->ab,"failed to send WMI_SET_INIT_COUNTRY CMD :%d\n" , ret);
@@ -4551,7 +4564,8 @@ static int ath11k_pull_reg_chan_list_update_ev(struct ath11k_base *ab,int ret;ath11k_dbg (ab,ATH11K_DBG_WMI ,"processing regulatory channel list\n" ); - +print_hex_dump (KERN_CRIT ,"" ,DUMP_PREFIX_OFFSET , +16 ,1 , skb->data, skb->len, false); tb =ath11k_wmi_tlv_parse_alloc (ab, skb->data, skb->len,GFP_ATOMIC );if (IS_ERR (tb)) { ret =PTR_ERR (tb);
Signature · 3 lines
ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
On Wednesday, 21 October 2020 17:51:07 CEST Sven Eckelmann wrote:
[....]
Quoted 3 lines
A board.bin is attached which causes the problem. It is just the bus=ahb,qmi-chip-id=0,qmi-board-id=255.bin (from IPQ8074/hw2.0/board-2.bin) with the REGULATORY_DB_SECTION.regDbFlag set to 1 and the regdb included.
Ok, it seems like the reg_dmn_pair_id 0 is now forbidden in the 2.4.0.1 firmware releases. The entries must now always use a value > 0. My tests now seem to suggest that I am able again to embed the wireless-regdb.
Kind regards,
Sven
Signature · 3 lines
ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k