qtnfmac: fixes and minor enhancements
v2 cover qtnfmac: fixes and minor enhancements
Hello Kalle and all,
Here is the patch set with fixes and enhancements for qtnfmac driver. The major changes include the following items:
- final conversion to SPDX license format
- 4addr mode support
- PCIe INTx fix
Regards,
Sergey
v1 -> v2:
- remove remaining textual license from cfg80211.h header
- fix smatch warning for 4addr mode patch
- queue two more trivial cleanup patches to the series
Andrey Shevchenko (1):
qtnfmac: support EBUSY errcode for QLINK protocol
Sergey Matyukevich (8):
qtnfmac: fix legacy PCIe interrupt handling
qtnfmac: add support for 4addr mode
qtnfmac: switch to 32bit values for RTS/FRAG thresholds
qtnfmac: do not reject retry changes in driver
qtnfmac: convert to SPDX license identifiers
qtnfmac: add missing bss record to host scan cache
qtnfmac: remove unused declarations
qtnfmac: minor cleanup in qtnf_cmd_send_with_reply
drivers/net/wireless/quantenna/Makefile | 1 + drivers/net/wireless/quantenna/qtnfmac/bus.h | 19 +---- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 43 ++++------ drivers/net/wireless/quantenna/qtnfmac/cfg80211.h | 17 +--- drivers/net/wireless/quantenna/qtnfmac/commands.c | 58 ++++++------- drivers/net/wireless/quantenna/qtnfmac/commands.h | 22 ++--- drivers/net/wireless/quantenna/qtnfmac/core.c | 21 ++--- drivers/net/wireless/quantenna/qtnfmac/core.h | 17 +--- drivers/net/wireless/quantenna/qtnfmac/debug.c | 17 +--- drivers/net/wireless/quantenna/qtnfmac/debug.h | 17 +--- drivers/net/wireless/quantenna/qtnfmac/event.c | 96 +++++++++++++++++----- drivers/net/wireless/quantenna/qtnfmac/event.h | 17 +--- .../wireless/quantenna/qtnfmac/pcie/topaz_pcie.c | 6 +- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 27 ++---- .../net/wireless/quantenna/qtnfmac/qlink_util.c | 16 +--- .../net/wireless/quantenna/qtnfmac/qlink_util.h | 28 +++---- .../net/wireless/quantenna/qtnfmac/qtn_hw_ids.h | 17 +--- drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c | 17 +--- drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h | 17 +--- .../net/wireless/quantenna/qtnfmac/shm_ipc_defs.h | 17 +--- drivers/net/wireless/quantenna/qtnfmac/trans.c | 17 +--- drivers/net/wireless/quantenna/qtnfmac/trans.h | 17 +--- drivers/net/wireless/quantenna/qtnfmac/util.c | 17 +--- drivers/net/wireless/quantenna/qtnfmac/util.h | 17 +--- 24 files changed, 188 insertions(+), 370 deletions(-)
Signature · 1 line
2.11.0
PATCH v2 1/9 qtnfmac: support EBUSY errcode for QLINK protocol
From: Andrey Shevchenko <[email protected]>
Add support of EBUSY error code for remote procedures over QLINK protocol.
--- drivers/net/wireless/quantenna/qtnfmac/commands.c | 2 ++ drivers/net/wireless/quantenna/qtnfmac/qlink.h | 1 + 2 files changed, 3 insertions(+)
drivers/net/wireless/quantenna/qtnfmac/commands.c +2 -0
@@ -72,6 +72,8 @@ static int qtnf_cmd_resp_result_decode(enum qlink_cmd_result qcode)return -EADDRINUSE ;case QLINK_CMD_RESULT_EADDRNOTAVAIL :return -EADDRNOTAVAIL ; +case QLINK_CMD_RESULT_EBUSY : +return -EBUSY ;default :return -EFAULT ; }
drivers/net/wireless/quantenna/qtnfmac/qlink.h +1 -0
@@ -733,6 +733,7 @@ enum qlink_cmd_result {QLINK_CMD_RESULT_EALREADY ,QLINK_CMD_RESULT_EADDRINUSE ,QLINK_CMD_RESULT_EADDRNOTAVAIL , + QLINK_CMD_RESULT_EBUSY, };/**
Signature · 1 line
2.11.0
Re: [PATCH v2 1/9] qtnfmac: support EBUSY errcode for QLINK protocol
Quoted 5 lines · Sergey Matyukevich
From: Andrey Shevchenko <[email protected]>
Add support of EBUSY error code for remote procedures over QLINK protocol.
Signed-off-by Andrey Shevchenko <[email protected]>
9 patches applied to wireless-drivers-next.git, thanks.
126824f5ce67 qtnfmac: support EBUSY errcode for QLINK protocol d1365e794eb3 qtnfmac: fix INTx interrupt handling de624a355d92 qtnfmac: add support for 4addr mode 9fe504a13172 qtnfmac: switch to 32bit values for RTS/FRAG thresholds f3c8bd46c774 qtnfmac: do not reject retry changes in driver ff233cb51503 qtnfmac: convert to SPDX license identifiers 23781af74152 qtnfmac: add missing bss record to host scan cache 324b8cad8cfc qtnfmac: remove unused declarations 3844dec0f45d qtnfmac: qtnf_cmd_send_with_reply cleanup
Signature · 3 lines
https://patchwork.kernel.org/patch/10761781/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
PATCH v2 2/9 qtnfmac: fix INTx interrupt handling
In reply to Sergey MatyukevichIn the current implementation INTx interrupt is deasserted after the control path processing. However this may lead to missed interrupts from the wireless card. For instance, this may happen as a result of control path activity, when another interrupt arrives before INTx is deasserted.
--- drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c +3 -3
@@ -559,6 +559,9 @@ static irqreturn_t qtnf_pcie_topaz_interrupt(int irq, void *data)if (!priv->msi_enabled && !qtnf_topaz_intx_asserted (ts))return IRQ_NONE ; +if (!priv->msi_enabled) +qtnf_deassert_intx (ts); + priv->pcie_irq_count++;qtnf_shm_ipc_irq_handler (&priv->shm_ipc_ep_in);
@@ -571,9 +574,6 @@ static irqreturn_t qtnf_pcie_topaz_interrupt(int irq, void *data)tasklet_hi_schedule (&priv->reclaim_tq); -if (!priv->msi_enabled) -qtnf_deassert_intx (ts); -return IRQ_HANDLED ; }
Signature · 1 line
2.11.0
PATCH v2 3/9 qtnfmac: add support for 4addr mode
In reply to Sergey MatyukevichAdvertise WIPHY_FLAG_4ADDR_STATION capability to wireless core. Send use4addr interface change flag to firmware in change_virtual_intf cfg80211 callback.
In order to enable adding wireless station interface to bridge one should turn on 4addr mode using the following command:
$ iw dev wlan0 set 4addr on $ brctl addif br0 wlan0
If this commands succeeds, then interface can be added to bridge. Note that when wireless interface is added to bridge, wpa_supplicant should be started with appropriate -b <brname> parameter, e.g:
$ wpa_supplicant -Dnl80211 -iwlan0 -c/path/to/wpa.conf -b br0
--- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 21 +++++++++++++-------- drivers/net/wireless/quantenna/qtnfmac/commands.c | 14 +++++++++----- drivers/net/wireless/quantenna/qtnfmac/commands.h | 6 ++++-- drivers/net/wireless/quantenna/qtnfmac/core.c | 4 +++- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 3 ++- 5 files changed, 31 insertions(+), 17 deletions(-)
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +13 -8
@@ -122,7 +122,8 @@ qtnf_change_virtual_intf(struct wiphy *wiphy, struct vif_params *params) {struct qtnf_vif *vif =qtnf_netdev_get_priv (dev); -u8 *mac_addr; +u8 *mac_addr =NULL ; +int use4addr =0 ;int ret; ret =qtnf_validate_iface_combinations (wiphy, vif, type);
@@ -132,14 +133,14 @@ qtnf_change_virtual_intf(struct wiphy *wiphy,return ret; } -if (params) +if (params) { mac_addr = params->macaddr; -else - mac_addr =NULL ; + use4addr = params->use_4addr; + }qtnf_scan_done (vif->mac, true); - ret =qtnf_cmd_send_change_intf_type (vif, type, mac_addr); + ret =qtnf_cmd_send_change_intf_type (vif, type, use4addr, mac_addr);if (ret) {pr_err ("VIF%u.%u: failed to change type to %d\n" , vif->mac->macid, vif->vifid, type);
@@ -190,6 +191,7 @@ static struct wireless_dev *qtnf_add_virtual_intf(struct wiphy *wiphy,struct qtnf_wmac *mac;struct qtnf_vif *vif;u8 *mac_addr =NULL ; +int use4addr =0 ;int ret; mac =wiphy_priv (wiphy);
@@ -225,10 +227,12 @@ static struct wireless_dev *qtnf_add_virtual_intf(struct wiphy *wiphy,return ERR_PTR (-ENOTSUPP ); } -if (params) +if (params) { mac_addr = params->macaddr; + use4addr = params->use_4addr; + } - ret =qtnf_cmd_send_add_intf (vif, type, mac_addr); + ret =qtnf_cmd_send_add_intf (vif, type, use4addr, mac_addr);if (ret) {pr_err ("VIF%u.%u: failed to add VIF %pM\n" , mac->macid, vif->vifid, mac_addr);
@@ -1107,7 +1111,8 @@ int qtnf_wiphy_register(struct qtnf_hw_info *hw_info, struct qtnf_wmac *mac) wiphy->flags |=WIPHY_FLAG_HAVE_AP_SME |WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD |WIPHY_FLAG_AP_UAPSD | -WIPHY_FLAG_HAS_CHANNEL_SWITCH ; +WIPHY_FLAG_HAS_CHANNEL_SWITCH | +WIPHY_FLAG_4ADDR_STATION ; wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT ;if (hw_info->hw_capab &QLINK_HW_CAPAB_DFS_OFFLOAD )
drivers/net/wireless/quantenna/qtnfmac/commands.c +9 -5
@@ -734,6 +734,7 @@ int qtnf_cmd_get_sta_info(struct qtnf_vif *vif, const u8 *sta_mac,static int qtnf_cmd_send_add_change_intf (struct qtnf_vif *vif,enum nl80211_iftype iftype, +int use4addr,u8 *mac_addr,enum qlink_cmd_type cmd_type) {
@@ -751,6 +752,7 @@ static int qtnf_cmd_send_add_change_intf(struct qtnf_vif *vif,qtnf_bus_lock (vif->mac->bus); cmd = (struct qlink_cmd_manage_intf *)cmd_skb->data; + cmd->intf_info.use4addr = use4addr;switch (iftype) {case NL80211_IFTYPE_AP :
@@ -786,17 +788,19 @@ static int qtnf_cmd_send_add_change_intf(struct qtnf_vif *vif,return ret; } -int qtnf_cmd_send_add_intf (struct qtnf_vif *vif, -enum nl80211_iftype iftype,u8 *mac_addr) +int qtnf_cmd_send_add_intf (struct qtnf_vif *vif,enum nl80211_iftype iftype, +int use4addr,u8 *mac_addr) { -return qtnf_cmd_send_add_change_intf (vif, iftype, mac_addr, +return qtnf_cmd_send_add_change_intf (vif, iftype, use4addr, mac_addr,QLINK_CMD_ADD_INTF ); }int qtnf_cmd_send_change_intf_type (struct qtnf_vif *vif, -enum nl80211_iftype iftype,u8 *mac_addr) +enum nl80211_iftype iftype, +int use4addr, +u8 *mac_addr) { -return qtnf_cmd_send_add_change_intf (vif, iftype, mac_addr, +return qtnf_cmd_send_add_change_intf (vif, iftype, use4addr, mac_addr,QLINK_CMD_CHANGE_INTF ); }
drivers/net/wireless/quantenna/qtnfmac/commands.h +4 -2
@@ -26,9 +26,11 @@ void qtnf_cmd_send_deinit_fw(struct qtnf_bus *bus);int qtnf_cmd_get_hw_info (struct qtnf_bus *bus);int qtnf_cmd_get_mac_info (struct qtnf_wmac *mac);int qtnf_cmd_send_add_intf (struct qtnf_vif *vif,enum nl80211_iftype iftype, -u8 *mac_addr); +int use4addr,u8 *mac_addr);int qtnf_cmd_send_change_intf_type (struct qtnf_vif *vif, -enum nl80211_iftype iftype,u8 *mac_addr); +enum nl80211_iftype iftype, +int use4addr, +u8 *mac_addr);int qtnf_cmd_send_del_intf (struct qtnf_vif *vif);int qtnf_cmd_band_info_get (struct qtnf_wmac *mac,struct ieee80211_supported_band *band);
drivers/net/wireless/quantenna/qtnfmac/core.c +3 -1
@@ -195,6 +195,7 @@ static int qtnf_netdev_set_mac_address(struct net_device *ndev, void *addr)qtnf_scan_done (vif->mac, true); ret =qtnf_cmd_send_change_intf_type (vif, vif->wdev.iftype, + vif->wdev.use_4addr, sa->sa_data);if (ret)
@@ -545,7 +546,8 @@ static int qtnf_core_mac_attach(struct qtnf_bus *bus, unsigned int macid) goto error; } - ret =qtnf_cmd_send_add_intf (vif, vif->wdev.iftype, vif->mac_addr); + ret =qtnf_cmd_send_add_intf (vif, vif->wdev.iftype, + vif->wdev.use_4addr, vif->mac_addr);if (ret) {pr_err ("MAC%u: failed to add VIF\n" , macid); goto error;
drivers/net/wireless/quantenna/qtnfmac/qlink.h +2 -1
@@ -105,7 +105,8 @@ struct qlink_intf_info {__le16 if_type;__le16 vlanid;u8 mac_addr[ETH_ALEN ]; -u8 rsvd[2 ]; +u8 use4addr; +u8 rsvd[1 ]; } __packed;enum qlink_sta_flags {
Signature · 1 line
2.11.0
PATCH v2 4/9 qtnfmac: switch to 32bit values for RTS/FRAG thresholds
In reply to Sergey MatyukevichHost wireless stack uses u32 type for RTS/FRAG threshold values. Switch to u32 in driver: pass u32 values to firmware and let firmware properly adapt these values according to its internal representation.
--- drivers/net/wireless/quantenna/qtnfmac/commands.c | 8 ++++---- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 4 ++-- drivers/net/wireless/quantenna/qtnfmac/qlink_util.h | 11 +++++++++++ 3 files changed, 17 insertions(+), 6 deletions(-)
drivers/net/wireless/quantenna/qtnfmac/commands.c +4 -4
@@ -1564,11 +1564,11 @@ static int qtnf_cmd_resp_proc_phy_params(struct qtnf_wmac *mac,switch (tlv_type) {case QTN_TLV_ID_FRAG_THRESH : phy_thr = (void *)tlv; - mac_info->frag_thr = (u32 )le16_to_cpu (phy_thr->thr); + mac_info->frag_thr =le32_to_cpu (phy_thr->thr);break ;case QTN_TLV_ID_RTS_THRESH : phy_thr = (void *)tlv; - mac_info->rts_thr = (u32 )le16_to_cpu (phy_thr->thr); + mac_info->rts_thr =le32_to_cpu (phy_thr->thr);break ;case QTN_TLV_ID_SRETRY_LIMIT : limit = (void *)tlv;
@@ -1816,10 +1816,10 @@ int qtnf_cmd_send_update_phy_params(struct qtnf_wmac *mac, u32 changed)qtnf_bus_lock (mac->bus);if (changed &WIPHY_PARAM_FRAG_THRESHOLD ) -qtnf_cmd_skb_put_tlv_u16 (cmd_skb,QTN_TLV_ID_FRAG_THRESH , +qtnf_cmd_skb_put_tlv_u32 (cmd_skb,QTN_TLV_ID_FRAG_THRESH , wiphy->frag_threshold);if (changed &WIPHY_PARAM_RTS_THRESHOLD ) -qtnf_cmd_skb_put_tlv_u16 (cmd_skb,QTN_TLV_ID_RTS_THRESH , +qtnf_cmd_skb_put_tlv_u32 (cmd_skb,QTN_TLV_ID_RTS_THRESH , wiphy->rts_threshold);if (changed &WIPHY_PARAM_COVERAGE_CLASS ) qtnf_cmd_skb_put_tlv_u8(cmd_skb, QTN_TLV_ID_COVERAGE_CLASS,
drivers/net/wireless/quantenna/qtnfmac/qlink.h +2 -2
@@ -19,7 +19,7 @@#include <linux/ieee80211.h> -#define QLINK_PROTO_VER 11 +#define QLINK_PROTO_VER 12#define QLINK_MACID_RSVD 0xFF#define QLINK_VIFID_RSVD 0xFF
@@ -1184,7 +1184,7 @@ struct qlink_iface_limit_record {struct qlink_tlv_frag_rts_thr {struct qlink_tlv_hdr hdr; -__le16 thr; +__le32 thr; } __packed;struct qlink_tlv_rlimit {
drivers/net/wireless/quantenna/qtnfmac/qlink_util.h +11 -0
@@ -69,6 +69,17 @@ static inline void qtnf_cmd_skb_put_tlv_u16(struct sk_buff *skb,memcpy (hdr->val, &tmp,sizeof (tmp)); } +static inline void qtnf_cmd_skb_put_tlv_u32 (struct sk_buff *skb, +u16 tlv_id,u32 value) +{ +struct qlink_tlv_hdr *hdr =skb_put (skb,sizeof (*hdr) +sizeof (value)); +__le32 tmp =cpu_to_le32 (value); + + hdr->type =cpu_to_le16 (tlv_id); + hdr->len =cpu_to_le16 (sizeof (value)); +memcpy (hdr->val, &tmp,sizeof (tmp)); +} +u16 qlink_iface_type_to_nl_mask (u16 qlink_type);u8 qlink_chan_width_mask_to_nl (u16 qlink_mask); void qlink_chandef_q2cfg(struct wiphy *wiphy,
Signature · 1 line
2.11.0
PATCH v2 5/9 qtnfmac: do not reject retry changes in driver
In reply to Sergey MatyukevichDo not reject RETRY changes in driver. This decision should belong to firmware.
--- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 5 ----- drivers/net/wireless/quantenna/qtnfmac/commands.c | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-)
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +0 -5
@@ -363,11 +363,6 @@ static int qtnf_set_wiphy_params(struct wiphy *wiphy, u32 changed)return -EFAULT ; } -if (changed & (WIPHY_PARAM_RETRY_LONG |WIPHY_PARAM_RETRY_SHORT )) { -pr_err ("MAC%u: can't modify retry params\n" , mac->macid); -return -EOPNOTSUPP ; - } - ret =qtnf_cmd_send_update_phy_params (mac, changed);if (ret)pr_err ("MAC%u: failed to update PHY params\n" , mac->macid);
drivers/net/wireless/quantenna/qtnfmac/commands.c +8 -0
@@ -1825,6 +1825,14 @@ int qtnf_cmd_send_update_phy_params(struct qtnf_wmac *mac, u32 changed)qtnf_cmd_skb_put_tlv_u8 (cmd_skb,QTN_TLV_ID_COVERAGE_CLASS , wiphy->coverage_class); +if (changed &WIPHY_PARAM_RETRY_LONG ) +qtnf_cmd_skb_put_tlv_u8 (cmd_skb,QTN_TLV_ID_LRETRY_LIMIT , + wiphy->retry_long); + +if (changed &WIPHY_PARAM_RETRY_SHORT ) +qtnf_cmd_skb_put_tlv_u8 (cmd_skb,QTN_TLV_ID_SRETRY_LIMIT , + wiphy->retry_short); + ret =qtnf_cmd_send (mac->bus, cmd_skb);if (ret) goto out;
Signature · 1 line
2.11.0
PATCH v2 6/9 qtnfmac: convert to SPDX license identifiers
In reply to Sergey MatyukevichReplace textual license with SPDX-License-Identifier. Add an SPDX-License-Identifier for the Makefile.
--- drivers/net/wireless/quantenna/Makefile | 1 + drivers/net/wireless/quantenna/qtnfmac/bus.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/cfg80211.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/commands.c | 16 ++-------------- drivers/net/wireless/quantenna/qtnfmac/commands.h | 16 ++-------------- drivers/net/wireless/quantenna/qtnfmac/core.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/core.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/debug.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/debug.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/event.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/event.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/qlink_util.c | 16 ++-------------- drivers/net/wireless/quantenna/qtnfmac/qlink_util.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/qtn_hw_ids.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/shm_ipc_defs.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/trans.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/trans.h | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/util.c | 17 ++--------------- drivers/net/wireless/quantenna/qtnfmac/util.h | 17 ++--------------- 23 files changed, 45 insertions(+), 327 deletions(-)
drivers/net/wireless/quantenna/Makefile +1 -0
@@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # # Copyright (c) 2015-2016 Quantenna Communications, Inc. # All rights reserved.
drivers/net/wireless/quantenna/qtnfmac/bus.h +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015 Quantenna Communications -* -* Permission to use, copy, modify, and/or distribute this software for any -* purpose with or without fee is hereby granted, provided that the above -* copyright notice and this permission notice appear in all copies. -* -* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015 Quantenna Communications. All rights reserved. */ #ifndef QTNFMAC_BUS_H #define QTNFMAC_BUS_H
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2012-2012 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include <linux/kernel.h> #include <linux/etherdevice.h>
drivers/net/wireless/quantenna/qtnfmac/cfg80211.h +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_CFG80211_H_#define _QTN_FMAC_CFG80211_H_
drivers/net/wireless/quantenna/qtnfmac/commands.c +2 -14
@@ -1,17 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include <linux/types.h> #include <linux/skbuff.h>
drivers/net/wireless/quantenna/qtnfmac/commands.h +2 -14
@@ -1,17 +1,5 @@ -/* -* Copyright (c) 2016 Quantenna Communications, Inc. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2016 Quantenna Communications. All rights reserved. */ #ifndef QLINK_COMMANDS_H_ #define QLINK_COMMANDS_H_
drivers/net/wireless/quantenna/qtnfmac/core.c +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include <linux/kernel.h> #include <linux/module.h>
drivers/net/wireless/quantenna/qtnfmac/core.h +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_CORE_H_#define _QTN_FMAC_CORE_H_
drivers/net/wireless/quantenna/qtnfmac/debug.c +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include "debug.h"
drivers/net/wireless/quantenna/qtnfmac/debug.h +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_DEBUG_H_#define _QTN_FMAC_DEBUG_H_
drivers/net/wireless/quantenna/qtnfmac/event.c +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include <linux/kernel.h> #include <linux/module.h>
drivers/net/wireless/quantenna/qtnfmac/event.h +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_EVENT_H_#define _QTN_FMAC_EVENT_H_
drivers/net/wireless/quantenna/qtnfmac/qlink.h +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_QLINK_H_#define _QTN_QLINK_H_
drivers/net/wireless/quantenna/qtnfmac/qlink_util.c +2 -14
@@ -1,17 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include <linux/nl80211.h>
drivers/net/wireless/quantenna/qtnfmac/qlink_util.h +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_QLINK_UTIL_H_#define _QTN_FMAC_QLINK_UTIL_H_
drivers/net/wireless/quantenna/qtnfmac/qtn_hw_ids.h +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_HW_IDS_H_#define _QTN_HW_IDS_H_
drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include <linux/types.h> #include <linux/io.h>
drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_SHM_IPC_H_#define _QTN_FMAC_SHM_IPC_H_
drivers/net/wireless/quantenna/qtnfmac/shm_ipc_defs.h +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_SHM_IPC_DEFS_H_#define _QTN_FMAC_SHM_IPC_DEFS_H_
drivers/net/wireless/quantenna/qtnfmac/trans.c +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include <linux/types.h> #include <linux/export.h>
drivers/net/wireless/quantenna/qtnfmac/trans.h +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #ifndef _QTN_FMAC_TRANS_H_#define _QTN_FMAC_TRANS_H_
drivers/net/wireless/quantenna/qtnfmac/util.c +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015-2016 Quantenna Communications, Inc. -* All rights reserved. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ #include "util.h" #include "qtn_hw_ids.h"
drivers/net/wireless/quantenna/qtnfmac/util.h +2 -15
@@ -1,18 +1,5 @@ -/* -* Copyright (c) 2015 Quantenna Communications -* -* Permission to use, copy, modify, and/or distribute this software for any -* purpose with or without fee is hereby granted, provided that the above -* copyright notice and this permission notice appear in all copies. -* -* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* Copyright (c) 2015 Quantenna Communications. All rights reserved. */ #ifndef QTNFMAC_UTIL_H #define QTNFMAC_UTIL_H
Signature · 1 line
2.11.0
PATCH v2 7/9 qtnfmac: add missing bss record to host scan cache
In reply to Sergey MatyukevichMake sure that valid BSS entry exists in wireless core record even in the case of successful connect reported by firmware.
--- drivers/net/wireless/quantenna/qtnfmac/event.c | 79 ++++++++++++++++++++++++-- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 4 +- 2 files changed, 78 insertions(+), 5 deletions(-)
drivers/net/wireless/quantenna/qtnfmac/event.c +75 -4
@@ -145,6 +145,12 @@ qtnf_event_handle_bss_join(struct qtnf_vif *vif, const struct qlink_event_bss_join *join_info, u16 len) { +struct wiphy *wiphy =priv_to_wiphy (vif->mac); +enum ieee80211_statuscode status =le16_to_cpu (join_info->status); +struct cfg80211_chan_def chandef; +struct cfg80211_bss *bss =NULL ; +u8 *ie =NULL ; +if (unlikely (len <sizeof (*join_info))) { pr_err("VIF%u.%u: payload is too short (%u < %zu)\n", vif->mac->macid, vif->vifid, len,
@@ -158,15 +164,80 @@ qtnf_event_handle_bss_join(struct qtnf_vif *vif,return -EPROTO ; } -pr_debug ("VIF%u.%u: BSSID:%pM\n" , vif->mac->macid, vif->vifid, - join_info->bssid); +pr_debug ("VIF%u.%u: BSSID:%pM status:%u\n" , + vif->mac->macid, vif->vifid, join_info->bssid, status); + +if (status ==WLAN_STATUS_SUCCESS ) { +qlink_chandef_q2cfg (wiphy, &join_info->chan, &chandef); +if (!cfg80211_chandef_valid (&chandef)) { +pr_warn ("MAC%u.%u: bad channel freq=%u cf1=%u cf2=%u bw=%u\n" , + vif->mac->macid, vif->vifid, + chandef.chan->center_freq, + chandef.center_freq1, + chandef.center_freq2, + chandef.width); + status =WLAN_STATUS_UNSPECIFIED_FAILURE ; + goto done; + } + bss =cfg80211_get_bss (wiphy, chandef.chan, join_info->bssid, +NULL ,0 ,IEEE80211_BSS_TYPE_ESS , +IEEE80211_PRIVACY_ANY ); +if (!bss) { +pr_warn ("VIF%u.%u: add missing BSS:%pM chan:%u\n" , + vif->mac->macid, vif->vifid, + join_info->bssid, chandef.chan->hw_value); + +if (!vif->wdev.ssid_len) { +pr_warn ("VIF%u.%u: SSID unknown for BSS:%pM\n" , + vif->mac->macid, vif->vifid, + join_info->bssid); + status =WLAN_STATUS_UNSPECIFIED_FAILURE ; + goto done; + } + + ie =kzalloc (2 + vif->wdev.ssid_len,GFP_KERNEL ); +if (!ie) { +pr_warn ("VIF%u.%u: IE alloc failed for BSS:%pM\n" , + vif->mac->macid, vif->vifid, + join_info->bssid); + status =WLAN_STATUS_UNSPECIFIED_FAILURE ; + goto done; + } + + ie[0 ] =WLAN_EID_SSID ; + ie[1 ] = vif->wdev.ssid_len; +memcpy (ie +2 , vif->wdev.ssid, vif->wdev.ssid_len); + + bss =cfg80211_inform_bss (wiphy, chandef.chan, +CFG80211_BSS_FTYPE_UNKNOWN , + join_info->bssid,0 , +WLAN_CAPABILITY_ESS ,100 , + ie,2 + vif->wdev.ssid_len, +0 ,GFP_KERNEL ); +if (!bss) { +pr_warn ("VIF%u.%u: can't connect to unknown BSS: %pM\n" , + vif->mac->macid, vif->vifid, + join_info->bssid); + status =WLAN_STATUS_UNSPECIFIED_FAILURE ; + goto done; + } + } + } + +done:cfg80211_connect_result (vif->netdev, join_info->bssid,NULL ,0 ,NULL , -0 ,le16_to_cpu (join_info->status),GFP_KERNEL ); +0 , status,GFP_KERNEL ); +if (bss) { +if (!ether_addr_equal (vif->bssid, join_info->bssid)) +ether_addr_copy (vif->bssid, join_info->bssid); +cfg80211_put_bss (wiphy, bss); + } -if (le16_to_cpu (join_info->status) ==WLAN_STATUS_SUCCESS ) +if (status ==WLAN_STATUS_SUCCESS )netif_carrier_on (vif->netdev); +kfree (ie);return 0 ; }
drivers/net/wireless/quantenna/qtnfmac/qlink.h +3 -1
@@ -6,7 +6,7 @@#include <linux/ieee80211.h> -#define QLINK_PROTO_VER 12 +#define QLINK_PROTO_VER 13#define QLINK_MACID_RSVD 0xFF#define QLINK_VIFID_RSVD 0xFF
@@ -975,11 +975,13 @@ struct qlink_event_sta_deauth {/** * struct qlink_event_bss_join - data for QLINK_EVENT_BSS_JOIN event * +* @chan: new operating channel definition * @bssid: BSSID of a BSS which interface tried to joined. * @status: status of joining attempt, see &enum ieee80211_statuscode. */ struct qlink_event_bss_join {struct qlink_event ehdr; +struct qlink_chandef chan;u8 bssid[ETH_ALEN ];__le16 status; } __packed;
Signature · 1 line
2.11.0
PATCH v2 8/9 qtnfmac: remove unused declarations
In reply to Sergey MatyukevichRemove declarations for inexistent functions from bus.h header.
--- drivers/net/wireless/quantenna/qtnfmac/bus.h | 2 -- 1 file changed, 2 deletions(-)
drivers/net/wireless/quantenna/qtnfmac/bus.h +0 -2
@@ -122,7 +122,5 @@ static __always_inline void qtnf_bus_unlock(struct qtnf_bus *bus)int qtnf_core_attach (struct qtnf_bus *bus);void qtnf_core_detach (struct qtnf_bus *bus); -void qtnf_txflowblock (struct device *dev,bool state); -void qtnf_txcomplete (struct device *dev,struct sk_buff *txp,bool success);#endif /* QTNFMAC_BUS_H */
Signature · 1 line
2.11.0
PATCH v2 9/9 qtnfmac: qtnf_cmd_send_with_reply cleanup
In reply to Sergey MatyukevichUse existing variable with dereferenced cmd_id field.
--- drivers/net/wireless/quantenna/qtnfmac/commands.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/net/wireless/quantenna/qtnfmac/commands.c +4 -6
@@ -87,14 +87,12 @@ static int qtnf_cmd_send_with_reply(struct qtnf_bus *bus, vif_id = cmd->vifid; cmd->mhdr.len =cpu_to_le16 (cmd_skb->len); -pr_debug ("VIF%u.%u cmd=0x%.4X\n" , mac_id, vif_id, -le16_to_cpu (cmd->cmd_id)); +pr_debug ("VIF%u.%u cmd=0x%.4X\n" , mac_id, vif_id, cmd_id);if (bus->fw_state !=QTNF_FW_STATE_ACTIVE && -le16_to_cpu (cmd->cmd_id) !=QLINK_CMD_FW_INIT ) { + cmd_id !=QLINK_CMD_FW_INIT ) {pr_warn ("VIF%u.%u: drop cmd 0x%.4X in fw state %d\n" , - mac_id, vif_id,le16_to_cpu (cmd->cmd_id), - bus->fw_state); + mac_id, vif_id, cmd_id, bus->fw_state);dev_kfree_skb (cmd_skb);return -ENODEV ; }
@@ -128,7 +126,7 @@ static int qtnf_cmd_send_with_reply(struct qtnf_bus *bus,return qtnf_cmd_resp_result_decode (le16_to_cpu (resp->result));pr_warn ("VIF%u.%u: cmd 0x%.4X failed: %d\n" , - mac_id, vif_id,le16_to_cpu (cmd->cmd_id), ret); + mac_id, vif_id, cmd_id, ret);return ret; }
Signature · 1 line
2.11.0