Re: [PATCH] rtlwifi: correct comment

2018-03-18 Thread Pkshih
On Sat, 2018-03-17 at 22:26 +0800, Kevin Lo wrote:
> Correct comment.  Set bit 3 and bit 4 of 0x0005 register (REG_APS_FSMCO + 1)
> to 0 which means disable WL suspend, not enable WL suspend.
> 
> Signed-off-by: Kevin Lo 
Acked-by: Ping-Ke Shih 
> ---
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/pwrseq.h
> b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/pwrseq.h
> index f2d9c6116e5c..8379a3e5198c 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/pwrseq.h
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/pwrseq.h
> @@ -142,7 +142,7 @@
>   /*wait power state to suspend*/},   \
>   {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
>   PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(3) | BIT(4), 0 \
> - /*0x04[12:11] = 2b'01enable WL suspend*/},
> + /*0x04[12:11] = 2b'00 disable WL suspend*/},
>  

[...]

> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/pwrseq.h
> b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/pwrseq.h
> index 781eeaa6af49..c570801508cc 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/pwrseq.h
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/pwrseq.h
> @@ -134,7 +134,7 @@
>   /*wait power state to suspend*/ \
>   {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,   \
>    PWR_BASEADDR_SDIO , PWR_CMD_POLLING, BIT(1), BIT(1)},  \
> - /*0x04[12:11] = 2b'01enable WL suspend*/\
> + /*0x04[12:11] = 2b'00 disable WL suspend*/  \
>   {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
>    PWR_BASEADDR_MAC , PWR_CMD_WRITE, BIT(3) | BIT(4), 0},
>  

For further reviewers, please pay attention to comments exist above or 
below the statements.



[PATCH net-next v2 1/2] brcmfmac: add new dt entries for SG SDIO settings

2018-03-18 Thread Alexey Roslyakov
There are 3 fields in SDIO settings (quirks) to workaround some of
the SG SDIO host particularities, i.e higher align requirements for
SG items.
All coding is done the long time ago, but there is no way to change the
driver behavior without patching the kernel.
Add missing devicetree entries.

Signed-off-by: Alexey Roslyakov 
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c 
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
index aee6e5937c41..14135752b659 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
@@ -30,14 +30,20 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type 
bus_type,
struct device_node *np = dev->of_node;
int irq;
u32 irqf;
-   u32 val;
 
if (!np || bus_type != BRCMF_BUSTYPE_SDIO ||
!of_device_is_compatible(np, "brcm,bcm4329-fmac"))
return;
 
-   if (of_property_read_u32(np, "brcm,drive-strength", ) == 0)
-   sdio->drive_strength = val;
+   of_property_read_u32(np, "brcm,drive-strength", >drive_strength);
+
+   sdio->broken_sg_support =
+   of_property_read_bool(np, "brcm,broken-sg-support");
+
+   of_property_read_u16(np, "brcm,sd-head-align", >sd_head_align);
+
+   of_property_read_u16(np, "brcm,sd-sgentry-align",
+>sd_sgentry_align);
 
/* make sure there are interrupts defined in the node */
if (!of_find_property(np, "interrupts", NULL))
-- 
2.16.1



[PATCH net-next v2 0/2] brcmfmac: add new dt entries for SG SDIO settings

2018-03-18 Thread Alexey Roslyakov
Changes in v2: don't check of_property_read_* return values since it
doesn't change the value if property not found.
Suggested by Andrew Lunn.


[PATCH net-next v2 2/2] dt: bindings: add new dt entries for brcmfmac

2018-03-18 Thread Alexey Roslyakov
In case if the host has higher align requirements for SG items, allow
setting device-specific aligns for scatterlist items.

Signed-off-by: Alexey Roslyakov 
---
 Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt | 5 +
 1 file changed, 5 insertions(+)

diff --git 
a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt 
b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
index 86602f264dce..187b8c1b52a7 100644
--- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
+++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
@@ -17,6 +17,11 @@ Optional properties:
When not specified the device will use in-band SDIO interrupts.
  - interrupt-names : name of the out-of-band interrupt, which must be set
to "host-wake".
+ - brcm,broken-sg-support : boolean flag to indicate that the SDIO host
+   controller has higher align requirement than 32 bytes for each
+   scatterlist item.
+ - brcm,sd-head-align : alignment requirement for start of data buffer.
+ - brcm,sd-sgentry-align : length alignment requirement for each sg entry.
 
 Example:
 
-- 
2.16.1



[PATCH] mac80211: add ieee80211_hw flag for QoS NDP support

2018-03-18 Thread Ben Caradoc-Davies
Commit 7b6ddeaf27ec ("mac80211: use QoS NDP for AP probing") adds an
argument qos_ok to ieee80211_nullfunc_get to support QoS NDP. Despite
the claim in the commit log "Change all the drivers to *not* allow
QoS NDP for now, even though it looks like most of them should be OK
with that", this commit enables QoS NDP in response to beacons (see
change to mlme.c:ieee80211_send_nullfunc), causing ath9k_htc to lose
IP connectivity. See:
https://patchwork.kernel.org/patch/10241109/
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891060

This patch replaces the argument qos_ok of ieee80211_nullfunc_get
with an ieee80211_hw flag that drivers can use to declare support for
QoS NDP, allowing consistent behaviour between mlme.c and drivers.

Signed-off-by: Ben Caradoc-Davies 
---
 drivers/net/wireless/ath/ath9k/channel.c |  2 +-
 drivers/net/wireless/st/cw1200/sta.c |  4 ++--
 drivers/net/wireless/ti/wl1251/main.c|  2 +-
 drivers/net/wireless/ti/wlcore/cmd.c |  5 ++---
 include/net/mac80211.h   | 12 +---
 net/mac80211/debugfs.c   |  1 +
 net/mac80211/mlme.c  |  2 +-
 net/mac80211/tx.c|  5 ++---
 8 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/channel.c 
b/drivers/net/wireless/ath/ath9k/channel.c
index 1b05b5d7a038..dfb26f03c1a2 100644
--- a/drivers/net/wireless/ath/ath9k/channel.c
+++ b/drivers/net/wireless/ath/ath9k/channel.c
@@ -1113,7 +1113,7 @@ ath_chanctx_send_vif_ps_frame(struct ath_softc *sc, 
struct ath_vif *avp,
if (!avp->assoc)
return false;
 
-   skb = ieee80211_nullfunc_get(sc->hw, vif, false);
+   skb = ieee80211_nullfunc_get(sc->hw, vif);
if (!skb)
return false;
 
diff --git a/drivers/net/wireless/st/cw1200/sta.c 
b/drivers/net/wireless/st/cw1200/sta.c
index 38678e9a0562..03687a80d6e9 100644
--- a/drivers/net/wireless/st/cw1200/sta.c
+++ b/drivers/net/wireless/st/cw1200/sta.c
@@ -198,7 +198,7 @@ void __cw1200_cqm_bssloss_sm(struct cw1200_common *priv,
 
priv->bss_loss_state++;
 
-   skb = ieee80211_nullfunc_get(priv->hw, priv->vif, false);
+   skb = ieee80211_nullfunc_get(priv->hw, priv->vif);
WARN_ON(!skb);
if (skb)
cw1200_tx(priv->hw, NULL, skb);
@@ -2265,7 +2265,7 @@ static int cw1200_upload_null(struct cw1200_common *priv)
.rate = 0xFF,
};
 
-   frame.skb = ieee80211_nullfunc_get(priv->hw, priv->vif, false);
+   frame.skb = ieee80211_nullfunc_get(priv->hw, priv->vif);
if (!frame.skb)
return -ENOMEM;
 
diff --git a/drivers/net/wireless/ti/wl1251/main.c 
b/drivers/net/wireless/ti/wl1251/main.c
index 037defd10b91..99a6889a6540 100644
--- a/drivers/net/wireless/ti/wl1251/main.c
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -566,7 +566,7 @@ static int wl1251_build_null_data(struct wl1251 *wl)
size = sizeof(struct wl12xx_null_data_template);
ptr = NULL;
} else {
-   skb = ieee80211_nullfunc_get(wl->hw, wl->vif, false);
+   skb = ieee80211_nullfunc_get(wl->hw, wl->vif);
if (!skb)
goto out;
size = skb->len;
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c 
b/drivers/net/wireless/ti/wlcore/cmd.c
index 761cf8573a80..2bfc12fdc929 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.c
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
@@ -1069,8 +1069,7 @@ int wl12xx_cmd_build_null_data(struct wl1271 *wl, struct 
wl12xx_vif *wlvif)
ptr = NULL;
} else {
skb = ieee80211_nullfunc_get(wl->hw,
-wl12xx_wlvif_to_vif(wlvif),
-false);
+wl12xx_wlvif_to_vif(wlvif));
if (!skb)
goto out;
size = skb->len;
@@ -1097,7 +1096,7 @@ int wl12xx_cmd_build_klv_null_data(struct wl1271 *wl,
struct sk_buff *skb = NULL;
int ret = -ENOMEM;
 
-   skb = ieee80211_nullfunc_get(wl->hw, vif, false);
+   skb = ieee80211_nullfunc_get(wl->hw, vif);
if (!skb)
goto out;
 
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c96511fa9198..985f32c76ba9 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2063,6 +2063,9 @@ struct ieee80211_txq {
  * @IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA: Hardware supports buffer STA on
  * TDLS links.
  *
+ * @IEEE80211_HW_SUPPORTS_QOS_NDP: The driver (or firmware) supports QoS NDP
+ * for AP probing.
+ *
  * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
  */
 enum ieee80211_hw_flags {
@@ -2106,6 +2109,7 @@ enum ieee80211_hw_flags {

Re: [PATCH] mac80211: add ieee80211_hw flag for QoS NDP support

2018-03-18 Thread Ben Caradoc-Davies

Good grief. Typo. Please reject this one too.

Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand


[PATCH] mac80211: add ieee80211_hw flag for QoS NDP support

2018-03-18 Thread Ben Caradoc-Davies
Commit 7b6ddeaf27ec ("mac80211: use QoS NDP for AP probing") adds an
argument qos_ok to ieee80211_nullfunc_get to support QoS NDP. Despite
the claim in the commit log "Change all the drivers to *not* allow
QoS NDP for now, even though it looks like most of them should be OK
with that", this commit enables QoS NDP in response to beacons (see
change to mlme.c:ieee80211_send_nullfunc), causing ath9k_htc to lose
IP connectivity. See:
https://patchwork.kernel.org/patch/10241109/
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891060

This patch replaces the argument qos_ok of ieee80211_nullfunc_get
with an ieee80211_hw flag that drivers can use to declare support for
QoS NDP, allowing consistent behaviour between mlme.c and drivers.

Signed-off-by: Ben Caradoc-Davies 
---
 drivers/net/wireless/ath/ath9k/channel.c |  2 +-
 drivers/net/wireless/st/cw1200/sta.c |  4 ++--
 drivers/net/wireless/ti/wl1251/main.c|  2 +-
 drivers/net/wireless/ti/wlcore/cmd.c |  5 ++---
 include/net/mac80211.h   | 12 +---
 net/mac80211/debugfs.c   |  1 +
 net/mac80211/mlme.c  |  2 +-
 net/mac80211/tx.c|  5 ++---
 8 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/channel.c 
b/drivers/net/wireless/ath/ath9k/channel.c
index 1b05b5d7a038..dfb26f03c1a2 100644
--- a/drivers/net/wireless/ath/ath9k/channel.c
+++ b/drivers/net/wireless/ath/ath9k/channel.c
@@ -1113,7 +1113,7 @@ ath_chanctx_send_vif_ps_frame(struct ath_softc *sc, 
struct ath_vif *avp,
if (!avp->assoc)
return false;
 
-   skb = ieee80211_nullfunc_get(sc->hw, vif, false);
+   skb = ieee80211_nullfunc_get(sc->hw, vif);
if (!skb)
return false;
 
diff --git a/drivers/net/wireless/st/cw1200/sta.c 
b/drivers/net/wireless/st/cw1200/sta.c
index 38678e9a0562..03687a80d6e9 100644
--- a/drivers/net/wireless/st/cw1200/sta.c
+++ b/drivers/net/wireless/st/cw1200/sta.c
@@ -198,7 +198,7 @@ void __cw1200_cqm_bssloss_sm(struct cw1200_common *priv,
 
priv->bss_loss_state++;
 
-   skb = ieee80211_nullfunc_get(priv->hw, priv->vif, false);
+   skb = ieee80211_nullfunc_get(priv->hw, priv->vif);
WARN_ON(!skb);
if (skb)
cw1200_tx(priv->hw, NULL, skb);
@@ -2265,7 +2265,7 @@ static int cw1200_upload_null(struct cw1200_common *priv)
.rate = 0xFF,
};
 
-   frame.skb = ieee80211_nullfunc_get(priv->hw, priv->vif, false);
+   frame.skb = ieee80211_nullfunc_get(priv->hw, priv->vif);
if (!frame.skb)
return -ENOMEM;
 
diff --git a/drivers/net/wireless/ti/wl1251/main.c 
b/drivers/net/wireless/ti/wl1251/main.c
index 037defd10b91..99a6889a6540 100644
--- a/drivers/net/wireless/ti/wl1251/main.c
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -566,7 +566,7 @@ static int wl1251_build_null_data(struct wl1251 *wl)
size = sizeof(struct wl12xx_null_data_template);
ptr = NULL;
} else {
-   skb = ieee80211_nullfunc_get(wl->hw, wl->vif, false);
+   skb = ieee80211_nullfunc_get(wl->hw, wl->vif);
if (!skb)
goto out;
size = skb->len;
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c 
b/drivers/net/wireless/ti/wlcore/cmd.c
index 761cf8573a80..2bfc12fdc929 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.c
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
@@ -1069,8 +1069,7 @@ int wl12xx_cmd_build_null_data(struct wl1271 *wl, struct 
wl12xx_vif *wlvif)
ptr = NULL;
} else {
skb = ieee80211_nullfunc_get(wl->hw,
-wl12xx_wlvif_to_vif(wlvif),
-false);
+wl12xx_wlvif_to_vif(wlvif));
if (!skb)
goto out;
size = skb->len;
@@ -1097,7 +1096,7 @@ int wl12xx_cmd_build_klv_null_data(struct wl1271 *wl,
struct sk_buff *skb = NULL;
int ret = -ENOMEM;
 
-   skb = ieee80211_nullfunc_get(wl->hw, vif, false);
+   skb = ieee80211_nullfunc_get(wl->hw, vif);
if (!skb)
goto out;
 
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c96511fa9198..985f32c76ba9 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2063,6 +2063,9 @@ struct ieee80211_txq {
  * @IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA: Hardware supports buffer STA on
  * TDLS links.
  *
+ * @IEEE80211_HW_SUPPORTS_QOS_NDP: The driver (or firmware) supports QoS NDP
+ * for AP probing.
+ *
  * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
  */
 enum ieee80211_hw_flags {
@@ -2106,6 +2109,7 @@ enum ieee80211_hw_flags {

Re: [PATCH] mac80211: add ieee80211_hw flag for QoS NDP support

2018-03-18 Thread Ben Caradoc-Davies

On 19/03/18 11:12, kbuild test robot wrote:

net/mac80211/debugfs.c: In function 'hwflags_read':

include/linux/compiler.h:339:38: error: call to '__compiletime_assert_234' 
declared with attribute error: BUILD_BUG_ON failed: ARRAY_SIZE(hw_flag_names) 
!= NUM_IEEE80211_HW_FLAGS


Please reject this patch. I will submit a revised patch that adds the 
new flag to hw_flag_names in net/mac80211/debugfs.c.


Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand


Re: [PATCH] wcn36xx: dequeue all pending indicator messages

2018-03-18 Thread Bjorn Andersson
On Thu 15 Mar 15:37 PDT 2018, Daniel Mack wrote:

> In case wcn36xx_smd_rsp_process() is called more than once before
> hal_ind_work was dispatched, the messages will end up in hal_ind_queue,
> but wcn36xx_ind_smd_work() will only look at the first message in that
> list.
> 
> Fix this by dequeing the messages from the list in a loop, and only stop
> when it's empty.
> 

Reviewed-by: Bjorn Andersson 

Thanks for fixing this, I thought I already had done that.

Regards,
Bjorn

> Signed-off-by: Daniel Mack 
> ---
>  drivers/net/wireless/ath/wcn36xx/smd.c | 95 
> +++---
>  1 file changed, 52 insertions(+), 43 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c 
> b/drivers/net/wireless/ath/wcn36xx/smd.c
> index 7cc29285e052..a6b5352f59e9 100644
> --- a/drivers/net/wireless/ath/wcn36xx/smd.c
> +++ b/drivers/net/wireless/ath/wcn36xx/smd.c
> @@ -2409,54 +2409,63 @@ static void wcn36xx_ind_smd_work(struct work_struct 
> *work)
>  {
>   struct wcn36xx *wcn =
>   container_of(work, struct wcn36xx, hal_ind_work);
> - struct wcn36xx_hal_msg_header *msg_header;
> - struct wcn36xx_hal_ind_msg *hal_ind_msg;
> - unsigned long flags;
>  
> - spin_lock_irqsave(>hal_ind_lock, flags);
> + for (;;) {
> + struct wcn36xx_hal_msg_header *msg_header;
> + struct wcn36xx_hal_ind_msg *hal_ind_msg;
> + unsigned long flags;
>  
> - hal_ind_msg = list_first_entry(>hal_ind_queue,
> -struct wcn36xx_hal_ind_msg,
> -list);
> - list_del(wcn->hal_ind_queue.next);
> - spin_unlock_irqrestore(>hal_ind_lock, flags);
> + spin_lock_irqsave(>hal_ind_lock, flags);
>  
> - msg_header = (struct wcn36xx_hal_msg_header *)hal_ind_msg->msg;
> + if (list_empty(>hal_ind_queue)) {
> + spin_unlock_irqrestore(>hal_ind_lock, flags);
> + return;
> + }
>  
> - switch (msg_header->msg_type) {
> - case WCN36XX_HAL_COEX_IND:
> - case WCN36XX_HAL_DEL_BA_IND:
> - case WCN36XX_HAL_AVOID_FREQ_RANGE_IND:
> - break;
> - case WCN36XX_HAL_OTA_TX_COMPL_IND:
> - wcn36xx_smd_tx_compl_ind(wcn,
> -  hal_ind_msg->msg,
> -  hal_ind_msg->msg_len);
> - break;
> - case WCN36XX_HAL_MISSED_BEACON_IND:
> - wcn36xx_smd_missed_beacon_ind(wcn,
> -   hal_ind_msg->msg,
> -   hal_ind_msg->msg_len);
> - break;
> - case WCN36XX_HAL_DELETE_STA_CONTEXT_IND:
> - wcn36xx_smd_delete_sta_context_ind(wcn,
> -hal_ind_msg->msg,
> -hal_ind_msg->msg_len);
> - break;
> - case WCN36XX_HAL_PRINT_REG_INFO_IND:
> - wcn36xx_smd_print_reg_info_ind(wcn,
> -hal_ind_msg->msg,
> -hal_ind_msg->msg_len);
> - break;
> - case WCN36XX_HAL_SCAN_OFFLOAD_IND:
> - wcn36xx_smd_hw_scan_ind(wcn, hal_ind_msg->msg,
> - hal_ind_msg->msg_len);
> - break;
> - default:
> - wcn36xx_err("SMD_EVENT (%d) not supported\n",
> -   msg_header->msg_type);
> + hal_ind_msg = list_first_entry(>hal_ind_queue,
> +struct wcn36xx_hal_ind_msg,
> +list);
> + list_del(_ind_msg->list);
> + spin_unlock_irqrestore(>hal_ind_lock, flags);
> +
> + msg_header = (struct wcn36xx_hal_msg_header *)hal_ind_msg->msg;
> +
> + switch (msg_header->msg_type) {
> + case WCN36XX_HAL_COEX_IND:
> + case WCN36XX_HAL_DEL_BA_IND:
> + case WCN36XX_HAL_AVOID_FREQ_RANGE_IND:
> + break;
> + case WCN36XX_HAL_OTA_TX_COMPL_IND:
> + wcn36xx_smd_tx_compl_ind(wcn,
> +  hal_ind_msg->msg,
> +  hal_ind_msg->msg_len);
> + break;
> + case WCN36XX_HAL_MISSED_BEACON_IND:
> + wcn36xx_smd_missed_beacon_ind(wcn,
> +   hal_ind_msg->msg,
> +   hal_ind_msg->msg_len);
> + break;
> + case WCN36XX_HAL_DELETE_STA_CONTEXT_IND:
> + wcn36xx_smd_delete_sta_context_ind(wcn,
> +hal_ind_msg->msg,
> +  

Re: [PATCH] mac80211: add ieee80211_hw flag for QoS NDP support

2018-03-18 Thread kbuild test robot
Hi Ben,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v4.16-rc4]
[cannot apply to next-20180316]
[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/Ben-Caradoc-Davies/mac80211-add-ieee80211_hw-flag-for-QoS-NDP-support/20180319-052448
config: i386-randconfig-x013-201811 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

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

   In file included from include/linux/kernel.h:10:0,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/debugfs.h:15,
from net/mac80211/debugfs.c:11:
   net/mac80211/debugfs.c: In function 'hwflags_read':
>> include/linux/compiler.h:339:38: error: call to '__compiletime_assert_234' 
>> declared with attribute error: BUILD_BUG_ON failed: 
>> ARRAY_SIZE(hw_flag_names) != NUM_IEEE80211_HW_FLAGS
 _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
 ^
   include/linux/compiler.h:319:4: note: in definition of macro 
'__compiletime_assert'
   prefix ## suffix();\
   ^~
   include/linux/compiler.h:339:2: note: in expansion of macro 
'_compiletime_assert'
 _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
 ^~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 
'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~
   include/linux/build_bug.h:69:2: note: in expansion of macro 
'BUILD_BUG_ON_MSG'
 BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
 ^~~~
>> net/mac80211/debugfs.c:234:2: note: in expansion of macro 'BUILD_BUG_ON'
 BUILD_BUG_ON(ARRAY_SIZE(hw_flag_names) != NUM_IEEE80211_HW_FLAGS);
 ^~~~
--
   In file included from include/linux/kernel.h:10:0,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/debugfs.h:15,
from net//mac80211/debugfs.c:11:
   net//mac80211/debugfs.c: In function 'hwflags_read':
>> include/linux/compiler.h:339:38: error: call to '__compiletime_assert_234' 
>> declared with attribute error: BUILD_BUG_ON failed: 
>> ARRAY_SIZE(hw_flag_names) != NUM_IEEE80211_HW_FLAGS
 _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
 ^
   include/linux/compiler.h:319:4: note: in definition of macro 
'__compiletime_assert'
   prefix ## suffix();\
   ^~
   include/linux/compiler.h:339:2: note: in expansion of macro 
'_compiletime_assert'
 _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
 ^~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 
'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~
   include/linux/build_bug.h:69:2: note: in expansion of macro 
'BUILD_BUG_ON_MSG'
 BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
 ^~~~
   net//mac80211/debugfs.c:234:2: note: in expansion of macro 'BUILD_BUG_ON'
 BUILD_BUG_ON(ARRAY_SIZE(hw_flag_names) != NUM_IEEE80211_HW_FLAGS);
 ^~~~

vim +/__compiletime_assert_234 +339 include/linux/compiler.h

9a8ab1c3 Daniel Santos 2013-02-21  325  
9a8ab1c3 Daniel Santos 2013-02-21  326  #define _compiletime_assert(condition, 
msg, prefix, suffix) \
9a8ab1c3 Daniel Santos 2013-02-21  327  __compiletime_assert(condition, 
msg, prefix, suffix)
9a8ab1c3 Daniel Santos 2013-02-21  328  
9a8ab1c3 Daniel Santos 2013-02-21  329  /**
9a8ab1c3 Daniel Santos 2013-02-21  330   * compiletime_assert - break build and 
emit msg if condition is false
9a8ab1c3 Daniel Santos 2013-02-21  331   * @condition: a compile-time constant 
condition to check
9a8ab1c3 Daniel Santos 2013-02-21  332   * @msg:   a message to emit if 
condition is false
9a8ab1c3 Daniel Santos 2013-02-21  333   *
9a8ab1c3 Daniel Santos 2013-02-21  334   * In tradition of POSIX assert, this 
macro will break the build if the
9a8ab1c3 Daniel Santos 2013-02-21  335   * supplied condition is *false*, 
emitting the supplied error message if the
9a8ab1c3 Daniel Santos 2013-02-21  336   * compiler has support to do so.
9a8ab1c3 Daniel Santos 2013-02-21  337   */
9a8ab1c3 Daniel Santos 2013-02-21  338  #define compiletime_assert(condition, 
msg) \
9a8ab1c3 Daniel 

Re: [PATCH v3 11/20] firmware: enable to force disable the fallback mechanism at run time

2018-03-18 Thread Luis R. Rodriguez
On Wed, Mar 14, 2018 at 12:00 PM, Greg KH  wrote:
> On Sat, Mar 10, 2018 at 06:14:52AM -0800, Luis R. Rodriguez wrote:
>> You currently need four different kernel builds to test the firmware
>> API fully. By adding a proc knob to force disable the fallback mechanism
>> completely we are able to reduce the amount of kernels you need built
>> to test the firmware API down to two.
>>
>> Acked-by: Kees Cook 
>> Signed-off-by: Luis R. Rodriguez 
>> ---
>>  drivers/base/firmware_loader/fallback.c   | 5 +
>>  drivers/base/firmware_loader/fallback.h   | 4 
>>  drivers/base/firmware_loader/fallback_table.c | 9 +
>>  3 files changed, 18 insertions(+)
>>
>> diff --git a/drivers/base/firmware_loader/fallback.c 
>> b/drivers/base/firmware_loader/fallback.c
>> index 45cc40933a47..d6838e7ec00c 100644
>> --- a/drivers/base/firmware_loader/fallback.c
>> +++ b/drivers/base/firmware_loader/fallback.c
>> @@ -643,6 +643,11 @@ static bool fw_force_sysfs_fallback(unsigned int 
>> opt_flags)
>>
>>  static bool fw_run_sysfs_fallback(unsigned int opt_flags)
>>  {
>> + if (fw_fallback_config.ignore_sysfs_fallback) {
>> + pr_info_once("Ignoring firmware sysfs fallback due to debugfs 
>> knob\n");
>
> s/debugfs/sysctl/ right?

Indeed. Will respin with the other space fix. As for the other changes
let me know if you have further feedback or if I should just keep them
as-is.

  Luis


Re: [PATCH 1/2] brcmfmac: add new dt entries for SG SDIO settings

2018-03-18 Thread Andrew Lunn
> + if (of_property_read_u16(np, "brcm,sd-head-align", ) == 0)
> + sdio->sd_head_align = align;

Hi Alexey

I think you can make this:

of_property_read_u16(np, "brcm,sd-head-align", >sd_head_align);

of_property_read_u16() should not touch the destination variable if
the properties does not exist, or if there is an error.

Andrew


[PATCH v2] brcmfmac: Add support for getting nvram contents from EFI variables

2018-03-18 Thread Hans de Goede
Various models Asus laptops with a SDIO attached brcmfmac wifi chip, store
the nvram contents in a special EFI variable. This commit adds support for
getting nvram directly from this EFI variable, without the user needing to
manually copy it.

This makes Wifi / Bluetooth work out of the box on these devices instead of
requiring manual setup.

Note this commit also adds fixup code to make sure the right ccode is used
when the nvram efivar wants to set the worldwide regulatory domain, the
correct ccode for that depends on the firmware version. So if the nvram
efivar contains ccode=ALL (which is never correct) or ccode=XV we fix it
up to the right value (XV or X2) for the firmware, assuming the firmware
from linux-firmware is used.

This has been tested on the following models: Asus T100CHI, Asus T100HA,
Asus T100TA and Asus T200TA

Tested-by: Hans de Goede 
Signed-off-by: Hans de Goede 
---
Changes in v2:
-Stop testing for asus in the dmi sys_vendor string at least the Toshiba
 Encore uses the nvram efivar variable too
-Use a table mapping the firmare name to the correct ccode value (XV / X2) to
 use for the worldwide regulatory domain for that firmware, assuming the
 firmware from linux-firmware is used. This fixes the T200TA and T100HA not
 seeing 5GHz networks
-Not only fixup ccode=ALL, but also ccode=XV, this is necessary since the
 T100HA nvram efivar containts ccode=XV, but the firmware from Linux firmware
 needs ccode=X2 for proper operation
---
 .../broadcom/brcm80211/brcmfmac/firmware.c | 96 --
 1 file changed, 90 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c 
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
index 091b52979e03..ac515d7d29cf 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
@@ -14,6 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -446,33 +448,115 @@ struct brcmf_fw {
 void *nvram_image, u32 nvram_len);
 };
 
+#ifdef CONFIG_EFI
+static const char * const ccode_fixup_map[][2] = {
+   { "brcm/brcmfmac43241b4-sdio.txt", "XV\n" },
+   { "brcm/brcmfmac43340-sdio.txt", "X2\n" },
+};
+
+static u8 *brcmf_fw_nvram_from_efi(struct brcmf_fw *fwctx, size_t 
*data_len_ret)
+{
+   const u16 name[] = { 'n', 'v', 'r', 'a', 'm', 0 };
+   struct efivar_entry *nvram_efivar;
+   unsigned long data_len = 0;
+   const char *val = NULL;
+   u8 *data = NULL;
+   char *ccode;
+   int i, err;
+
+   nvram_efivar = kzalloc(sizeof(*nvram_efivar), GFP_KERNEL);
+   if (!nvram_efivar)
+   return NULL;
+
+   memcpy(_efivar->var.VariableName, name, sizeof(name));
+   nvram_efivar->var.VendorGuid = EFI_GUID(0x74b00bd9, 0x805a, 0x4d61,
+   0xb5, 0x1f, 0x43, 0x26,
+   0x81, 0x23, 0xd1, 0x13);
+
+   err = efivar_entry_size(nvram_efivar, _len);
+   if (err)
+   goto fail;
+
+   data = kmalloc(data_len, GFP_KERNEL);
+   if (!data)
+   goto fail;
+
+   err = efivar_entry_get(nvram_efivar, NULL, _len, data);
+   if (err)
+   goto fail;
+
+   /* In some cases the EFI-var stored nvram contains "ccode=ALL" or
+* "ccode=XV" to specify "worldwide" compatible settings. ccode=ALL is
+* not understood by the firmware and some of the firmware files in
+* linux-firmware support only 2.4 GHz and not 5 GHz when ccode=XV.
+*/
+   ccode = strnstr((char *)data, "ccode=ALL", data_len);
+   if (!ccode)
+   ccode = strnstr((char *)data, "ccode=XV\r", data_len);
+   if (ccode) {
+   for (i = 0; i < ARRAY_SIZE(ccode_fixup_map); i++) {
+   if (!strcmp(ccode_fixup_map[i][0], fwctx->nvram_name)) {
+   val = ccode_fixup_map[i][1];
+   break;
+   }
+   }
+   if (val) {
+   ccode[6] = val[0];
+   ccode[7] = val[1];
+   ccode[8] = val[2];
+   } else {
+   brcmf_info("Using EFI nvram specifies worldwide ccode, 
but %s not found in ccode fixup map, please report this\n",
+  fwctx->nvram_name);
+   }
+   }
+
+   brcmf_info("Using nvram EFI variable\n");
+
+   kfree(nvram_efivar);
+   *data_len_ret = data_len;
+   return data;
+
+fail:
+   kfree(data);
+   kfree(nvram_efivar);
+   return NULL;
+}
+#else
+static u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; }
+#endif
+
 static void brcmf_fw_request_nvram_done(const struct firmware *fw, void *ctx)
 {
 

Re: [PATCH] brcmfmac: Add support for getting nvram contents from EFI variables

2018-03-18 Thread Hans de Goede

Hi,

On 16-03-18 21:41, Arend van Spriel wrote:

On 3/14/2018 9:43 AM, Hans de Goede wrote:

Hi,

On 13-03-18 21:19, Arend van Spriel wrote:

On 3/12/2018 10:45 AM, Hans de Goede wrote:





Actually had a Sony device with nvram in EFI. Why not just drop this
optimization.


Ok, do you know if that variable had the same name and guid though ?
Because
if it doesn't then this code is not going to work for the Sony case.


If I am not mistaken the name and guid are defined by Broadcom/Microsoft.


Anyways the overhead is small and this only runs once, so I will drop
the
check for v2.


Due to XV issue we may want to keep the check for now.


If we're going to do ccode=ALL replacement based on a dmi-model
table then there is no need to keep the check just for the XV stuff.




Also simply selecting XV instead is not correct. There is not just one
worldwide domain in the regulatory database of the firmware image.


Right, I've read elsewhere that "X2" is the right magic value to use and
I've tested that on some other devices and that does seem to work.

I've also seen "XY" but the other Asus devices all use "XV" and that
works (makes channel 13 work) so it seemed like a good value.

Can you help me understand this problem a bit better? Is the problem
with
"XV" that it may not work with all firmware versions, so on some
firmware
versions it will be as bad as using ALL which the firmware also does not
understand? Or do all firmwares understand XV / XY / X2 but are there
subtle differences?


The firmware has a per-device recipe of what should be in the
regulatory database and per release branch it can differ. So for the
same device customer A could get XV and XY in the firmware regdb and
customer B could get XY and X2.


Hmm, so whether XV, XY and/or X2 works depends on the firmware used,
not on the model of the laptop? That means that:


So how do you suggest we deal with this?

One solution I see is:

1) check for ccode=ALL
2) if found use DMI strings to match the specific model and set a
different
ccode based on the model (so for now use XV for the T200TA only)
3) if found and the model is not known, warn about this and do nothing

Would that work for you ?


I think so.


This is no good, because the model of the laptop and which firmware build
gets used are not really coupled. I think instead it would make more sense
to assume the firmware builds from linux-firmware and have a table of
which ccode=ALL override to use based on wifi-chip model, so in the
case of the T200TA, map brcmfmac43340-sdio to a ccode=XV override
(if ccode=ALL is present).


For our customers, ie. OEM/ODM, we provide a particular device and with it 
comes a firmware build with a regulatory database aka CLM. So in that project 
flow the laptop/phone/whatever model and firmware are really coupled. However, 
for linux-firmware the story is more as you depict it, because we simply do not 
know in what kind of device the chip will be used.


So basically what I'm suggesting is:

static const char * const ccode_all_map[][2] = {
    { "brcm/brcmfmac43241b4-sdio.txt", "XV\n" }, /* Tested on Asus
T100TA, T100CHI */
    { "brcm/brcmfmac43340-sdio.txt", "XV\n" },   /* Tested on Asus
T200TA */
};

...

 ccode = strnstr((char *)data, "ccode=ALL", data_len);
 if (ccode) {
 /* lookup fwctx->nvram_name in ccode_all_map */
 /* if found patch in override string */
 /* else brcmf_info("EFI nvram contains ccode=ALL and %s is
missing from ccode-map, please report\n", fwctx->nvram_name) */
 }

So we actually decide what to replace all with based on the
firmware name, rather then on the laptop model, does that make
sense?


Somewhat. However, I am leaning to a different approach. The ALL country code 
should not be supported in the firmware so it would fallback to something else 
and I would like to know what. The country code can be retrieved and set using 
firmware command. So I would like to retrieve it in brcmf_cfg80211_attach() 
just before doing the brcmf_setup_wiphy_bands() call. I want to know if it 
returns ALL or some other fallback country code. At this stage I am not sure 
what the criteria has to be to set the country code to XV.


Ok.


I hope to get some more clarification from our regulatory team about
the use of ALL and XV. Could you tell me what happens with T200TA when
you leave ccode=ALL in place. What output do you get from "iw list"?
Only channels 1 to 11 and no 5G? Or does it only have 2G.


With ccode=ALL in place, I do see channel 13, but not 14 and channel 13
does
not work (the machine does not associate with my AP which is configured
at chan 13)
if I change it to "XV" then channel 13 does work, and shortly after
associating
channel 14 also shows up in the "iwlist wlan0 freq" output.


So XV seems to be the worldwide country code used for PC-OEMs. So that seems 
ok-ish. I would like to verify whether the firmwares released to linux-firmware 
all have XV in the firmware regulatory database.

[PATCH 1/2] brcmfmac: add new dt entries for SG SDIO settings

2018-03-18 Thread Alexey Roslyakov
There are 3 fields in SDIO settings (quirks) to workaround some of
the SG SDIO host particularities, i.e higher align requirements for
SG items.
All coding is done the long time ago, but there is no way to change the
driver behavior without patching the kernel.
Add missing devicetree entries.

Signed-off-by: Alexey Roslyakov 
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c 
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
index aee6e5937c41..0718ca09a40d 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
@@ -31,6 +31,7 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type 
bus_type,
int irq;
u32 irqf;
u32 val;
+   u16 align;
 
if (!np || bus_type != BRCMF_BUSTYPE_SDIO ||
!of_device_is_compatible(np, "brcm,bcm4329-fmac"))
@@ -39,6 +40,15 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type 
bus_type,
if (of_property_read_u32(np, "brcm,drive-strength", ) == 0)
sdio->drive_strength = val;
 
+   sdio->broken_sg_support =
+   of_property_read_bool(np, "brcm,broken-sg-support");
+
+   if (of_property_read_u16(np, "brcm,sd-head-align", ) == 0)
+   sdio->sd_head_align = align;
+
+   if (of_property_read_u16(np, "brcm,sd-sgentry-align", ) == 0)
+   sdio->sd_sgentry_align = align;
+
/* make sure there are interrupts defined in the node */
if (!of_find_property(np, "interrupts", NULL))
return;
-- 
2.16.1



[PATCH 2/2] dt: bindings: add new dt entries for brcmfmac

2018-03-18 Thread Alexey Roslyakov
In case if the host has higher align requirements for SG items, allow
setting device-specific aligns for scatterlist items.

Signed-off-by: Alexey Roslyakov 
---
 Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt | 5 +
 1 file changed, 5 insertions(+)

diff --git 
a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt 
b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
index 86602f264dce..187b8c1b52a7 100644
--- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
+++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
@@ -17,6 +17,11 @@ Optional properties:
When not specified the device will use in-band SDIO interrupts.
  - interrupt-names : name of the out-of-band interrupt, which must be set
to "host-wake".
+ - brcm,broken-sg-support : boolean flag to indicate that the SDIO host
+   controller has higher align requirement than 32 bytes for each
+   scatterlist item.
+ - brcm,sd-head-align : alignment requirement for start of data buffer.
+ - brcm,sd-sgentry-align : length alignment requirement for each sg entry.
 
 Example:
 
-- 
2.16.1



cześć piękna

2018-03-18 Thread Wesley
Mam nadzieję, że czujesz się dobrze, a ten e-mail spotka Cię w dobrym stanie 
zdrowia. Przepraszam, jeśli przeszkadzam lub przeszkadzam. Bardzo przepraszam 
za naruszenie Twojej prywatności. Nazywam się Wesley. Jestem ze stanu, jestem 
singlem i mam dość samotności. Jestem bardzo pogodnym, życzliwym i pozytywnym 
człowiekiem, a obecnie szukam związku, w którym czuję się kochany. Mam 
nadzieję, że będzie to nowy etap w moim życiu. Opowiedz mi więcej o sobie, 
jeśli nie masz nic przeciwko.

Zawsze doceniałem szczerość, uczciwość. Mam nadzieję, że możemy się lepiej 
poznać.

Mam nadzieję, że wkrótce się odezwę.

Pozdrowienia,

Wesley.


cześć piękna

2018-03-18 Thread Wesley
Mam nadzieję, że czujesz się dobrze, a ten e-mail spotka Cię w dobrym stanie 
zdrowia. Przepraszam, jeśli przeszkadzam lub przeszkadzam. Bardzo przepraszam 
za naruszenie Twojej prywatności. Nazywam się Wesley. Jestem ze stanu, jestem 
singlem i mam dość samotności. Jestem bardzo pogodnym, życzliwym i pozytywnym 
człowiekiem, a obecnie szukam związku, w którym czuję się kochany. Mam 
nadzieję, że będzie to nowy etap w moim życiu. Opowiedz mi więcej o sobie, 
jeśli nie masz nic przeciwko.

Zawsze doceniałem szczerość, uczciwość. Mam nadzieję, że możemy się lepiej 
poznać.

Mam nadzieję, że wkrótce się odezwę.

Pozdrowienia,

Wesley.


[PATCH] ath10k: remove variables which set but not used

2018-03-18 Thread Kenneth Lu
Variable buf_len and num_vdev_stats are bging assigned but never read.
These are redundant and can be remove.

Signed-off-by: Kenneth Lu 
---
 drivers/net/wireless/ath/ath10k/wmi.c | 14 ++
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c 
b/drivers/net/wireless/ath/ath10k/wmi.c
index 58dc218..da9552d 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -2308,7 +2308,6 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct 
sk_buff *skb)
u32 phy_mode;
u32 snr;
u32 rate;
-   u32 buf_len;
u16 fc;
int ret;
 
@@ -2320,7 +2319,6 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct 
sk_buff *skb)
}
 
channel = __le32_to_cpu(arg.channel);
-   buf_len = __le32_to_cpu(arg.buf_len);
rx_status = __le32_to_cpu(arg.status);
snr = __le32_to_cpu(arg.snr);
phy_mode = __le32_to_cpu(arg.phy_mode);
@@ -2708,14 +2706,13 @@ static int ath10k_wmi_main_op_pull_fw_stats(struct 
ath10k *ar,
struct ath10k_fw_stats *stats)
 {
const struct wmi_stats_event *ev = (void *)skb->data;
-   u32 num_pdev_stats, num_vdev_stats, num_peer_stats;
+   u32 num_pdev_stats, num_peer_stats;
int i;
 
if (!skb_pull(skb, sizeof(*ev)))
return -EPROTO;
 
num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats);
-   num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats);
num_peer_stats = __le32_to_cpu(ev->num_peer_stats);
 
for (i = 0; i < num_pdev_stats; i++) {
@@ -2763,14 +2760,13 @@ static int ath10k_wmi_10x_op_pull_fw_stats(struct 
ath10k *ar,
   struct ath10k_fw_stats *stats)
 {
const struct wmi_stats_event *ev = (void *)skb->data;
-   u32 num_pdev_stats, num_vdev_stats, num_peer_stats;
+   u32 num_pdev_stats, num_peer_stats;
int i;
 
if (!skb_pull(skb, sizeof(*ev)))
return -EPROTO;
 
num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats);
-   num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats);
num_peer_stats = __le32_to_cpu(ev->num_peer_stats);
 
for (i = 0; i < num_pdev_stats; i++) {
@@ -2824,7 +2820,6 @@ static int ath10k_wmi_10_2_op_pull_fw_stats(struct ath10k 
*ar,
const struct wmi_10_2_stats_event *ev = (void *)skb->data;
u32 num_pdev_stats;
u32 num_pdev_ext_stats;
-   u32 num_vdev_stats;
u32 num_peer_stats;
int i;
 
@@ -2833,7 +2828,6 @@ static int ath10k_wmi_10_2_op_pull_fw_stats(struct ath10k 
*ar,
 
num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats);
num_pdev_ext_stats = __le32_to_cpu(ev->num_pdev_ext_stats);
-   num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats);
num_peer_stats = __le32_to_cpu(ev->num_peer_stats);
 
for (i = 0; i < num_pdev_stats; i++) {
@@ -2903,7 +2897,6 @@ static int ath10k_wmi_10_2_4_op_pull_fw_stats(struct 
ath10k *ar,
const struct wmi_10_2_stats_event *ev = (void *)skb->data;
u32 num_pdev_stats;
u32 num_pdev_ext_stats;
-   u32 num_vdev_stats;
u32 num_peer_stats;
int i;
 
@@ -2912,7 +2905,6 @@ static int ath10k_wmi_10_2_4_op_pull_fw_stats(struct 
ath10k *ar,
 
num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats);
num_pdev_ext_stats = __le32_to_cpu(ev->num_pdev_ext_stats);
-   num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats);
num_peer_stats = __le32_to_cpu(ev->num_peer_stats);
 
for (i = 0; i < num_pdev_stats; i++) {
@@ -2991,7 +2983,6 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k 
*ar,
const struct wmi_10_2_stats_event *ev = (void *)skb->data;
u32 num_pdev_stats;
u32 num_pdev_ext_stats;
-   u32 num_vdev_stats;
u32 num_peer_stats;
u32 num_bcnflt_stats;
u32 stats_id;
@@ -3002,7 +2993,6 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k 
*ar,
 
num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats);
num_pdev_ext_stats = __le32_to_cpu(ev->num_pdev_ext_stats);
-   num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats);
num_peer_stats = __le32_to_cpu(ev->num_peer_stats);
num_bcnflt_stats = __le32_to_cpu(ev->num_bcnflt_stats);
stats_id = __le32_to_cpu(ev->stats_id);
-- 
2.7.4