diff mbox

[3/3] ath10k: apply Mesh subtype when Mesh interface created.

Message ID 1448386655-13936-4-git-send-email-poh@qca.qualcomm.com (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Peter Oh Nov. 24, 2015, 5:37 p.m. UTC
QCA988X firmware starting from 10.2.4.70.12-2 has capability to support
Mesh Control Field Present bit in QoS field in native Wi-Fi mode.
Hence apply Mesh subtype according to the WMI service map.

Firmware will allows unicast, broadcast, multicast, and WDS frame
(FromDS = 1 and ToDS = 1) to be received via the interface, once Mesh
subtype is used.

The firmware and this patch together make native Wi-Fi mode comply to
IEEE802.11s Mesh frame in open mode, but the firmware doesn't yet
support secured Mesh mode.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

kernel test robot Nov. 24, 2015, 6 p.m. UTC | #1
Hi Peter,

[auto build test ERROR on net-next/master]
[also build test ERROR on v4.4-rc2 next-20151124]

url:    https://github.com/0day-ci/linux/commits/Peter-Oh/ath10k-introduce-Mesh-support-in-native-WiFi-mode-for-QCA988X/20151125-014059
config: x86_64-randconfig-x006-11230704 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from drivers/net/wireless/ath/ath10k/core.h:32:0,
                    from drivers/net/wireless/ath/ath10k/mac.h:22,
                    from drivers/net/wireless/ath/ath10k/mac.c:18:
   drivers/net/wireless/ath/ath10k/wmi.h: In function 'wmi_10x_svc_map':
   drivers/net/wireless/ath/ath10k/wmi.h:457:9: error: 'WMI_SERVICE_MESH' undeclared (first use in this function)
            WMI_SERVICE_MESH, len);
            ^
   drivers/net/wireless/ath/ath10k/wmi.h:398:14: note: in definition of macro 'SVCMAP'
       __set_bit(y, out); \
                 ^
   drivers/net/wireless/ath/ath10k/wmi.h:457:9: note: each undeclared identifier is reported only once for each function it appears in
            WMI_SERVICE_MESH, len);
            ^
   drivers/net/wireless/ath/ath10k/wmi.h:398:14: note: in definition of macro 'SVCMAP'
       __set_bit(y, out); \
                 ^
   drivers/net/wireless/ath/ath10k/wmi.h:459:9: error: 'WMI_SERVICE_EXT_RES_CFG_SUPPORT' undeclared (first use in this function)
            WMI_SERVICE_EXT_RES_CFG_SUPPORT, len);
            ^
   drivers/net/wireless/ath/ath10k/wmi.h:398:14: note: in definition of macro 'SVCMAP'
       __set_bit(y, out); \
                 ^
   In file included from include/linux/bitops.h:36:0,
                    from include/linux/kernel.h:10,
                    from include/asm-generic/bug.h:13,
                    from arch/x86/include/asm/bug.h:35,
                    from include/linux/bug.h:4,
                    from include/net/mac80211.h:18,
                    from drivers/net/wireless/ath/ath10k/mac.h:21,
                    from drivers/net/wireless/ath/ath10k/mac.c:18:
   drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_add_interface':
