diff mbox series

ath10k: Enable support for beacon interval per VAP

Message ID 1549979286-9255-1-git-send-email-dundi@codeaurora.org (mailing list archive)
State New, archived
Headers show
Series ath10k: Enable support for beacon interval per VAP | expand

Commit Message

Dundi Raviteja Feb. 12, 2019, 1:48 p.m. UTC
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

Signed-off-by: Dundi Raviteja <dundi@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/mac.c     | 33 +++++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/wmi-tlv.h |  3 +++
 2 files changed, 36 insertions(+)

Comments

Kalle Valo Feb. 12, 2019, 7:54 p.m. UTC | #1
Dundi Raviteja <dundi@codeaurora.org> wrote:

> 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
> 
> Signed-off-by: Dundi Raviteja <dundi@codeaurora.org>

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.
kernel test robot Feb. 12, 2019, 10:32 p.m. UTC | #2
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
kernel test robot Feb. 12, 2019, 11:40 p.m. UTC | #3
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
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index e49b367..09c4705 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -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 =
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.h b/drivers/net/wireless/ath/ath10k/wmi-tlv.h
index e07e990..9f78502 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.h
@@ -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