Skip to contentSkip to conversation

ath10k: Enable support for beacon interval per VAP

PATCH Superseded Dundi Raviteja 3 participants 5 messages Feb 12, 2019 Qualcomm Atheros ATH10K wireless driver

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: Enable support for beacon interval per VAP

Enable support to configure different beacon interval per VAP.

To support this feature, map different beacon interval service bit to wmi tlv service.

Tested HW: WCN3990
Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1

---
 drivers/net/wireless/ath/ath10k/mac.c     | 33 +++++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/wmi-tlv.h |  3 +++
 2 files changed, 36 insertions(+)
drivers/net/wireless/ath/ath10k/mac.c +33 -0
index e49b367..09c4705 100644
@@ -8232,6 +8232,30 @@ void ath10k_mac_destroy(struct ath10k *ar)
 	},
 };
 
+static struct
+ieee80211_iface_combination ath10k_tlv_qcs_bcn_int_if_comb[] = {
+	{
+		.limits = ath10k_tlv_if_limit,
+		.num_different_channels = 1,
+		.max_interfaces = 4,
+		.beacon_int_infra_match = true,
+		.beacon_int_min_gcd = 1,
+		.n_limits = ARRAY_SIZE(ath10k_tlv_if_limit),
+	},
+	{
+		.limits = ath10k_tlv_qcs_if_limit,
+		.num_different_channels = 2,
+		.max_interfaces = 4,
+		.n_limits = ARRAY_SIZE(ath10k_tlv_qcs_if_limit),
+	},
+	{
+		.limits = ath10k_tlv_if_limit_ibss,
+		.num_different_channels = 1,
+		.max_interfaces = 2,
+		.n_limits = ARRAY_SIZE(ath10k_tlv_if_limit_ibss),
+	},
+};
+
 static const struct ieee80211_iface_limit ath10k_10_4_if_limits[] = {
 	{
 		.max = 1,
@@ -8642,6 +8666,15 @@ int ath10k_mac_register(struct ath10k *ar)
 				ath10k_tlv_qcs_if_comb;
 			ar->hw->wiphy->n_iface_combinations =
 				ARRAY_SIZE(ath10k_tlv_qcs_if_comb);
+
+			if (test_bit
+			    (WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
+			    ar->wmi.svc_map)) {
+				ar->hw->wiphy->iface_combinations =
+						ath10k_tlv_qcs_bcn_int_if_comb;
+				ar->hw->wiphy->n_iface_combinations =
+				     ARRAY_SIZE(ath10k_tlv_qcs_bcn_int_if_comb);
+			}
 		} else {
 			ar->hw->wiphy->iface_combinations = ath10k_tlv_if_comb;
 			ar->hw->wiphy->n_iface_combinations =
drivers/net/wireless/ath/ath10k/wmi-tlv.h +3 -0
index e07e990..9f78502 100644
@@ -1567,6 +1567,9 @@ enum wmi_tlv_service {
 	SVCMAP(WMI_TLV_SERVICE_THERM_THROT,
 	       WMI_SERVICE_THERM_THROT,
 	       WMI_TLV_MAX_SERVICE);
+	SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
+	       WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
+	       WMI_TLV_MAX_SERVICE);
 }
 
 #undef SVCMAP
Signature · 1 line
1.9.1
#1 lore raw
Quoted 9 lines · Dundi Raviteja

Enable support to configure different beacon interval per VAP.

To support this feature, map different beacon interval service bit to wmi tlv service.

Tested HW: WCN3990
Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1

Does not compile:

In file included from drivers/net/wireless/ath/ath10k/mac.c:34:
drivers/net/wireless/ath/ath10k/wmi-tlv.h: In function 'wmi_tlv_svc_map_ext':
drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:15: error: 'WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT' undeclared (first use in this function); did you mean 'WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT'?
SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,

               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
               WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT

drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:15: note: each undeclared identifier is reported only once for each function it appears in
In file included from drivers/net/wireless/ath/ath10k/wmi.c:26:
drivers/net/wireless/ath/ath10k/wmi-tlv.h: In function 'wmi_tlv_svc_map_ext':
drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:15: error: 'WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT' undeclared (first use in this function); did you mean 'WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT'?
SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,

               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
               WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT

drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:15: note: each undeclared identifier is reported only once for each function it appears in
In file included from drivers/net/wireless/ath/ath10k/wmi-tlv.c:24:
drivers/net/wireless/ath/ath10k/wmi-tlv.h: In function 'wmi_tlv_svc_map_ext':
drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:15: error: 'WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT' undeclared (first use in this function); did you mean 'WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT'?
SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,

               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
               WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT

drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:15: note: each undeclared identifier is reported only once for each function it appears in make[5]: *** [drivers/net/wireless/ath/ath10k/mac.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [drivers/net/wireless/ath/ath10k/wmi.o] Error 1
make[5]: *** [drivers/net/wireless/ath/ath10k/wmi-tlv.o] Error 1
make[4]: *** [drivers/net/wireless/ath/ath10k] Error 2
make[3]: *** [drivers/net/wireless/ath] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2

Patch set to Changes Requested.

Signature · 9 lines
https://patchwork.kernel.org/patch/10807921/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#2 lore raw
In reply to Dundi Raviteja
Quoted 9 lines · Dundi Raviteja

Enable support to configure different beacon interval per VAP.

To support this feature, map different beacon interval service bit to wmi tlv service.

Tested HW: WCN3990
Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1

Does not compile:

In file included from drivers/net/wireless/ath/ath10k/mac.c:34:
drivers/net/wireless/ath/ath10k/wmi-tlv.h: In function 'wmi_tlv_svc_map_ext':
drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:15: error: 'WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT' undeclared (first use in this function); did you mean 'WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT'?
SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,

               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
               WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT

drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:15: note: each undeclared identifier is reported only once for each function it appears in
In file included from drivers/net/wireless/ath/ath10k/wmi.c:26:
drivers/net/wireless/ath/ath10k/wmi-tlv.h: In function 'wmi_tlv_svc_map_ext':
drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:15: error: 'WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT' undeclared (first use in this function); did you mean 'WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT'?
SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,

               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
               WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT

drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:15: note: each undeclared identifier is reported only once for each function it appears in
In file included from drivers/net/wireless/ath/ath10k/wmi-tlv.c:24:
drivers/net/wireless/ath/ath10k/wmi-tlv.h: In function 'wmi_tlv_svc_map_ext':
drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:15: error: 'WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT' undeclared (first use in this function); did you mean 'WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT'?
SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,

               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
               WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT

drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:15: note: each undeclared identifier is reported only once for each function it appears in make[5]: *** [drivers/net/wireless/ath/ath10k/mac.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [drivers/net/wireless/ath/ath10k/wmi.o] Error 1
make[5]: *** [drivers/net/wireless/ath/ath10k/wmi-tlv.o] Error 1
make[4]: *** [drivers/net/wireless/ath/ath10k] Error 2
make[3]: *** [drivers/net/wireless/ath] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2

Patch set to Changes Requested.

Signature · 3 lines
https://patchwork.kernel.org/patch/10807921/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#3 lore raw
In reply to Dundi Raviteja
Thank you for the patch! Yet something to improve:

Hi Dundi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v5.0-rc4 next-20190212]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Dundi-Raviteja/ath10k-Enable-support-for-beacon-interval-per-VAP/20190213-045008
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.2.0

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=xtensa

All errors (new ones prefixed by >>):

In file included from drivers/net/wireless/ath/ath10k/core.h:33,

                    from drivers/net/wireless/ath/ath10k/mac.h:22,
                    from drivers/net/wireless/ath/ath10k/mac.c:19:
   drivers/net/wireless/ath/ath10k/wmi-tlv.h: In function 'wmi_tlv_svc_map_ext':
>> drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:9: error: 'WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT' undeclared (first use in this function); did you mean 'WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT'?
     SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/wmi.h:494:4: note: in definition of macro 'WMI_SERVICE_IS_ENABLED'
     ((svc_id) < (len) && \
       ^~~~~~
   drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:2: note: in expansion of macro 'SVCMAP'
     SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
     ^~~~~~
   drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:9: note: each undeclared identifier is reported only once for each function it appears in
     SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/wmi.h:494:4: note: in definition of macro 'WMI_SERVICE_IS_ENABLED'
     ((svc_id) < (len) && \
       ^~~~~~
   drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:2: note: in expansion of macro 'SVCMAP'
     SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
     ^~~~~~

vim +1571 drivers/net/wireless/ath/ath10k/wmi-tlv.h

1561
1562 static inline void
1563 wmi_tlv_svc_map_ext(const __le32 *in, unsigned long *out, size_t len)
1564 {
1565 SVCMAP(WMI_TLV_SERVICE_SPOOF_MAC_SUPPORT,
1566 WMI_SERVICE_SPOOF_MAC_SUPPORT,
1567 WMI_TLV_MAX_SERVICE);
1568 SVCMAP(WMI_TLV_SERVICE_THERM_THROT,
1569 WMI_SERVICE_THERM_THROT,
1570 WMI_TLV_MAX_SERVICE);

> 1571		SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,

1572 WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
1573 WMI_TLV_MAX_SERVICE);
1574 }
1575

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

#4 lore raw
In reply to Dundi Raviteja
Thank you for the patch! Yet something to improve:

Hi Dundi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v5.0-rc4 next-20190212]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Dundi-Raviteja/ath10k-Enable-support-for-beacon-interval-per-VAP/20190213-045008
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 6.4.0

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=6.4.0 make.cross ARCH=nds32

All error/warnings (new ones prefixed by >>):

In file included from drivers/net/wireless/ath/ath10k/core.h:33:0,

                    from drivers/net/wireless/ath/ath10k/wmi.c:22:
   drivers/net/wireless/ath/ath10k/wmi-tlv.h: In function 'wmi_tlv_svc_map_ext':
>> drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:9: error: 'WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT' undeclared (first use in this function)
     SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
            ^
   drivers/net/wireless/ath/ath10k/wmi.h:494:4: note: in definition of macro 'WMI_SERVICE_IS_ENABLED'
     ((svc_id) < (len) && \
       ^~~~~~
>> drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:2: note: in expansion of macro 'SVCMAP'
     SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
     ^~~~~~
   drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:9: note: each undeclared identifier is reported only once for each function it appears in
     SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
            ^
   drivers/net/wireless/ath/ath10k/wmi.h:494:4: note: in definition of macro 'WMI_SERVICE_IS_ENABLED'
     ((svc_id) < (len) && \
       ^~~~~~
>> drivers/net/wireless/ath/ath10k/wmi-tlv.h:1571:2: note: in expansion of macro 'SVCMAP'
     SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
     ^~~~~~

vim +/WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT +1571 drivers/net/wireless/ath/ath10k/wmi-tlv.h

1561
1562 static inline void
1563 wmi_tlv_svc_map_ext(const __le32 *in, unsigned long *out, size_t len)
1564 {
1565 SVCMAP(WMI_TLV_SERVICE_SPOOF_MAC_SUPPORT,
1566 WMI_SERVICE_SPOOF_MAC_SUPPORT,
1567 WMI_TLV_MAX_SERVICE);
1568 SVCMAP(WMI_TLV_SERVICE_THERM_THROT,
1569 WMI_SERVICE_THERM_THROT,
1570 WMI_TLV_MAX_SERVICE);

> 1571		SVCMAP(WMI_TLV_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,

1572 WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
1573 WMI_TLV_MAX_SERVICE);
1574 }
1575

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation