Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 3/4] dt: bindings: add new dt entry for BTCOEX feature in qcom,ath10k.txt
From: c_traja @ 2016-11-08 15:04 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, tamizhchelvam

From: Tamizh chelvam <tamizhchelvam@codeaurora.org>

There two things done in this patch.

1) 'btcoex_support' flag for BTCOEX feature support by the hardware.
2) 'wlan_btcoex_gpio' is used to fill wlan priority pin number for
   BTCOEX priority feature support.

Signed-off-by: Tamizh chelvam <tamizhchelvam@codeaurora.org>
---
 .../bindings/net/wireless/qcom,ath10k.txt          |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
index 74d7f0a..08150e2d 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
@@ -46,6 +46,10 @@ Optional properties:
 				 hw versions.
 - qcom,ath10k-pre-calibration-data : pre calibration data as an array,
 				     the length can vary between hw versions.
+- btcoex_support  : should contain eithr "0" or "1" to indicate btcoex
+		    support by the hardware.
+- btcoex_gpio_pin :  btcoex gpio pin number for the device which
+		     supports BTCOEX.
 
 Example (to supply the calibration data alone):
 
-- 
1.7.9.5

^ permalink raw reply related

* [PATCH 4/4] ath10k: Add support to read btcoex related data from DT
From: c_traja @ 2016-11-08 15:04 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, tamizhchelvam, Tamizh chelvam

From: Tamizh chelvam <c_traja@qti.qualcomm.com>

BTCOEX feature is not supported by all qca40xx chipsets.
Since btcoex enabled by default in firmware, host needs to
enable COEX support depends on the hardware. This patch is
used to read btcoex_support flag and btcoex gpio pin
number from DT. Depends on the btcoex_support flag value
host will expose BTCOEX support and btcoex gpio pin
number to target.

Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/core.c  |   44 ++++++++++++++++++++++++++++++-
 drivers/net/wireless/ath/ath10k/core.h  |    9 +++++++
 drivers/net/wireless/ath/ath10k/debug.c |    3 +++
 drivers/net/wireless/ath/ath10k/mac.c   |    4 ++-
 drivers/net/wireless/ath/ath10k/wmi.c   |    1 +
 drivers/net/wireless/ath/ath10k/wmi.h   |    2 ++
 6 files changed, 61 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 7005e2a..eec2436 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1439,6 +1439,39 @@ static int ath10k_download_cal_data(struct ath10k *ar)
 	return 0;
 }
 
+static void ath10k_core_fetch_btcoex_dt(struct ath10k *ar)
+{
+	struct device_node *node;
+	u32 btcoex_support = 0;
+	int ret;
+
+	node = ar->dev->of_node;
+	if (!node)
+		goto out;
+
+	ret = of_property_read_u32(node, "btcoex_support", &btcoex_support);
+	if (ret) {
+		ar->btcoex_support = ATH10K_DT_BTCOEX_NOT_FOUND;
+		goto out;
+	}
+
+	if (btcoex_support)
+		ar->btcoex_support = ATH10K_DT_BTCOEX_SUPPORTED;
+	else
+		ar->btcoex_support = ATH10K_DT_BTCOEX_NOT_SUPPORTED;
+
+	ret = of_property_read_u32(node, "btcoex_gpio_pin",
+				   &ar->btcoex_gpio_pin);
+	if (ret) {
+		ar->btcoex_gpio_pin = -1;
+		goto out;
+	}
+
+out:
+	ath10k_dbg(ar, ATH10K_DBG_BOOT, "btcoex support flag :%d gpio %d\n",
+		   ar->btcoex_support, ar->btcoex_gpio_pin);
+}
+
 static int ath10k_init_uart(struct ath10k *ar)
 {
 	int ret;
@@ -1920,14 +1953,23 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
 		if (test_bit(WMI_SERVICE_BSS_CHANNEL_INFO_64, ar->wmi.svc_map))
 			val |= WMI_10_4_BSS_CHANNEL_INFO_64;
 
+		ath10k_core_fetch_btcoex_dt(ar);
+
 		/* 10.4 firmware supports BT-Coex without reloading firmware
 		 * via pdev param. To support Bluetooth coexistence pdev param,
 		 * WMI_COEX_GPIO_SUPPORT of extended resource config should be
 		 * enabled always.
 		 */
+
+		/* we can still enable BTCOEX if firmware has the support
+		 * eventhough btceox_support value is
+		 * ATH10K_DT_BTCOEX_NOT_FOUND
+		 */
+
 		if (test_bit(WMI_SERVICE_COEX_GPIO, ar->wmi.svc_map) &&
 		    test_bit(ATH10K_FW_FEATURE_BTCOEX_PARAM,
-			     ar->running_fw->fw_file.fw_features))
+			     ar->running_fw->fw_file.fw_features) &&
+		    ar->btcoex_support != ATH10K_DT_BTCOEX_NOT_SUPPORTED)
 			val |= WMI_10_4_COEX_GPIO_SUPPORT;
 
 		status = ath10k_mac_ext_resource_config(ar, val);
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index b7067cc..66824c73 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -658,6 +658,12 @@ enum ath10k_tx_pause_reason {
 	ATH10K_TX_PAUSE_MAX,
 };
 
+enum ath10k_dt_btcoex_support_flag {
+	ATH10K_DT_BTCOEX_NOT_FOUND,
+	ATH10K_DT_BTCOEX_SUPPORTED,
+	ATH10K_DT_BTCOEX_NOT_SUPPORTED,
+};
+
 struct ath10k_fw_file {
 	const struct firmware *firmware;
 
@@ -926,6 +932,9 @@ struct ath10k {
 		u32 reg_ack_cts_timeout_orig;
 	} fw_coverage;
 
+	enum ath10k_dt_btcoex_support_flag btcoex_support;
+	int btcoex_gpio_pin;
+
 	/* must be last */
 	u8 drv_priv[0] __aligned(sizeof(void *));
 };
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index ea30fbe..e0e316c 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -2149,6 +2149,9 @@ static ssize_t ath10k_write_btcoex(struct file *file,
 	if (strtobool(buf, &val) != 0)
 		return -EINVAL;
 
+	if (ar->btcoex_support == ATH10K_DT_BTCOEX_NOT_SUPPORTED)
+		return -EOPNOTSUPP;
+
 	mutex_lock(&ar->conf_mutex);
 	ret = ath10k_mac_set_btcoex(ar, val);
 	if (!ret)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 6b0f1ea..e021951 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4564,9 +4564,11 @@ static int ath10k_start(struct ieee80211_hw *hw)
 	}
 
 	param = ar->wmi.pdev_param->enable_btcoex;
+
 	if (test_bit(WMI_SERVICE_COEX_GPIO, ar->wmi.svc_map) &&
 	    test_bit(ATH10K_FW_FEATURE_BTCOEX_PARAM,
-		     ar->running_fw->fw_file.fw_features)) {
+		     ar->running_fw->fw_file.fw_features) &&
+	    ar->btcoex_support != ATH10K_DT_BTCOEX_NOT_SUPPORTED) {
 		ret = ath10k_wmi_pdev_set_param(ar, param, 0);
 		if (ret) {
 			ath10k_warn(ar,
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index de35c17..1eb5678 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -7811,6 +7811,7 @@ static int ath10k_wmi_10_4_op_get_vdev_subtype(struct ath10k *ar,
 	cmd = (struct wmi_ext_resource_config_10_4_cmd *)skb->data;
 	cmd->host_platform_config = __cpu_to_le32(type);
 	cmd->fw_feature_bitmap = __cpu_to_le32(fw_feature_bitmap);
+	cmd->btcoex_gpio_pin = __cpu_to_le32(ar->btcoex_gpio_pin);
 
 	ath10k_dbg(ar, ATH10K_DBG_WMI,
 		   "wmi ext resource config host type %d firmware feature bitmap %08x\n",
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 3a739e3..f83a21e 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -2734,6 +2734,8 @@ struct wmi_ext_resource_config_10_4_cmd {
 	__le32 host_platform_config;
 	/* see enum wmi_10_4_feature_mask */
 	__le32 fw_feature_bitmap;
+	/* Contains btcoex gpio pin number */
+	__le32 btcoex_gpio_pin;
 };
 
 struct wmi_set_coex_param_10_4_cmd {
-- 
1.7.9.5

^ permalink raw reply related

* Re: [PATCH 1/4] ath10k: Add support to enable or disable btcoex via nl80211
From: kbuild test robot @ 2016-11-08 22:34 UTC (permalink / raw)
  To: c_traja; +Cc: kbuild-all, ath10k, linux-wireless, tamizhchelvam, Tamizh chelvam
In-Reply-To: <1478617354-28146-2-git-send-email-c_traja@qti.qualcomm.com>

[-- Attachment #1: Type: text/plain, Size: 1971 bytes --]

Hi Tamizh,

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v4.9-rc4 next-20161108]
[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/c_traja-qti-qualcomm-com/ath10k-Add-support-for-BTCOEX-feature/20161109-043718
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> drivers/net/wireless/ath/ath10k/mac.c:7548:2: error: unknown field 'set_btcoex' specified in initializer
     .set_btcoex                     = ath10k_mac_op_set_btcoex,
     ^
>> drivers/net/wireless/ath/ath10k/mac.c:7548:36: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .set_btcoex                     = ath10k_mac_op_set_btcoex,
                                       ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:7548:36: note: (near initialization for 'ath10k_ops.reconfig_complete')
   cc1: some warnings being treated as errors

vim +/set_btcoex +7548 drivers/net/wireless/ath/ath10k/mac.c

  7542		.add_chanctx			= ath10k_mac_op_add_chanctx,
  7543		.remove_chanctx			= ath10k_mac_op_remove_chanctx,
  7544		.change_chanctx			= ath10k_mac_op_change_chanctx,
  7545		.assign_vif_chanctx		= ath10k_mac_op_assign_vif_chanctx,
  7546		.unassign_vif_chanctx		= ath10k_mac_op_unassign_vif_chanctx,
  7547		.switch_vif_chanctx		= ath10k_mac_op_switch_vif_chanctx,
> 7548		.set_btcoex                     = ath10k_mac_op_set_btcoex,
  7549	
  7550		CFG80211_TESTMODE_CMD(ath10k_tm_cmd)
  7551	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 55638 bytes --]

^ permalink raw reply

* Re: [PATCH 2/4] ath10k: Add support to update btcoex priority value via nl80211
From: kbuild test robot @ 2016-11-08 22:54 UTC (permalink / raw)
  To: c_traja; +Cc: kbuild-all, ath10k, linux-wireless, tamizhchelvam, Tamizh chelvam
In-Reply-To: <1478617354-28146-3-git-send-email-c_traja@qti.qualcomm.com>

[-- Attachment #1: Type: text/plain, Size: 10908 bytes --]

Hi Tamizh,

[auto build test ERROR on ath6kl/ath-next]
[cannot apply to v4.9-rc4 next-20161108]
[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/c_traja-qti-qualcomm-com/ath10k-Add-support-for-BTCOEX-feature/20161109-043718
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

>> drivers/net/wireless/ath/ath10k/mac.c:7508:35: warning: 'struct cfg80211_btcoex_priority' declared inside parameter list will not be visible outside of this definition or declaration
    ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority *btcoex_priority)
                                      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_mac_get_btcoex_prio':
>> drivers/net/wireless/ath/ath10k/mac.c:7512:21: error: dereferencing pointer to incomplete type 'struct cfg80211_btcoex_priority'
     if (btcoex_priority->wlan_be_preferred)
                        ^~
>> drivers/net/wireless/ath/ath10k/mac.c:7513:18: error: 'WIPHY_WLAN_BE_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_BE_PREFERRED;
                     ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:7513:18: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/wireless/ath/ath10k/mac.c:7516:18: error: 'WIPHY_WLAN_BK_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_BK_PREFERRED;
                     ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath10k/mac.c:7519:18: error: 'WIPHY_WLAN_VI_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_VI_PREFERRED;
                     ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath10k/mac.c:7522:18: error: 'WIPHY_WLAN_VO_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_VO_PREFERRED;
                     ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath10k/mac.c:7525:18: error: 'WIPHY_WLAN_BEACON_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_BEACON_PREFERRED;
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath10k/mac.c:7528:18: error: 'WIPHY_WLAN_MGMT_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_MGMT_PREFERRED;
                     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c: At top level:
   drivers/net/wireless/ath/ath10k/mac.c:7534:11: warning: 'struct cfg80211_btcoex_priority' declared inside parameter list will not be visible outside of this definition or declaration
       struct cfg80211_btcoex_priority *btcoex_priority)
              ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_mac_op_set_btcoex_priority':
>> drivers/net/wireless/ath/ath10k/mac.c:7553:43: error: passing argument 1 of 'ath10k_mac_get_btcoex_prio' from incompatible pointer type [-Werror=incompatible-pointer-types]
     btcoex_prio = ath10k_mac_get_btcoex_prio(btcoex_priority);
                                              ^~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:7508:1: note: expected 'struct cfg80211_btcoex_priority *' but argument is of type 'struct cfg80211_btcoex_priority *'
    ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority *btcoex_priority)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c: At top level:
   drivers/net/wireless/ath/ath10k/mac.c:7611:2: error: unknown field 'set_btcoex' specified in initializer
     .set_btcoex                     = ath10k_mac_op_set_btcoex,
     ^
   drivers/net/wireless/ath/ath10k/mac.c:7611:36: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .set_btcoex                     = ath10k_mac_op_set_btcoex,
                                       ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:7611:36: note: (near initialization for 'ath10k_ops.reconfig_complete')
>> drivers/net/wireless/ath/ath10k/mac.c:7612:2: error: unknown field 'set_btcoex_priority' specified in initializer
     .set_btcoex_priority  = ath10k_mac_op_set_btcoex_priority,
     ^
   drivers/net/wireless/ath/ath10k/mac.c:7612:26: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .set_btcoex_priority  = ath10k_mac_op_set_btcoex_priority,
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:7612:26: note: (near initialization for 'ath10k_ops.ipv6_addr_change')
   drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_mac_register':
>> drivers/net/wireless/ath/ath10k/mac.c:8203:16: error: 'struct wiphy' has no member named 'btcoex_support_flags'
      ar->hw->wiphy->btcoex_support_flags =
                   ^~
   drivers/net/wireless/ath/ath10k/mac.c:8204:4: error: 'WIPHY_WLAN_BE_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_BE_PREFERRED |
       ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8205:4: error: 'WIPHY_WLAN_BK_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_BK_PREFERRED |
       ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8206:4: error: 'WIPHY_WLAN_VI_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_VI_PREFERRED |
       ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8207:4: error: 'WIPHY_WLAN_VO_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_VO_PREFERRED |
       ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8208:4: error: 'WIPHY_WLAN_BEACON_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_BEACON_PREFERRED |
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8209:4: error: 'WIPHY_WLAN_MGMT_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_MGMT_PREFERRED;
       ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8211:20: error: 'struct wiphy' has no member named 'btcoex_support_flags'
          ar->hw->wiphy->btcoex_support_flags);
                       ^~
   cc1: some warnings being treated as errors

vim +7512 drivers/net/wireless/ath/ath10k/mac.c

  7502		mutex_unlock(&ar->conf_mutex);
  7503	
  7504		return ret;
  7505	}
  7506	
  7507	u32
> 7508	ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority *btcoex_priority)
  7509	{
  7510		u32 btcoex_prio = 0;
  7511	
> 7512		if (btcoex_priority->wlan_be_preferred)
> 7513			btcoex_prio |= WIPHY_WLAN_BE_PREFERRED;
  7514	
  7515		if (btcoex_priority->wlan_bk_preferred)
> 7516			btcoex_prio |= WIPHY_WLAN_BK_PREFERRED;
  7517	
  7518		if (btcoex_priority->wlan_vi_preferred)
> 7519			btcoex_prio |= WIPHY_WLAN_VI_PREFERRED;
  7520	
  7521		if (btcoex_priority->wlan_vo_preferred)
> 7522			btcoex_prio |= WIPHY_WLAN_VO_PREFERRED;
  7523	
  7524		if (btcoex_priority->wlan_beacon_preferred)
> 7525			btcoex_prio |= WIPHY_WLAN_BEACON_PREFERRED;
  7526	
  7527		if (btcoex_priority->wlan_mgmt_preferred)
> 7528			btcoex_prio |= WIPHY_WLAN_MGMT_PREFERRED;
  7529	
  7530		return btcoex_prio;
  7531	}
  7532	
  7533	static int ath10k_mac_op_set_btcoex_priority(struct ieee80211_hw *hw,
  7534				struct cfg80211_btcoex_priority *btcoex_priority)
  7535	{
  7536		u32 btcoex_prio;
  7537		struct ath10k *ar = hw->priv;
  7538		int ret;
  7539	
  7540		if (!(test_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags))) {
  7541			ret = -EINVAL;
  7542			goto exit;
  7543		}
  7544	
  7545		mutex_lock(&ar->conf_mutex);
  7546	
  7547		if (ar->state != ATH10K_STATE_ON &&
  7548		    ar->state != ATH10K_STATE_RESTARTED) {
  7549			ret = -ENETDOWN;
  7550			goto exit;
  7551		}
  7552	
> 7553		btcoex_prio = ath10k_mac_get_btcoex_prio(btcoex_priority);
  7554	
  7555		if (btcoex_prio > 0x3f)
  7556			return -E2BIG;
  7557	
  7558		ret = ath10k_wmi_set_coex_param(ar, btcoex_prio);
  7559	
  7560		if (ret) {
  7561			ath10k_warn(ar, "failed to set btcoex priority: %d\n", ret);
  7562			goto exit;
  7563		}
  7564	
  7565	exit:
  7566		mutex_unlock(&ar->conf_mutex);
  7567		return ret;
  7568	}
  7569	
  7570	static const struct ieee80211_ops ath10k_ops = {
  7571		.tx				= ath10k_mac_op_tx,
  7572		.wake_tx_queue			= ath10k_mac_op_wake_tx_queue,
  7573		.start				= ath10k_start,
  7574		.stop				= ath10k_stop,
  7575		.config				= ath10k_config,
  7576		.add_interface			= ath10k_add_interface,
  7577		.remove_interface		= ath10k_remove_interface,
  7578		.configure_filter		= ath10k_configure_filter,
  7579		.bss_info_changed		= ath10k_bss_info_changed,
  7580		.set_coverage_class		= ath10k_mac_op_set_coverage_class,
  7581		.hw_scan			= ath10k_hw_scan,
  7582		.cancel_hw_scan			= ath10k_cancel_hw_scan,
  7583		.set_key			= ath10k_set_key,
  7584		.set_default_unicast_key        = ath10k_set_default_unicast_key,
  7585		.sta_state			= ath10k_sta_state,
  7586		.conf_tx			= ath10k_conf_tx,
  7587		.remain_on_channel		= ath10k_remain_on_channel,
  7588		.cancel_remain_on_channel	= ath10k_cancel_remain_on_channel,
  7589		.set_rts_threshold		= ath10k_set_rts_threshold,
  7590		.set_frag_threshold		= ath10k_mac_op_set_frag_threshold,
  7591		.flush				= ath10k_flush,
  7592		.tx_last_beacon			= ath10k_tx_last_beacon,
  7593		.set_antenna			= ath10k_set_antenna,
  7594		.get_antenna			= ath10k_get_antenna,
  7595		.reconfig_complete		= ath10k_reconfig_complete,
  7596		.get_survey			= ath10k_get_survey,
  7597		.set_bitrate_mask		= ath10k_mac_op_set_bitrate_mask,
  7598		.sta_rc_update			= ath10k_sta_rc_update,
  7599		.get_tsf			= ath10k_get_tsf,
  7600		.set_tsf			= ath10k_set_tsf,
  7601		.ampdu_action			= ath10k_ampdu_action,
  7602		.get_et_sset_count		= ath10k_debug_get_et_sset_count,
  7603		.get_et_stats			= ath10k_debug_get_et_stats,
  7604		.get_et_strings			= ath10k_debug_get_et_strings,
  7605		.add_chanctx			= ath10k_mac_op_add_chanctx,
  7606		.remove_chanctx			= ath10k_mac_op_remove_chanctx,
  7607		.change_chanctx			= ath10k_mac_op_change_chanctx,
  7608		.assign_vif_chanctx		= ath10k_mac_op_assign_vif_chanctx,
  7609		.unassign_vif_chanctx		= ath10k_mac_op_unassign_vif_chanctx,
  7610		.switch_vif_chanctx		= ath10k_mac_op_switch_vif_chanctx,
> 7611		.set_btcoex                     = ath10k_mac_op_set_btcoex,
> 7612		.set_btcoex_priority		= ath10k_mac_op_set_btcoex_priority,
  7613	
  7614		CFG80211_TESTMODE_CMD(ath10k_tm_cmd)
  7615	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 55638 bytes --]

^ permalink raw reply

* Re: [PATCH 1/4] ath10k: Add support to enable or disable btcoex via nl80211
From: kbuild test robot @ 2016-11-08 23:20 UTC (permalink / raw)
  To: c_traja; +Cc: kbuild-all, ath10k, linux-wireless, tamizhchelvam, Tamizh chelvam
In-Reply-To: <1478617354-28146-2-git-send-email-c_traja@qti.qualcomm.com>

[-- Attachment #1: Type: text/plain, Size: 2569 bytes --]

Hi Tamizh,

[auto build test WARNING on ath6kl/ath-next]
[also build test WARNING on v4.9-rc4 next-20161108]
[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/c_traja-qti-qualcomm-com/ath10k-Add-support-for-BTCOEX-feature/20161109-043718
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   drivers/net/wireless/ath/ath10k/mac.c:7548:2: error: unknown field 'set_btcoex' specified in initializer
     .set_btcoex                     = ath10k_mac_op_set_btcoex,
     ^
>> drivers/net/wireless/ath/ath10k/mac.c:7548:2: warning: initialization from incompatible pointer type
   drivers/net/wireless/ath/ath10k/mac.c:7548:2: warning: (near initialization for 'ath10k_ops.reconfig_complete')

vim +7548 drivers/net/wireless/ath/ath10k/mac.c

  7532		.reconfig_complete		= ath10k_reconfig_complete,
  7533		.get_survey			= ath10k_get_survey,
  7534		.set_bitrate_mask		= ath10k_mac_op_set_bitrate_mask,
  7535		.sta_rc_update			= ath10k_sta_rc_update,
  7536		.get_tsf			= ath10k_get_tsf,
  7537		.set_tsf			= ath10k_set_tsf,
  7538		.ampdu_action			= ath10k_ampdu_action,
  7539		.get_et_sset_count		= ath10k_debug_get_et_sset_count,
  7540		.get_et_stats			= ath10k_debug_get_et_stats,
  7541		.get_et_strings			= ath10k_debug_get_et_strings,
  7542		.add_chanctx			= ath10k_mac_op_add_chanctx,
  7543		.remove_chanctx			= ath10k_mac_op_remove_chanctx,
  7544		.change_chanctx			= ath10k_mac_op_change_chanctx,
  7545		.assign_vif_chanctx		= ath10k_mac_op_assign_vif_chanctx,
  7546		.unassign_vif_chanctx		= ath10k_mac_op_unassign_vif_chanctx,
  7547		.switch_vif_chanctx		= ath10k_mac_op_switch_vif_chanctx,
> 7548		.set_btcoex                     = ath10k_mac_op_set_btcoex,
  7549	
  7550		CFG80211_TESTMODE_CMD(ath10k_tm_cmd)
  7551	
  7552	#ifdef CONFIG_PM
  7553		.suspend			= ath10k_wow_op_suspend,
  7554		.resume				= ath10k_wow_op_resume,
  7555	#endif
  7556	#ifdef CONFIG_MAC80211_DEBUGFS

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 46112 bytes --]

^ permalink raw reply

* Re: [PATCH 2/4] ath10k: Add support to update btcoex priority value via nl80211
From: kbuild test robot @ 2016-11-08 23:49 UTC (permalink / raw)
  To: c_traja; +Cc: kbuild-all, ath10k, linux-wireless, tamizhchelvam, Tamizh chelvam
In-Reply-To: <1478617354-28146-3-git-send-email-c_traja@qti.qualcomm.com>

[-- Attachment #1: Type: text/plain, Size: 8521 bytes --]

Hi Tamizh,

[auto build test ERROR on ath6kl/ath-next]
[cannot apply to v4.9-rc4 next-20161108]
[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/c_traja-qti-qualcomm-com/ath10k-Add-support-for-BTCOEX-feature/20161109-043718
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

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

>> drivers/net/wireless/ath/ath10k/mac.c:7508:35: warning: 'struct cfg80211_btcoex_priority' declared inside parameter list
    ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority *btcoex_priority)
                                      ^
>> drivers/net/wireless/ath/ath10k/mac.c:7508:35: warning: its scope is only this definition or declaration, which is probably not what you want
   drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_mac_get_btcoex_prio':
>> drivers/net/wireless/ath/ath10k/mac.c:7512:21: error: dereferencing pointer to incomplete type
     if (btcoex_priority->wlan_be_preferred)
                        ^
   drivers/net/wireless/ath/ath10k/mac.c:7513:18: error: 'WIPHY_WLAN_BE_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_BE_PREFERRED;
                     ^
   drivers/net/wireless/ath/ath10k/mac.c:7513:18: note: each undeclared identifier is reported only once for each function it appears in
   drivers/net/wireless/ath/ath10k/mac.c:7515:21: error: dereferencing pointer to incomplete type
     if (btcoex_priority->wlan_bk_preferred)
                        ^
   drivers/net/wireless/ath/ath10k/mac.c:7516:18: error: 'WIPHY_WLAN_BK_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_BK_PREFERRED;
                     ^
   drivers/net/wireless/ath/ath10k/mac.c:7518:21: error: dereferencing pointer to incomplete type
     if (btcoex_priority->wlan_vi_preferred)
                        ^
   drivers/net/wireless/ath/ath10k/mac.c:7519:18: error: 'WIPHY_WLAN_VI_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_VI_PREFERRED;
                     ^
   drivers/net/wireless/ath/ath10k/mac.c:7521:21: error: dereferencing pointer to incomplete type
     if (btcoex_priority->wlan_vo_preferred)
                        ^
   drivers/net/wireless/ath/ath10k/mac.c:7522:18: error: 'WIPHY_WLAN_VO_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_VO_PREFERRED;
                     ^
   drivers/net/wireless/ath/ath10k/mac.c:7524:21: error: dereferencing pointer to incomplete type
     if (btcoex_priority->wlan_beacon_preferred)
                        ^
   drivers/net/wireless/ath/ath10k/mac.c:7525:18: error: 'WIPHY_WLAN_BEACON_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_BEACON_PREFERRED;
                     ^
   drivers/net/wireless/ath/ath10k/mac.c:7527:21: error: dereferencing pointer to incomplete type
     if (btcoex_priority->wlan_mgmt_preferred)
                        ^
   drivers/net/wireless/ath/ath10k/mac.c:7528:18: error: 'WIPHY_WLAN_MGMT_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_MGMT_PREFERRED;
                     ^
   drivers/net/wireless/ath/ath10k/mac.c: At top level:
   drivers/net/wireless/ath/ath10k/mac.c:7534:11: warning: 'struct cfg80211_btcoex_priority' declared inside parameter list
       struct cfg80211_btcoex_priority *btcoex_priority)
              ^
   drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_mac_op_set_btcoex_priority':
>> drivers/net/wireless/ath/ath10k/mac.c:7553:16: warning: passing argument 1 of 'ath10k_mac_get_btcoex_prio' from incompatible pointer type
     btcoex_prio = ath10k_mac_get_btcoex_prio(btcoex_priority);
                   ^
   drivers/net/wireless/ath/ath10k/mac.c:7508:1: note: expected 'struct cfg80211_btcoex_priority *' but argument is of type 'struct cfg80211_btcoex_priority *'
    ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority *btcoex_priority)
    ^
   drivers/net/wireless/ath/ath10k/mac.c: At top level:
   drivers/net/wireless/ath/ath10k/mac.c:7611:2: error: unknown field 'set_btcoex' specified in initializer
     .set_btcoex                     = ath10k_mac_op_set_btcoex,
     ^
   drivers/net/wireless/ath/ath10k/mac.c:7611:2: warning: initialization from incompatible pointer type
   drivers/net/wireless/ath/ath10k/mac.c:7611:2: warning: (near initialization for 'ath10k_ops.reconfig_complete')
   drivers/net/wireless/ath/ath10k/mac.c:7612:2: error: unknown field 'set_btcoex_priority' specified in initializer
     .set_btcoex_priority  = ath10k_mac_op_set_btcoex_priority,
     ^
   drivers/net/wireless/ath/ath10k/mac.c:7612:2: warning: initialization from incompatible pointer type
   drivers/net/wireless/ath/ath10k/mac.c:7612:2: warning: (near initialization for 'ath10k_ops.ipv6_addr_change')
   drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_mac_register':
   drivers/net/wireless/ath/ath10k/mac.c:8203:16: error: 'struct wiphy' has no member named 'btcoex_support_flags'
      ar->hw->wiphy->btcoex_support_flags =
                   ^
   drivers/net/wireless/ath/ath10k/mac.c:8204:4: error: 'WIPHY_WLAN_BE_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_BE_PREFERRED |
       ^
   drivers/net/wireless/ath/ath10k/mac.c:8205:4: error: 'WIPHY_WLAN_BK_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_BK_PREFERRED |
       ^
   drivers/net/wireless/ath/ath10k/mac.c:8206:4: error: 'WIPHY_WLAN_VI_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_VI_PREFERRED |
       ^
   drivers/net/wireless/ath/ath10k/mac.c:8207:4: error: 'WIPHY_WLAN_VO_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_VO_PREFERRED |
       ^
   drivers/net/wireless/ath/ath10k/mac.c:8208:4: error: 'WIPHY_WLAN_BEACON_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_BEACON_PREFERRED |
       ^
   drivers/net/wireless/ath/ath10k/mac.c:8209:4: error: 'WIPHY_WLAN_MGMT_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_MGMT_PREFERRED;
       ^
   drivers/net/wireless/ath/ath10k/mac.c:8211:20: error: 'struct wiphy' has no member named 'btcoex_support_flags'
          ar->hw->wiphy->btcoex_support_flags);
                       ^

vim +7512 drivers/net/wireless/ath/ath10k/mac.c

  7502		mutex_unlock(&ar->conf_mutex);
  7503	
  7504		return ret;
  7505	}
  7506	
  7507	u32
> 7508	ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority *btcoex_priority)
  7509	{
  7510		u32 btcoex_prio = 0;
  7511	
> 7512		if (btcoex_priority->wlan_be_preferred)
  7513			btcoex_prio |= WIPHY_WLAN_BE_PREFERRED;
  7514	
  7515		if (btcoex_priority->wlan_bk_preferred)
  7516			btcoex_prio |= WIPHY_WLAN_BK_PREFERRED;
  7517	
  7518		if (btcoex_priority->wlan_vi_preferred)
  7519			btcoex_prio |= WIPHY_WLAN_VI_PREFERRED;
  7520	
  7521		if (btcoex_priority->wlan_vo_preferred)
  7522			btcoex_prio |= WIPHY_WLAN_VO_PREFERRED;
  7523	
  7524		if (btcoex_priority->wlan_beacon_preferred)
  7525			btcoex_prio |= WIPHY_WLAN_BEACON_PREFERRED;
  7526	
  7527		if (btcoex_priority->wlan_mgmt_preferred)
> 7528			btcoex_prio |= WIPHY_WLAN_MGMT_PREFERRED;
  7529	
  7530		return btcoex_prio;
  7531	}
  7532	
  7533	static int ath10k_mac_op_set_btcoex_priority(struct ieee80211_hw *hw,
  7534				struct cfg80211_btcoex_priority *btcoex_priority)
  7535	{
  7536		u32 btcoex_prio;
  7537		struct ath10k *ar = hw->priv;
  7538		int ret;
  7539	
  7540		if (!(test_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags))) {
  7541			ret = -EINVAL;
  7542			goto exit;
  7543		}
  7544	
  7545		mutex_lock(&ar->conf_mutex);
  7546	
  7547		if (ar->state != ATH10K_STATE_ON &&
  7548		    ar->state != ATH10K_STATE_RESTARTED) {
  7549			ret = -ENETDOWN;
  7550			goto exit;
  7551		}
  7552	
> 7553		btcoex_prio = ath10k_mac_get_btcoex_prio(btcoex_priority);
  7554	
  7555		if (btcoex_prio > 0x3f)
  7556			return -E2BIG;

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 46112 bytes --]

^ permalink raw reply

* Re: [3/3] rsi: Updated boot parameters
From: Kalle Valo @ 2016-11-09  1:08 UTC (permalink / raw)
  To: Prameela Rani Garnepudi
  Cc: linux-wireless, johannes.berg, hofrat, xypron.glpk,
	prameela.garnepudi, Prameela Rani Garnepudi
In-Reply-To: <1476358025-15576-1-git-send-email-prameela.j04cs@gmail.com>

Prameela Rani Garnepudi <prameela.j04cs@gmail.com> wrote:
> * Switch clock info is divided in to different clock information fields for
>   readability and synchronization with firmware code.
> * Other parameters are added for future use and to make the frame size in sync
>   with latest firmware. Otherwise firmware will discard the frame considering
>   corrupted frame.
> 
> Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>

This looks broken and no reply to my comment.

Patch set to Changes Requested.

-- 
https://patchwork.kernel.org/patch/9374883/

Documentation about submitting wireless patches and checking status
from patchwork:

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

^ permalink raw reply

* Re: [1/2] rsi: New firware loading method for RSI 91X devices
From: Kalle Valo @ 2016-11-09  1:15 UTC (permalink / raw)
  To: Prameela Rani Garnepudi
  Cc: linux-wireless, johannes.berg, hofrat, xypron.glpk,
	prameela.garnepudi, Prameela Rani Garnepudi
In-Reply-To: <1477044595-10348-1-git-send-email-prameela.j04cs@gmail.com>

Prameela Rani Garnepudi <prameela.j04cs@gmail.com> wrote:
> RSI deprecated the old firmware loading method and introduced
> new method using soft boot loader for 9113 chipsets.
> Current driver only supports 9113 device model hence firmware
> loading method has been changed.
> 
> In the new method, complete RAM image and flash image are present
> in the flash. Two firmwares present in the device, Boot loader firmware
> and functional firmware. Boot loader firmware is fixed but functional
> firmware can be changed. Before loading the functional firmware, host
> issues commands to check whether existing firmware in the chip and the
> firmware file content to load are same or not. If not, host issues
> commands to load the RAM image and then boot loaded switches to the
> functioanl firmware.
> 
> Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>

These two patches are quite big, difficult to review. Smaller changes
would help with that. Will review later.

2 patches set to Deferred.

9388629 [1/2] rsi: New firware loading method for RSI 91X devices
9388627 [2/2] rsi: Device initialization sequence is changed

-- 
https://patchwork.kernel.org/patch/9388629/

Documentation about submitting wireless patches and checking status
from patchwork:

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

^ permalink raw reply

* Re: [PATCH] wireless: fix bogus maybe-uninitialized warning
From: Kalle Valo @ 2016-11-09  1:21 UTC (permalink / raw)
  To: Arnd Bergmann, Johannes Berg
  Cc: Stanislav Yakovlev, Jouni Malinen, David S. Miller,
	linux-wireless, netdev, linux-kernel
In-Reply-To: <20161024153918.2810634-2-arnd@arndb.de>

Arnd Bergmann <arnd@arndb.de> writes:

> The hostap_80211_rx() function is supposed to set up the mac addresses
> for four possible cases, based on two bits of input data. For
> some reason, gcc decides that it's possible that none of the these
> four cases apply and the addresses remain uninitialized:
>
> drivers/net/wireless/intersil/hostap/hostap_80211_rx.c: In function =E2=
=80=98hostap_80211_rx=E2=80=99:
> arch/x86/include/asm/string_32.h:77:14: warning: =E2=80=98src=E2=80=99 ma=
y be used uninitialized in this function [-Wmaybe-uninitialized]
> drivers/net/wireless/intel/ipw2x00/libipw_rx.c: In function =E2=80=98libi=
pw_rx=E2=80=99:
> arch/x86/include/asm/string_32.h:77:14: error: =E2=80=98dst=E2=80=99 may =
be used uninitialized in this function [-Werror=3Dmaybe-uninitialized]
> arch/x86/include/asm/string_32.h:78:22: error: =E2=80=98*((void *)&dst+4)=
=E2=80=99 may be used uninitialized in this function [-Werror=3Dmaybe-unini=
tialized]
>
> This warning is clearly nonsense, but changing the last case into
> 'default' makes it obvious to the compiler too, which avoids the
> warning and probably leads to better object code too.
>
> The same code is duplicated several times in the kernel, so this
> patch uses the same workaround for all copies. The exact configuration
> was hit only very rarely in randconfig builds and I only saw it
> in three drivers, but I assume that all of them are potentially
> affected, and it's better to keep the code consistent.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/net/wireless/ath/ath6kl/wmi.c                  | 8 ++++----
>  drivers/net/wireless/intel/ipw2x00/libipw_rx.c         | 2 +-
>  drivers/net/wireless/intersil/hostap/hostap_80211_rx.c | 2 +-
>  net/wireless/lib80211_crypt_tkip.c                     | 2 +-
>  4 files changed, 7 insertions(+), 7 deletions(-)

[...]

> --- a/net/wireless/lib80211_crypt_tkip.c
> +++ b/net/wireless/lib80211_crypt_tkip.c
> @@ -556,7 +556,7 @@ static void michael_mic_hdr(struct sk_buff *skb, u8 *=
 hdr)
>  		memcpy(hdr, hdr11->addr3, ETH_ALEN);	/* DA */
>  		memcpy(hdr + ETH_ALEN, hdr11->addr4, ETH_ALEN);	/* SA */
>  		break;
> -	case 0:
> +	default:
>  		memcpy(hdr, hdr11->addr1, ETH_ALEN);	/* DA */
>  		memcpy(hdr + ETH_ALEN, hdr11->addr2, ETH_ALEN);	/* SA */
>  		break;

Ideally we prefer that drivers/net/wireless and net/wireless changes are
split into different patches as they get applied to different trees.
Johannes, is it ok if I take this change through my tree this time?

--=20
Kalle Valo

^ permalink raw reply

* Re: [v2] rt2x00: add support for mac addr from device tree
From: Kalle Valo @ 2016-11-09  1:29 UTC (permalink / raw)
  To: Mathias Kresin; +Cc: linux-wireless
In-Reply-To: <1472195813-30471-1-git-send-email-dev@kresin.me>

Mathias Kresin <dev@kresin.me> wrote:
> On some devices the EEPROMs of Ralink Wi-Fi chips have a default Ralink
> MAC address set (RT3062F: 00:0C:43:30:62:00, RT3060F:
> 00:0C:43:30:60:00). Using multiple of these devices in the same network
> can cause nasty issues.
> 
> Allow to override the MAC in the EEPROM with (a known good) one set in
> the device tree to bypass the issue.
> 
> Signed-off-by: Mathias Kresin <dev@kresin.me>
> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>

Patch applied to wireless-drivers-next.git, thanks.

9766cb709089 rt2x00: add support for mac addr from device tree

-- 
https://patchwork.kernel.org/patch/9300893/

Documentation about submitting wireless patches and checking status
from patchwork:

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

^ permalink raw reply

* Re: brcmfmac: proto: add callback for queuing TX data
From: Kalle Valo @ 2016-11-09  1:30 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman,
	Pieter-Paul Giesberts, Franky Lin, linux-wireless,
	brcm80211-dev-list.pdl, netdev, linux-kernel,
	Rafał Miłecki
In-Reply-To: <20160926215144.9923-1-zajec5@gmail.com>

Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> So far our core code was calling brcmf_fws_process_skb which wasn't
> a proper thing to do. If case of devices using msgbuf protocol fwsignal
> shouldn't be used. It was an unnecessary extra layer simply calling
> a protocol specifix txdata function.
> 
> Please note we already have txdata callback, but it's used for calls
> between bcdc and fwsignal so it couldn't be simply used there.
> 
> This makes core code more generic (instead of bcdc/fwsignal specific).
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

Patch applied to wireless-drivers-next.git, thanks.

b073ac1fcf42 brcmfmac: proto: add callback for queuing TX data

-- 
https://patchwork.kernel.org/patch/9351305/

Documentation about submitting wireless patches and checking status
from patchwork:

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

^ permalink raw reply

* Re: [1/8] mwifiex: prevent register accesses after host is sleeping
From: Kalle Valo @ 2016-11-09  1:34 UTC (permalink / raw)
  To: Amitkumar Karwar
  Cc: linux-wireless, Cathy Luo, Nishant Sarmukadam, Amitkumar Karwar
In-Reply-To: <1475066908-11771-1-git-send-email-akarwar@marvell.com>

Amitkumar Karwar <akarwar@marvell.com> wrote:
> Following is mwifiex driver-firmware host sleep handshake.
> It involves three threads. suspend handler, interrupt handler, interrupt
> processing in main work queue.
> 
> 1) Enter suspend handler
> 2) Download HS_CFG command
> 3) Response from firmware for HS_CFG
> 4) Suspend thread waits until handshake completes(i.e hs_activate becomes
>    true)
> 5) SLEEP from firmware
> 6) SLEEP confirm downloaded to firmware.
> 7) SLEEP confirm response from firmware
> 8) Driver processes SLEEP confirm response and set hs_activate to wake up
> suspend thread
> 9) Exit suspend handler
> 10) Read sleep cookie in loop and wait until it indicates firmware is
> sleep.
> 11) After processing SLEEP confirm response, we are at the end of interrupt
> processing routine. Recheck if there are interrupts received while we were
> processing them.
> 
> During suspend-resume stress test, it's been observed that we may end up
> acessing PCIe hardware(in 10 and 11) when PCIe bus is closed which leads
> to a kernel crash.
> 
> This patch solves the problem with below changes.
> a) action 10 above can be done before 8
> b) Skip 11 if hs_activated is true. SLEEP confirm response
> is the last interrupt from firmware. No need to recheck for
> pending interrupts.
> c) Add flush_workqueue() in suspend handler.
> 
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> Reviewed-by: Brian Norris <briannorris@chromium.org>
> Tested-by: Brian Norris <briannorris@chromium.org>

8 patches applied to wireless-drivers-next.git, thanks.

ec815dd2a5f1 mwifiex: prevent register accesses after host is sleeping
5190f2e40591 mwifiex: report error to PCIe for suspend failure
c44c040300d7 mwifiex: Fix NULL pointer dereference in skb_dequeue()
113630b581d6 mwifiex: vendor_ie length check for parse WMM IEs
a936ea543657 mwifiex: add memrw command information in README
77f486c8bb39 mwifiex: update tx_pkts_queued for requeued packets
49abe5c83cd0 mwifiex: fix command timeout problem seen in stress tests
3d8bd85c2c9e mwifiex: fix p2p device doesn't find in scan problem