>> drivers/net/wireless/ath/ath10k/mac.c:4353:16: error: 'WMI_SERVICE_MESH' undeclared (first use in this function)
      if (test_bit(WMI_SERVICE_MESH, ar->wmi.svc_map)) {
                   ^
   arch/x86/include/asm/bitops.h:336:25: note: in definition of macro 'test_bit'
     (__builtin_constant_p((nr))  \
                            ^

vim +/WMI_SERVICE_MESH +4353 drivers/net/wireless/ath/ath10k/mac.c

  4347				arvif->vdev_subtype = WMI_VDEV_SUBTYPE_P2P_CLIENT;
  4348			break;
  4349		case NL80211_IFTYPE_ADHOC:
  4350			arvif->vdev_type = WMI_VDEV_TYPE_IBSS;
  4351			break;
  4352		case NL80211_IFTYPE_MESH_POINT:
> 4353			if (test_bit(WMI_SERVICE_MESH, ar->wmi.svc_map)) {
  4354				arvif->vdev_subtype = WMI_VDEV_SUBTYPE_MESH;
  4355			} else if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) {
  4356				ret = -EINVAL;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
kernel test robot Nov. 24, 2015, 6:20 p.m. UTC | #2
Hi Peter,

[auto build test WARNING on net-next/master]
[also build test WARNING on v4.4-rc2 next-20151124]

url:    https://github.com/0day-ci/linux/commits/Peter-Oh/ath10k-introduce-Mesh-support-in-native-WiFi-mode-for-QCA988X/20151125-014059
config: x86_64-randconfig-s5-11250138 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from drivers/net/wireless/ath/ath10k/core.h:32:0,
                    from drivers/net/wireless/ath/ath10k/mac.h:22,
                    from drivers/net/wireless/ath/ath10k/mac.c:18:
   drivers/net/wireless/ath/ath10k/wmi.h: In function 'wmi_10x_svc_map':
   drivers/net/wireless/ath/ath10k/wmi.h:457:9: error: 'WMI_SERVICE_MESH' undeclared (first use in this function)
            WMI_SERVICE_MESH, len);
            ^
   drivers/net/wireless/ath/ath10k/wmi.h:398:14: note: in definition of macro 'SVCMAP'
       __set_bit(y, out); \
                 ^
   drivers/net/wireless/ath/ath10k/wmi.h:457:9: note: each undeclared identifier is reported only once for each function it appears in
            WMI_SERVICE_MESH, len);
            ^
   drivers/net/wireless/ath/ath10k/wmi.h:398:14: note: in definition of macro 'SVCMAP'
       __set_bit(y, out); \
                 ^
   drivers/net/wireless/ath/ath10k/wmi.h:459:9: error: 'WMI_SERVICE_EXT_RES_CFG_SUPPORT' undeclared (first use in this function)
            WMI_SERVICE_EXT_RES_CFG_SUPPORT, len);
            ^
   drivers/net/wireless/ath/ath10k/wmi.h:398:14: note: in definition of macro 'SVCMAP'
       __set_bit(y, out); \
                 ^
   In file included from include/asm-generic/bug.h:4:0,
                    from arch/x86/include/asm/bug.h:35,
                    from include/linux/bug.h:4,
                    from include/net/mac80211.h:18,
                    from drivers/net/wireless/ath/ath10k/mac.h:21,
                    from drivers/net/wireless/ath/ath10k/mac.c:18:
   drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_add_interface':
   drivers/net/wireless/ath/ath10k/mac.c:4353:16: error: 'WMI_SERVICE_MESH' undeclared (first use in this function)
      if (test_bit(WMI_SERVICE_MESH, ar->wmi.svc_map)) {
                   ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
>> drivers/net/wireless/ath/ath10k/mac.c:4353:3: note: in expansion of macro 'if'
      if (test_bit(WMI_SERVICE_MESH, ar->wmi.svc_map)) {
      ^
>> drivers/net/wireless/ath/ath10k/mac.c:4353:7: note: in expansion of macro 'test_bit'
      if (test_bit(WMI_SERVICE_MESH, ar->wmi.svc_map)) {
          ^

vim +/if +4353 drivers/net/wireless/ath/ath10k/mac.c

  4337	
  4338		switch (vif->type) {
  4339		case NL80211_IFTYPE_P2P_DEVICE:
  4340			arvif->vdev_type = WMI_VDEV_TYPE_STA;
  4341			arvif->vdev_subtype = WMI_VDEV_SUBTYPE_P2P_DEVICE;
  4342			break;
  4343		case NL80211_IFTYPE_UNSPECIFIED:
  4344		case NL80211_IFTYPE_STATION:
  4345			arvif->vdev_type = WMI_VDEV_TYPE_STA;
  4346			if (vif->p2p)
  4347				arvif->vdev_subtype = WMI_VDEV_SUBTYPE_P2P_CLIENT;
  4348			break;
  4349		case NL80211_IFTYPE_ADHOC:
  4350			arvif->vdev_type = WMI_VDEV_TYPE_IBSS;
  4351			break;
  4352		case NL80211_IFTYPE_MESH_POINT:
> 4353			if (test_bit(WMI_SERVICE_MESH, ar->wmi.svc_map)) {
  4354				arvif->vdev_subtype = WMI_VDEV_SUBTYPE_MESH;
  4355			} else if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) {
  4356				ret = -EINVAL;
  4357				ath10k_warn(ar, "must load driver with rawmode=1 to add mesh interfaces\n");
  4358				goto err;
  4359			}
  4360			arvif->vdev_type = WMI_VDEV_TYPE_AP;
  4361			break;

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

Patch

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 6637854..6d151a2 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4361,7 +4361,9 @@  static int ath10k_add_interface(struct ieee80211_hw *hw,
 		arvif->vdev_type = WMI_VDEV_TYPE_IBSS;
 		break;
 	case NL80211_IFTYPE_MESH_POINT:
-		if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) {
+		if (test_bit(WMI_SERVICE_MESH, ar->wmi.svc_map)) {
+			arvif->vdev_subtype = WMI_VDEV_SUBTYPE_MESH;
+		} else if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) {
 			ret = -EINVAL;
 			ath10k_warn(ar, "must load driver with rawmode=1 to add mesh interfaces\n");
 			goto err;