-- 
https://patchwork.kernel.org/patch/9353809/

Documentation about submitting wireless patches and checking status
from patchwork:

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

^ permalink raw reply

* Re: [-next] mwifiex: fix missing destroy_workqueue() on error in mwifiex_add_virtual_intf()
From: Kalle Valo @ 2016-11-09  1:34 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Amitkumar Karwar, Nishant Sarmukadam, Wei Yongjun, linux-wireless
In-Reply-To: <1475161076-1409-1-git-send-email-weiyj.lk@gmail.com>

Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Add the missing destroy_workqueue() before return from
> mwifiex_add_virtual_intf() in the error handling case.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Patch applied to wireless-drivers-next.git, thanks.

424342ff0e03 mwifiex: fix missing destroy_workqueue() on error in mwifiex_add_virtual_intf()

-- 
https://patchwork.kernel.org/patch/9356567/

Documentation about submitting wireless patches and checking status
from patchwork:

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

^ permalink raw reply

* Re: [v2] cw1200: Don't leak memory if krealloc failes
From: Kalle Valo @ 2016-11-09  1:37 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: Solomon Peachy, linux-wireless, netdev, linux-kernel,
	Johannes Thumshirn, Johannes Berg
In-Reply-To: <1475239157-16448-1-git-send-email-jthumshirn@suse.de>

Johannes Thumshirn <jthumshirn@suse.de> wrote:
> The call to krealloc() in wsm_buf_reserve() directly assigns the newly
> returned memory to buf->begin. This is all fine except when krealloc()
> failes we loose the ability to free the old memory pointed to by
> buf->begin. If we just create a temporary variable to assign memory to
> and assign the memory to it we can mitigate the memory leak.
> 
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> Cc: Johannes Berg <johannes@sipsolutions.net>

Patch applied to wireless-drivers-next.git, thanks.

9afdd6128c39 cw1200: Don't leak memory if krealloc failes

-- 
https://patchwork.kernel.org/patch/9358185/

Documentation about submitting wireless patches and checking status
from patchwork:

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

^ permalink raw reply

* make-wifi-fast linuxplumbers talk summarized on lwn.net
From: Dave Taht @ 2016-11-09  1:59 UTC (permalink / raw)
  To: linux-wireless, make-wifi-fast, bloat

and available here:

https://lwn.net/SubscriberLink/705884/1bdb9c4aa048b0d5/

After the talk I discussed with several folk about applying the same
debloating techniques to other chipsets.

I don't remember, unfortunately, who all those folk were, nor the
candidate chipsets!

--=20
Dave T=C3=A4ht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org

^ permalink raw reply

* Re: [v5] ath9k: Switch to using mac80211 intermediate software queues.
From: Kalle Valo @ 2016-11-09  2:22 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen
  Cc: make-wifi-fast, linux-wireless, Toke Høiland-Jørgensen,
	Tim Shepard, Felix Fietkau
In-Reply-To: <20160902140030.11798-1-toke@toke.dk>

Toke Høiland-Jørgensen wrote:
> This switches ath9k over to using the mac80211 intermediate software
> queueing mechanism for data packets. It removes the queueing inside the
> driver, except for the retry queue, and instead pulls from mac80211 when
> a packet is needed. The retry queue is used to store a packet that was
> pulled but can't be sent immediately.
> 
> The old code path in ath_tx_start that would queue packets has been
> removed completely, as has the qlen limit tunables (since there's no
> longer a queue in the driver to limit).
> 
> Based on Tim's original patch set, but reworked quite thoroughly.
> 
> Cc: Tim Shepard <shep@alum.mit.edu>
> Cc: Felix Fietkau <nbd@nbd.name>
> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
> Signed-off-by: Felix Fietkau <nbd@nbd.name>

All dependencies have trickled down to ath.git but unfortunately doesn't apply
anymore, so please rebase. Hopefully the last time :)

While at it, could you also add to the commit log some info how awesome this
patch is from user's point of view and how it helps. For example, before and
and after numbers and other results.

error: patch failed: drivers/net/wireless/ath/ath9k/xmit.c:921
error: drivers/net/wireless/ath/ath9k/xmit.c: patch does not apply
stg import: Diff does not apply cleanly

Patch set to Changes Requested.

-- 
https://patchwork.kernel.org/patch/9311037/

Documentation about submitting wireless patches and checking status
from patchwork:

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

^ permalink raw reply

* [PATCH] mwifiex: printk() overflow with 32-byte SSIDs
From: Brian Norris @ 2016-11-09  2:28 UTC (permalink / raw)
  To: Amitkumar Karwar, Nishant Sarmukadam, Kalle Valo
  Cc: linux-kernel, linux-wireless, Cathy Luo, security, stable,
	Brian Norris

SSIDs aren't guaranteed to be 0-terminated. Let's cap the max length
when we print them out.

This can be easily noticed by connecting to a network with a 32-octet
SSID:

[ 3903.502925] mwifiex_pcie 0000:01:00.0: info: trying to associate to
'0123456789abcdef0123456789abcdef <uninitialized mem>' bssid
xx:xx:xx:xx:xx:xx

Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Cc: <stable@vger.kernel.org>
---
 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index 39ce76ad00bc..16241d21727b 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -2222,8 +2222,9 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len,
 			is_scanning_required = 1;
 		} else {
 			mwifiex_dbg(priv->adapter, MSG,
-				    "info: trying to associate to '%s' bssid %pM\n",
-				    (char *)req_ssid.ssid, bss->bssid);
+				    "info: trying to associate to '%.*s' bssid %pM\n",
+				    req_ssid.ssid_len, (char *)req_ssid.ssid,
+				    bss->bssid);
 			memcpy(&priv->cfg_bssid, bss->bssid, ETH_ALEN);
 			break;
 		}
@@ -2283,8 +2284,8 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
 	}
 
 	mwifiex_dbg(adapter, INFO,
-		    "info: Trying to associate to %s and bssid %pM\n",
-		    (char *)sme->ssid, sme->bssid);
+		    "info: Trying to associate to %.*s and bssid %pM\n",
+		    (int)sme->ssid_len, (char *)sme->ssid, sme->bssid);
 
 	if (!mwifiex_stop_bg_scan(priv))
 		cfg80211_sched_scan_stopped_rtnl(priv->wdev.wiphy);
@@ -2417,8 +2418,8 @@ mwifiex_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
 	}
 
 	mwifiex_dbg(priv->adapter, MSG,
-		    "info: trying to join to %s and bssid %pM\n",
-		    (char *)params->ssid, params->bssid);
+		    "info: trying to join to %.*s and bssid %pM\n",
+		    params->ssid_len, (char *)params->ssid, params->bssid);
 
 	mwifiex_set_ibss_params(priv, params);
 
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related

* Re: [v5] ath9k: Switch to using mac80211 intermediate software queues.
From: Tim Shepard @ 2016-11-09  2:44 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Toke Høiland-Jørgensen, make-wifi-fast, linux-wireless,
	Felix Fietkau
In-Reply-To: <1cd07522568b40a6a3e2db6170153c74@euamsexm01a.eu.qualcomm.com>



> While at it, could you also add to the commit log some info how awesome this
> patch is from user's point of view and how it helps. For example, before and
> and after numbers and other results.

That varies wildly, depending on many details of the scenario
(including the wireless capabilities of the clients connected to the
AP using this patch, and how far away those clients are).  There's
really not enough room in a commit message to explain enough to make
any such claimed numbers reproducible.

And, BTW, this patch alone is not really where the big improvement
comes from.  This just cuts ath9k over to use the new
transmit-a-packet interface between the mac80211 layer and the
wireless device driver.  All the good work to improve latency is being
done on the new mac80211 interface to the driver to transmit a packet.
If you want numbers in a commit message, those numbers belong over on
those commits, not on this ath9k commit, IMHO.

And there's different patches that taken together achieve the best
improvement, and in various subsets differing amounts of improvement,
which again all depends on the scenarios.

And all this is complicated by how often real users are involved in
scenarios where this matters (hard to say).


This mainly improves things when you have an ath9k interface with
packets queued simultaneously to different wireless destinations,
which is typically when the ath9k interface is serving as an AP.

And I would expect similar improvements for any wireless driver cut
over to use the new mac80211 interface.  (This patch might be a
helpful guide to other wireless driver maintainers wishing to see the
same improvements other wireless drivers.)

I hope that the above paragraphs were helpful.

			-Tim Shepard
			 shep@alum.mit.edu

^ permalink raw reply

* [PATCH] mwifiex: fix memory leak in mwifiex_save_hidden_ssid_channels()
From: Ricky Liang @ 2016-11-09  3:37 UTC (permalink / raw)
  Cc: Ricky Liang, Amitkumar Karwar, Nishant Sarmukadam, Kalle Valo,
	open list:MARVELL MWIFIEX WIRELESS DRIVER,
	open list:NETWORKING DRIVERS, open list

kmemleak reports memory leak in mwifiex_save_hidden_ssid_channels():

unreferenced object 0xffffffc0a2914780 (size 192):
  comm "ksdioirqd/mmc2", pid 2004, jiffies 4307182506 (age 820.684s)
  hex dump (first 32 bytes):
    00 06 47 49 4e 2d 32 67 01 03 c8 60 6c 03 01 40  ..GIN-2g...`l..@
    07 10 54 57 20 34 04 1e 64 05 24 84 03 24 95 04  ..TW 4..d.$..$..
  backtrace:
    [<ffffffc0003375f4>] create_object+0x164/0x2b4
    [<ffffffc0008e3530>] kmemleak_alloc+0x50/0x88
    [<ffffffc000335120>] __kmalloc_track_caller+0x1bc/0x264
    [<ffffffc00030899c>] kmemdup+0x38/0x64
    [<ffffffbffc2311cc>] mwifiex_fill_new_bss_desc+0x3c/0x130 [mwifiex]
    [<ffffffbffc22ee9c>] mwifiex_save_curr_bcn+0x4ec/0x640 [mwifiex]
    [<ffffffbffc22f45c>] mwifiex_handle_event_ext_scan_report+0x1d4/0x268 [mwifiex]
    [<ffffffbffc2375d0>] mwifiex_process_sta_event+0x378/0x898 [mwifiex]
    [<ffffffbffc224dc8>] mwifiex_process_event+0x1a8/0x1e8 [mwifiex]
    [<ffffffbffc2228f0>] mwifiex_main_process+0x258/0x534 [mwifiex]
    [<ffffffbffc258858>] 0xffffffbffc258858
    [<ffffffc00071ee90>] process_sdio_pending_irqs+0xf8/0x160
    [<ffffffc00071efdc>] sdio_irq_thread+0x9c/0x1a4
    [<ffffffc000240d08>] kthread+0xf4/0x100
    [<ffffffc0002043fc>] ret_from_fork+0xc/0x50
    [<ffffffffffffffff>] 0xffffffffffffffff

Signed-off-by: Ricky Liang <jcliang@chromium.org>
---
 drivers/net/wireless/marvell/mwifiex/scan.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c
index 97c9765..98ce072 100644
--- a/drivers/net/wireless/marvell/mwifiex/scan.c
+++ b/drivers/net/wireless/marvell/mwifiex/scan.c
@@ -1671,6 +1671,10 @@ static int mwifiex_save_hidden_ssid_channels(struct mwifiex_private *priv,
 	}
 
 done:
+	/* beacon_ie buffer was allocated in function
+	 * mwifiex_fill_new_bss_desc(). Free it now.
+	 */
+	kfree(bss_desc->beacon_buf);
 	kfree(bss_desc);
 	return 0;
 }
-- 
2.6.6

^ permalink raw reply related

* [PATCH v2 0/3] Fix -Wunused-but-set-variable in iwlwifi/pcie/trans and iwlwifi/mvm/rs
From: Kirtika Ruchandani @ 2016-11-09  5:49 UTC (permalink / raw)
  To: Luca Coelho
  Cc: linux-wireless, Arnd Bergmann, Kalle Valo, Emmanuel Grumbach,
	Johannes Berg, Sara Sharon, Eran Harary, Liad Kaufman,
	Eyal Shapira, Alexander Bondar

This patchset is part of the effort led by Arnd Bergmann to clean up
warnings in the kernel. This and following patchsets will focus on 
"-Wunused-but-set-variable" as it among the noisier ones. These were
found compiling with W=1.

-- 
Changes in v2:
- Made the following changes suggested by Arnd in all 3 patches
  1. Each patch has a unique subject line.
  2. Add the commit that introduced/led to the warning with the "Fixes:" line.
  3. cc linux-wireles, cc commit authors.

Kirtika Ruchandani (3):
  iwlwifi: mvm: rs: Remove unused 'mvmvif'/'mvmsta' variables
  iwlwifi: mvm: rs: Remove unused 'mcs' variable
  iwlwifi: pcie: trans: Remove unused 'shift_param'

 drivers/net/wireless/intel/iwlwifi/mvm/rs.c     | 10 +---------
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c |  3 ---
 2 files changed, 1 insertion(+), 12 deletions(-)

-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply

* [PATCH v2 1/3] iwlwifi: mvm: rs: Remove unused 'mvmvif'/'mvmsta' variables
From: Kirtika Ruchandani @ 2016-11-09  5:50 UTC (permalink / raw)
  To: Luca Coelho
  Cc: linux-wireless, Arnd Bergmann, Kalle Valo, Emmanuel Grumbach,
	Johannes Berg, Sara Sharon, Eran Harary, Liad Kaufman,
	Eyal Shapira, Alexander Bondar

mvmvif is defined and set in rs_mimo_allow but not used. Compiling
iwlwifi with W=1 gives the following warning, remove it. mvmsta is used only to
obtain mvmvif so remove it as well.

iwlwifi/mvm/rs.c: In function 'rs_mimo_allow':
iwlwifi/mvm/rs.c:165:22: warning: variable 'mvmvif' set but not used.[-Wunused-but-set-variable]

This fix removes calls to iwl_mvm_sta_from_mac & iwl_mvm_vif_from_mac. They are
both accessors, and do not have any side-effects.
Commit e621c2282 removed a workaround that disabled MIMO on P2P, 'mvmvif' was
used for that workaround, but not removed with it.

Fixes: e621c2282e31 ("iwlwifi: rs: Remove workaround that disables MIMO on P2P")

Signed-off-by: Kirtika Ruchandani <kirtika@google.com>
Cc: Alexander Bondar <alexander.bondar@intel.com>
Cc: Emmanuel Grumbach <emmmanuel.grumbach@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
index 227c5ed..0b79f4a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
@@ -161,9 +161,6 @@ static bool rs_mimo_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
 			  struct rs_rate *rate,
 			  const struct rs_tx_column *next_col)
 {
-	struct iwl_mvm_sta *mvmsta;
-	struct iwl_mvm_vif *mvmvif;
-
 	if (!sta->ht_cap.ht_supported)
 		return false;
 
@@ -176,9 +173,6 @@ static bool rs_mimo_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
 	if (!iwl_mvm_bt_coex_is_mimo_allowed(mvm, sta))
 		return false;
 
-	mvmsta = iwl_mvm_sta_from_mac80211(sta);
-	mvmvif = iwl_mvm_vif_from_mac80211(mvmsta->vif);
-
 	if (mvm->nvm_data->sku_cap_mimo_disabled)
 		return false;
 
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related

* [PATCH v2 2/3] iwlwifi: mvm: rs: Remove unused 'mcs' variable
From: Kirtika Ruchandani @ 2016-11-09  5:50 UTC (permalink / raw)
  To: Luca Coelho
  Cc: linux-wireless, Arnd Bergmann, Kalle Valo, Emmanuel Grumbach,
	Johannes Berg, Sara Sharon, Eran Harary, Liad Kaufman,
	Eyal Shapira, Alexander Bondar

Commit 5fc0f76c4 introduced Rx stats from debugfs, the function
iwl_mvm_reset_frame_stats from that commit defines and sets mcs but does not use
it. Compiling iwlwifi with W=1 gives this warning -

iwlwifi/mvm/rs.c: In function ‘iwl_mvm_update_frame_stats’:
iwlwifi/mvm/rs.c:3074:14: warning: variable ‘mcs’ set but not used [-Wunused-but-set-variable]

Fixes: 5fc0f76c43bd (iwlwifi: mvm: add Rx frames statistics via debugfs)

Signed-off-by: Kirtika Ruchandani <kirtika@google.com>
Cc: Eyal Shapira <eyal@wizery.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
index 0b79f4a..80f99c3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
@@ -3065,7 +3065,7 @@ static void iwl_mvm_reset_frame_stats(struct iwl_mvm *mvm)
 
 void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg)
 {
-	u8 nss = 0, mcs = 0;
+	u8 nss = 0;
 
 	spin_lock(&mvm->drv_stats_lock);
 
@@ -3093,11 +3093,9 @@ void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg)
 
 	if (rate & RATE_MCS_HT_MSK) {
 		mvm->drv_rx_stats.ht_frames++;
-		mcs = rate & RATE_HT_MCS_RATE_CODE_MSK;
 		nss = ((rate & RATE_HT_MCS_NSS_MSK) >> RATE_HT_MCS_NSS_POS) + 1;
 	} else if (rate & RATE_MCS_VHT_MSK) {
 		mvm->drv_rx_stats.vht_frames++;
-		mcs = rate & RATE_VHT_MCS_RATE_CODE_MSK;
 		nss = ((rate & RATE_VHT_MCS_NSS_MSK) >>
 		       RATE_VHT_MCS_NSS_POS) + 1;
 	} else {
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related

* [PATCH v2 3/3] iwlwifi: pcie: trans: Remove unused 'shift_param'
From: Kirtika Ruchandani @ 2016-11-09  5:50 UTC (permalink / raw)
  To: Luca Coelho
  Cc: linux-wireless, Arnd Bergmann, Kalle Valo, Emmanuel Grumbach,
	Johannes Berg, Sara Sharon, Eran Harary, Liad Kaufman,
	Eyal Shapira, Alexander Bondar

shift_param is defined and set in iwl_pcie_load_cpu_sections
but not used. Fix this to avoid -Wunused-but-set-variable
warning.
The code using it turned into dead code with commit dcab8ecd5617
which added a separate function iwl_pcie_load_given_ucode_8000
(then 8000b) for IWL_DEVICE_FAMILY_8000. Commit 76f8c0e17edc
removed the dead code but left shift_param as is.

iwlwifi/pcie/trans.c: In function ‘iwl_pcie_load_cpu_sections’:
iwlwifi/pcie/trans.c:871:6: warning: variable ‘shift_param’ set but not used [-Wunused-but-set-variable]

Fixes: dcab8ecd5617 (iwlwifi: mvm: support ucode load for family_8000 B0 only)
Fixes: 76f8c0e17edc (iwlwifi: pcie: remove dead code)

Signed-off-by: Kirtika Ruchandani <kirtika@google.com>
Cc: Sara Sharon <sara.sharon@intel.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
Cc: Eran Harary <eran.harary@intel.com>
Cc: Liad Kaufman <liad.kaufman@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index ae95533..1b27a39 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -868,15 +868,12 @@ static int iwl_pcie_load_cpu_sections(struct iwl_trans *trans,
 				      int cpu,
 				      int *first_ucode_section)
 {
-	int shift_param;
 	int i, ret = 0;
 	u32 last_read_idx = 0;
 
 	if (cpu == 1) {
-		shift_param = 0;
 		*first_ucode_section = 0;
 	} else {
-		shift_param = 16;
 		(*first_ucode_section)++;
 	}
 
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related

* Re: [PATCH v2 0/3] Fix -Wunused-but-set-variable in iwlwifi/pcie/trans and iwlwifi/mvm/rs
From: Coelho, Luciano @ 2016-11-09  6:30 UTC (permalink / raw)
  To: kirtika.ruchandani@gmail.com
  Cc: Kaufman, Liad, Bondar, Alexander, Berg, Johannes,
	kvalo@codeaurora.org, eran.harary@intel.com, eyal@wizery.com,
	arnd@arndb.de, Sharon, Sara, linux-wireless@vger.kernel.org,
	Grumbach, Emmanuel
In-Reply-To: <20161109054930.GA26716@google.com>

T24gVHVlLCAyMDE2LTExLTA4IGF0IDIxOjQ5IC0wODAwLCBLaXJ0aWthIFJ1Y2hhbmRhbmkgd3Jv
dGU6DQo+IFRoaXMgcGF0Y2hzZXQgaXMgcGFydCBvZiB0aGUgZWZmb3J0IGxlZCBieSBBcm5kIEJl
cmdtYW5uIHRvIGNsZWFuIHVwDQo+IHdhcm5pbmdzIGluIHRoZSBrZXJuZWwuIFRoaXMgYW5kIGZv
bGxvd2luZyBwYXRjaHNldHMgd2lsbCBmb2N1cyBvbiANCj4gIi1XdW51c2VkLWJ1dC1zZXQtdmFy
aWFibGUiIGFzIGl0IGFtb25nIHRoZSBub2lzaWVyIG9uZXMuIFRoZXNlIHdlcmUNCj4gZm91bmQg
Y29tcGlsaW5nIHdpdGggVz0xLg0KPiANCj4gLS0gDQo+IENoYW5nZXMgaW4gdjI6DQo+IC0gTWFk
ZSB0aGUgZm9sbG93aW5nIGNoYW5nZXMgc3VnZ2VzdGVkIGJ5IEFybmQgaW4gYWxsIDMgcGF0Y2hl
cw0KPiAgIDEuIEVhY2ggcGF0Y2ggaGFzIGEgdW5pcXVlIHN1YmplY3QgbGluZS4NCj4gICAyLiBB
ZGQgdGhlIGNvbW1pdCB0aGF0IGludHJvZHVjZWQvbGVkIHRvIHRoZSB3YXJuaW5nIHdpdGggdGhl
ICJGaXhlczoiIGxpbmUuDQo+ICAgMy4gY2MgbGludXgtd2lyZWxlcywgY2MgY29tbWl0IGF1dGhv
cnMuDQo+IA0KPiBLaXJ0aWthIFJ1Y2hhbmRhbmkgKDMpOg0KPiAgIGl3bHdpZmk6IG12bTogcnM6
IFJlbW92ZSB1bnVzZWQgJ212bXZpZicvJ212bXN0YScgdmFyaWFibGVzDQo+ICAgaXdsd2lmaTog
bXZtOiByczogUmVtb3ZlIHVudXNlZCAnbWNzJyB2YXJpYWJsZQ0KPiAgIGl3bHdpZmk6IHBjaWU6
IHRyYW5zOiBSZW1vdmUgdW51c2VkICdzaGlmdF9wYXJhbScNCj4gDQo+ICBkcml2ZXJzL25ldC93
aXJlbGVzcy9pbnRlbC9pd2x3aWZpL212bS9ycy5jICAgICB8IDEwICstLS0tLS0tLS0NCj4gIGRy
aXZlcnMvbmV0L3dpcmVsZXNzL2ludGVsL2l3bHdpZmkvcGNpZS90cmFucy5jIHwgIDMgLS0tDQo+
ICAyIGZpbGVzIGNoYW5nZWQsIDEgaW5zZXJ0aW9uKCspLCAxMiBkZWxldGlvbnMoLSkNCg0KVGhh
bmtzLCBLaXJ0aWthISBJJ2xsIHB1c2ggdGhlc2UgcGF0Y2hlcyB2aWEgb3VyIGludGVybmFsIHRy
ZWUgYW5kDQppbmNsdWRlIHRoZW0gaW4gbXkgbmV4dCBwdWxsIHJlcXVlc3QgdG8gS2FsbGUuDQoN
Ci0tIA0KQ2hlZXJzLA0KTHVjYS4=

^ permalink raw reply

* Re: [PATCH v2 1/3] iwlwifi: mvm: rs: Remove unused 'mvmvif'/'mvmsta' variables
From: Luca Coelho @ 2016-11-09  7:25 UTC (permalink / raw)
  To: Kirtika Ruchandani
  Cc: linux-wireless, Arnd Bergmann, Kalle Valo, Emmanuel Grumbach,
	Johannes Berg, Sara Sharon, Liad Kaufman, Eyal Shapira,
	Alexander Bondar
In-Reply-To: <20161109055015.GA27416@google.com>

(removed Erarn Harary from the Cc list, since this email is not valid
anymore)

Hi Kirtika,
Just a couple of nitpicks, nothing important, so no need to resend.


On Tue, 2016-11-08 at 21:50 -0800, Kirtika Ruchandani wrote:
> mvmvif is defined and set in rs_mimo_allow but not used. Compiling
> iwlwifi with W=1 gives the following warning, remove it. mvmsta is used only to
> obtain mvmvif so remove it as well.
> 
> iwlwifi/mvm/rs.c: In function 'rs_mimo_allow':
> iwlwifi/mvm/rs.c:165:22: warning: variable 'mvmvif' set but not used.[-Wunused-but-set-variable]
> 
> This fix removes calls to iwl_mvm_sta_from_mac & iwl_mvm_vif_from_mac. They are
> both accessors, and do not have any side-effects.
> Commit e621c2282 removed a workaround that disabled MIMO on P2P, 'mvmvif' was
> used for that workaround, but not removed with it.
> 
> Fixes: e621c2282e31 ("iwlwifi: rs: Remove workaround that disables MIMO on P2P")
> 

Usually the Fixes: tag is together with the other tags (such as Cc,
Signed-off-by), i.e. no empty line here.


> Signed-off-by: Kirtika Ruchandani <kirtika@google.com>
> Cc: Alexander Bondar <alexander.bondar@intel.com>
> Cc: Emmanuel Grumbach <emmmanuel.grumbach@intel.com>

And the Signed-off-by tag is usually the last one here, after all Cc's
and stuff.  But it doesn't matter much.

-- 
Cheers,
Luca.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox