[PATCH] brcmfmac: Add 4356 sdio support
This adds support for the 4356-sdio wireless chip. Signed-off-by: Christian Daudt--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 4 +++- include/linux/mmc/sdio_ids.h | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index da0cdd3..a01039a 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -1098,6 +1098,7 @@ static const struct sdio_device_id brcmf_sdmmc_ids[] = { BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43430), BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4345), BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4354), + BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4356), { /* end: all zeroes */ } }; MODULE_DEVICE_TABLE(sdio, brcmf_sdmmc_ids); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c index 0e8f2a0..d3fd6b1 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c @@ -1333,6 +1333,7 @@ bool brcmf_chip_sr_capable(struct brcmf_chip *pub) switch (pub->chip) { case BRCM_CC_4354_CHIP_ID: + case BRCM_CC_4356_CHIP_ID: /* explicitly check SR engine enable bit */ pmu_cc3_mask = BIT(2); /* fall-through */ diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 43fd3f4..da8abff 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -612,6 +612,7 @@ BRCMF_FW_NVRAM_DEF(4339, "brcmfmac4339-sdio.bin", "brcmfmac4339-sdio.txt"); BRCMF_FW_NVRAM_DEF(43430, "brcmfmac43430-sdio.bin", "brcmfmac43430-sdio.txt"); BRCMF_FW_NVRAM_DEF(43455, "brcmfmac43455-sdio.bin", "brcmfmac43455-sdio.txt"); BRCMF_FW_NVRAM_DEF(4354, "brcmfmac4354-sdio.bin", "brcmfmac4354-sdio.txt"); +BRCMF_FW_NVRAM_DEF(4356, "brcmfmac4356-sdio.bin", "brcmfmac4356-sdio.txt"); static struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43143_CHIP_ID, 0x, 43143), @@ -627,7 +628,8 @@ static struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0x, 4339), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43430_CHIP_ID, 0x, 43430), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4345_CHIP_ID, 0xFFC0, 43455), - BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4354_CHIP_ID, 0x, 4354) + BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4354_CHIP_ID, 0x, 4354), + BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4356_CHIP_ID, 0x, 4356) }; static void pkt_align(struct sk_buff *p, int len, int align) diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 83430f2..0d126ae 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -36,6 +36,7 @@ #define SDIO_DEVICE_ID_BROADCOM_43430 0xa9a6 #define SDIO_DEVICE_ID_BROADCOM_4345 0x4345 #define SDIO_DEVICE_ID_BROADCOM_4354 0x4354 +#define SDIO_DEVICE_ID_BROADCOM_4356 0x4356 #define SDIO_VENDOR_ID_INTEL 0x0089 #define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402 -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] brcmfmac: Fix 'did not remove int handler' warning
brcmf_sdiod_intr_unregister call that removes both func1 and func2 interrupt handlers only called when brcmf_ops_sdio_remove is called for func 1 (which is the 2nd call) but sdio is expecting it to be removed at the end of each sdio_remove call. This is causing 'rmmod bcmrfmac' on a 4356-sdio chip to complain with: WARNING: driver brcmfmac did not remove its interrupt handler! The modification makes calling brcmf_sdiod_intr_unregister multiple times harmless by clearing the variables that track if interrupt handlers have been installed, and then calls it on every brcmf_ops_sdio_remove call instead of just remove for func 1. Note: this needs to be applied on top of "[PATCH] Fix kernel oops in failed chip_attach" Signed-off-by: Christian Daudt--- .../net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 17 +++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index 09635a9..590cd41 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -172,7 +172,7 @@ int brcmf_sdiod_intr_register(struct brcmf_sdio_dev *sdiodev) return 0; } -int brcmf_sdiod_intr_unregister(struct brcmf_sdio_dev *sdiodev) +void brcmf_sdiod_intr_unregister(struct brcmf_sdio_dev *sdiodev) { brcmf_dbg(SDIO, "Entering oob=%d sd=%d\n", @@ -195,6 +195,7 @@ int brcmf_sdiod_intr_unregister(struct brcmf_sdio_dev *sdiodev) } free_irq(pdata->oob_irq_nr, >func[1]->dev); sdiodev->irq_en = false; + sdiodev->oob_irq_requested = false; } if (sdiodev->sd_irq_requested) { @@ -202,9 +203,8 @@ int brcmf_sdiod_intr_unregister(struct brcmf_sdio_dev *sdiodev) sdio_release_irq(sdiodev->func[2]); sdio_release_irq(sdiodev->func[1]); sdio_release_host(sdiodev->func[1]); + sdiodev->sd_irq_requested = false; } - - return 0; } void brcmf_sdiod_change_state(struct brcmf_sdio_dev *sdiodev, @@ -1200,12 +1200,17 @@ static void brcmf_ops_sdio_remove(struct sdio_func *func) brcmf_dbg(SDIO, "sdio device ID: 0x%04x\n", func->device); brcmf_dbg(SDIO, "Function: %d\n", func->num); - if (func->num != 1) - return; - bus_if = dev_get_drvdata(>dev); if (bus_if) { sdiodev = bus_if->bus_priv.sdio; + + /* start by unregistering irqs */ + brcmf_sdiod_intr_unregister(sdiodev); + + if (func->num != 1) + return; + + /* only proceed with rest of cleanup if func 1 */ brcmf_sdiod_remove(sdiodev); dev_set_drvdata(>func[1]->dev, NULL); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h index c07ad25..f3da32f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h @@ -294,7 +294,7 @@ struct sdpcmd_regs { /* Register/deregister interrupt handler. */ int brcmf_sdiod_intr_register(struct brcmf_sdio_dev *sdiodev); -int brcmf_sdiod_intr_unregister(struct brcmf_sdio_dev *sdiodev); +void brcmf_sdiod_intr_unregister(struct brcmf_sdio_dev *sdiodev); /* sdio device register access interface */ u8 brcmf_sdiod_regrb(struct brcmf_sdio_dev *sdiodev, u32 addr, int *ret); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Fix kernel oops in failed chip_attach
When chip attach fails, brcmf_sdiod_intr_unregister is being called but that is too early as sdiodev->settings has not been set yet nor has brcmf_sdiod_intr_register been called. Change to use oob_irq_requested + newly created sd_irq_requested to decide on what to unregister at intr_unregister time. Steps to reproduce problem: - modprobe brcmfmac using buggy FW - rmmod brcmfmac - modprobe brcmfmac again. If done with a buggy firmware, brcm_chip_attach will fail on the 2nd modprobe triggering the call to intr_unregister and the kernel oops when attempting to de-reference sdiodev->settings->bus.sdio which has not yet been set. Signed-off-by: Christian Daudt--- .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 30 -- .../wireless/broadcom/brcm80211/brcmfmac/sdio.h| 1 + 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index da0cdd3..09635a9 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -166,6 +166,7 @@ int brcmf_sdiod_intr_register(struct brcmf_sdio_dev *sdiodev) sdio_claim_irq(sdiodev->func[1], brcmf_sdiod_ib_irqhandler); sdio_claim_irq(sdiodev->func[2], brcmf_sdiod_dummy_irqhandler); sdio_release_host(sdiodev->func[1]); + sdiodev->sd_irq_requested = true; } return 0; @@ -173,27 +174,30 @@ int brcmf_sdiod_intr_register(struct brcmf_sdio_dev *sdiodev) int brcmf_sdiod_intr_unregister(struct brcmf_sdio_dev *sdiodev) { - struct brcmfmac_sdio_pd *pdata; - brcmf_dbg(SDIO, "Entering\n"); + brcmf_dbg(SDIO, "Entering oob=%d sd=%d\n", + sdiodev->oob_irq_requested, + sdiodev->sd_irq_requested); - pdata = >settings->bus.sdio; - if (pdata->oob_irq_supported) { + if (sdiodev->oob_irq_requested) { + struct brcmfmac_sdio_pd *pdata; + + pdata = >settings->bus.sdio; sdio_claim_host(sdiodev->func[1]); brcmf_sdiod_regwb(sdiodev, SDIO_CCCR_BRCM_SEPINT, 0, NULL); brcmf_sdiod_regwb(sdiodev, SDIO_CCCR_IENx, 0, NULL); sdio_release_host(sdiodev->func[1]); - if (sdiodev->oob_irq_requested) { - sdiodev->oob_irq_requested = false; - if (sdiodev->irq_wake) { - disable_irq_wake(pdata->oob_irq_nr); - sdiodev->irq_wake = false; - } - free_irq(pdata->oob_irq_nr, >func[1]->dev); - sdiodev->irq_en = false; + sdiodev->oob_irq_requested = false; + if (sdiodev->irq_wake) { + disable_irq_wake(pdata->oob_irq_nr); + sdiodev->irq_wake = false; } - } else { + free_irq(pdata->oob_irq_nr, >func[1]->dev); + sdiodev->irq_en = false; + } + + if (sdiodev->sd_irq_requested) { sdio_claim_host(sdiodev->func[1]); sdio_release_irq(sdiodev->func[2]); sdio_release_irq(sdiodev->func[1]); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h index dcf0ce8c..c07ad25 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h @@ -186,6 +186,7 @@ struct brcmf_sdio_dev { struct brcmf_bus *bus_if; struct brcmf_mp_device *settings; bool oob_irq_requested; + bool sd_irq_requested; bool irq_en;/* irq enable flags */ spinlock_t irq_en_lock; bool irq_wake; /* irq wake enable flags */ -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] iwlwifi: mvm: don't override the rate with the AMSDU len
The TSO code creates A-MSDUs from a single large send. Each A-MSDU is an skb and skb->len doesn't include the number of bytes which need to be added for the headers being added (subframe header, TCP header, IP header, SNAP, padding). To be able to set the right value in the Tx command, we put the number of bytes added by those headers in driver_data in iwl_mvm_tx_tso and use this value in iwl_mvm_set_tx_cmd. The problem by setting this value in driver_data is that it overrides the ieee80211_tx_info. The bug manifested itself when we send P2P related frames in CCK since the rate in ieee80211_tx_info is zero-ed. This of course is a violation of the P2P specification. To fix this, copy the original ieee80211_tx_info to the stack and pass it to the functions which need it. Assign the number of bytes added by the headers to the driver_data inside the skb itself. Fixes: a6d5e32f247c ("iwlwifi: mvm: send large SKBs to the transport") Signed-off-by: Emmanuel Grumbach--- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 83 + 1 file changed, 48 insertions(+), 35 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index 75870e6..34731e2 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c @@ -105,6 +105,7 @@ void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb, struct iwl_tx_cmd *tx_cmd, struct ieee80211_tx_info *info, u8 sta_id) { + struct ieee80211_tx_info *skb_info = IEEE80211_SKB_CB(skb); struct ieee80211_hdr *hdr = (void *)skb->data; __le16 fc = hdr->frame_control; u32 tx_flags = le32_to_cpu(tx_cmd->tx_flags); @@ -185,7 +186,7 @@ void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb, tx_cmd->tx_flags = cpu_to_le32(tx_flags); /* Total # bytes to be transmitted */ tx_cmd->len = cpu_to_le16((u16)skb->len + - (uintptr_t)info->driver_data[0]); + (uintptr_t)skb_info->driver_data[0]); tx_cmd->next_frame_len = 0; tx_cmd->life_time = cpu_to_le32(TX_CMD_LIFE_TIME_INFINITE); tx_cmd->sta_id = sta_id; @@ -327,10 +328,11 @@ static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm, */ static struct iwl_device_cmd * iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb, - int hdrlen, struct ieee80211_sta *sta, u8 sta_id) + struct ieee80211_tx_info *info, int hdrlen, + struct ieee80211_sta *sta, u8 sta_id) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); + struct ieee80211_tx_info *skb_info = IEEE80211_SKB_CB(skb); struct iwl_device_cmd *dev_cmd; struct iwl_tx_cmd *tx_cmd; @@ -350,10 +352,10 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb, iwl_mvm_set_tx_cmd_rate(mvm, tx_cmd, info, sta, hdr->frame_control); - memset(>status, 0, sizeof(info->status)); - memset(info->driver_data, 0, sizeof(info->driver_data)); + memset(_info->status, 0, sizeof(skb_info->status)); + memset(skb_info->driver_data, 0, sizeof(skb_info->driver_data)); - info->driver_data[1] = dev_cmd; + skb_info->driver_data[1] = dev_cmd; return dev_cmd; } @@ -361,22 +363,25 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb, int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); + struct ieee80211_tx_info *skb_info = IEEE80211_SKB_CB(skb); + struct ieee80211_tx_info info; struct iwl_device_cmd *dev_cmd; struct iwl_tx_cmd *tx_cmd; u8 sta_id; int hdrlen = ieee80211_hdrlen(hdr->frame_control); - if (WARN_ON_ONCE(info->flags & IEEE80211_TX_CTL_AMPDU)) + memcpy(, skb->cb, sizeof(info)); + + if (WARN_ON_ONCE(info.flags & IEEE80211_TX_CTL_AMPDU)) return -1; - if (WARN_ON_ONCE(info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM && -(!info->control.vif || - info->hw_queue != info->control.vif->cab_queue))) + if (WARN_ON_ONCE(info.flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM && +(!info.control.vif || + info.hw_queue != info.control.vif->cab_queue))) return -1; /* This holds the amsdu headers length */ - info->driver_data[0] = (void *)(uintptr_t)0; + skb_info->driver_data[0] = (void *)(uintptr_t)0; /* * IWL_MVM_OFFCHANNEL_QUEUE is used for ROC packets that can be used @@ -385,7 +390,7 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
pull request: iwlwifi 2016-05-04
Hi Kalle, I know it is extremely late in the cycle, but this patch is intended for 4.6... It fixes a regression I introduced: a P2P specification violation as mentioned in the commit message. The patch is rather big in terms of number of lines changed, but the semantics is very simple. I have to copy the control block of the skb to the stack whereas we accessed we used to access it directly through a pointer. This obviously introduces a lot of line changes, but don't really change the behavior of the code (since most of the accesses are read only). Let me know how it goes. I take this opportunity to inform you that I will be replaced by Luca for a few months at least. I will be working full steam on a side project that will not allow me to do the maintainer job in parallel. Thank you! The following changes since commit f742aaf36edf0390c54d0614bc4d20fd4cd3762a: iwlwifi: mvm: fix accessing Null pointer during fw dump collection (2016-04-12 11:52:39 +0300) are available in the git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git tags/iwlwifi-for-kalle-2016-05-04 for you to fetch changes up to 5c08b0f5026fcc13efb947c4d1f2ca3558145f68: iwlwifi: mvm: don't override the rate with the AMSDU len (2016-05-04 20:59:55 +0300) * fix P2P rates (and possibly other issues) Emmanuel Grumbach (1): iwlwifi: mvm: don't override the rate with the AMSDU len drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 83 --- 1 file changed, 48 insertions(+), 35 deletions(-)
Re: [PATCH net-next 4/5] treewide: replace dev->trans_start update with helper
On Tue, May 03, 2016 at 04:33:13PM +0200, Florian Westphal wrote: > Replace all trans_start updates with netif_trans_update helper. > change was done via spatch: > > struct net_device *d; > @@ > - d->trans_start = jiffies > + netif_trans_update(d) > > Compile tested only. > > Cc: user-mode-linux-de...@lists.sourceforge.net > Cc: linux-xte...@linux-xtensa.org > Cc: linux1394-de...@lists.sourceforge.net > Cc: linux-r...@vger.kernel.org > Cc: net...@vger.kernel.org > Cc: mpt-fusionlinux@broadcom.com > Cc: linux-s...@vger.kernel.org > Cc: linux-...@vger.kernel.org > Cc: linux-par...@vger.kernel.org > Cc: linux-o...@vger.kernel.org > Cc: linux-h...@vger.kernel.org > Cc: linux-...@vger.kernel.org > Cc: linux-wireless@vger.kernel.org > Cc: linux-s...@vger.kernel.org > Cc: de...@driverdev.osuosl.org > Cc: b.a.t.m@lists.open-mesh.org > Cc: linux-blueto...@vger.kernel.org > Signed-off-by: Florian Westphal> --- [...] > net/batman-adv/soft-interface.c| 2 +- [...] > diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c > index 0710379..bae1397 100644 > --- a/net/batman-adv/soft-interface.c > +++ b/net/batman-adv/soft-interface.c > @@ -208,7 +208,7 @@ static int batadv_interface_tx(struct sk_buff *skb, > if (atomic_read(_priv->mesh_state) != BATADV_MESH_ACTIVE) > goto dropped; > > - soft_iface->trans_start = jiffies; > + netif_trans_update(soft_iface); > vid = batadv_get_vid(skb, 0); > ethhdr = eth_hdr(skb); > Acked-by: Antonio Quartulli -- Antonio Quartulli signature.asc Description: Digital signature
[PATCH] iw: support setting frame subtype and reason code when deleting station
Signed-off-by: Rafał Miłecki--- station.c | 65 --- 1 file changed, 62 insertions(+), 3 deletions(-) diff --git a/station.c b/station.c index 8fdb83a..b29b788 100644 --- a/station.c +++ b/station.c @@ -498,9 +498,68 @@ static int handle_station_get(struct nl80211_state *state, COMMAND(station, get, "", NL80211_CMD_GET_STATION, 0, CIB_NETDEV, handle_station_get, "Get information for a specific station."); -COMMAND(station, del, "", - NL80211_CMD_DEL_STATION, 0, CIB_NETDEV, handle_station_get, - "Remove the given station entry (use with caution!)"); + +static int handle_station_del(struct nl80211_state *state, + struct nl_msg *msg, + int argc, char **argv, + enum id_input id) +{ + char *end; + unsigned char mac_addr[ETH_ALEN]; + int subtype; + int reason_code; + + if (argc < 1) + return 1; + + if (mac_addr_a2n(mac_addr, argv[0])) { + fprintf(stderr, "invalid mac address\n"); + return 2; + } + + argc--; + argv++; + NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr); + + if (argc > 1 && strcmp(argv[0], "subtype") == 0) { + argv++; + argc--; + + subtype = strtod(argv[0], ); + if (*end != '\0') + return 1; + + NLA_PUT_U8(msg, NL80211_ATTR_MGMT_SUBTYPE, subtype); + argv++; + argc--; + } + + if (argc > 1 && strcmp(argv[0], "reason-code") == 0) { + argv++; + argc--; + + reason_code = strtod(argv[0], ); + if (*end != '\0') + return 1; + + NLA_PUT_U16(msg, NL80211_ATTR_REASON_CODE, reason_code); + argv++; + argc--; + } + + if (argc) + return 1; + + register_handler(print_sta_handler, NULL); + + return 0; + nla_put_failure: + return -ENOBUFS; +} +COMMAND(station, del, " [subtype ] [reason-code ]", + NL80211_CMD_DEL_STATION, 0, CIB_NETDEV, handle_station_del, + "Remove the given station entry (use with caution!)\n" + "Example subtype values: 0xA (disassociation), 0xC (deauthentication)"); static const struct cmd *station_set_plink; static const struct cmd *station_set_vlan; -- 1.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] linux-firmware: update rt2860.bin, rt2800pci driver
rt2860.bin: from 34 to 0.40 Cc: Shiang TuCc: Hua Shao (邵华) Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: linux-firmw...@kernel.org Signed-off-by: Xose Vazquez Perez --- WHENCE | 7 +-- rt2860.bin | Bin 8192 -> 8192 bytes 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/WHENCE b/WHENCE index b93f333..3feac35 100644 --- a/WHENCE +++ b/WHENCE @@ -1370,12 +1370,15 @@ Downloaded from http://www.mediatek.com/en/downloads/ Driver: rt2800pci - Ralink RT2860, RT2890, RT3090, RT3290, RT5390 wireless MACs File: rt2860.bin +Version: 40 + File: rt3290.bin +Version: 37 Licence: Redistributable. See LICENCE.ralink-firmware.txt for details -Binary file supplied by Shiang Tu . Firmware Version 34 -rt3290.bin is a specific firmware support the RT3290 chip. Firmware Version 37 +Binary file supplied originally by Shiang Tu , latest +from http://www.mediatek.com/en/downloads1/downloads/ -- diff --git a/rt2860.bin b/rt2860.bin index 85030fc2d9d91295f647e6d40557c65b6859d2b7..888c20c9f9f8174efec11db3eb666731cbacb4ec 100644 GIT binary patch delta 2029 zcmah}U2Gdw7WTb&@}D*{ TTFMhfVof zM|DvoQ`%Q6f2~mz+lx|kD3{w-ZXQ|Jr)OSJkmL2t~EuG4AC5(Y{LN&8}v2& zKo^;cX%6E|n>afBT($Ad=eH{_ox mmr9Md_@6!Ag+UoyXz;oscPzcImI>}5X=iF3c{H=;mjk#nWFGsNoXDupIQ{> z9v9C)>wWO7_sOz!Leiwq$G@)M^q-U(!$cuzvv#aZF^=y@YGWprr8M%21n6 z-Iuv~0p(o^sMnmv_C<4=vlG^j;Noq7i?>>Ew! {)g~zb)n9=W;dJcB2U3vFiYuKT@BjosH-6x?v@dieWWgdZqRhnIvzGb zHDqpXoP@J2=eSy0 X+7mNu)@f5qodI~l$0*JZ)JSZ=~Y?E0*ZcA3*zyWz-{$>z3ib)uXF`F?0RWKJX7 z2pa*nrYzMSs87cdsU5?3fl-3Uw3QAEbJ;uCe^^(?ta(V5XBmx|SKhgLfy ;gJnj1C*6 zXIq4h)Z1FQ(7#K5v_P*(6OUyeTL^ViA*PerPSq`AB4Lfsj49pLxNltT_Kj)nTLpAc zf_-nr!|YvtH#N$JjQDEcQhiks8;HakYFQTn2908P-heS@iqjcKw4?=WiE zZKKxcS|@>vu^v^tvxxO(bLq@(w|VKqZ3a?9X?CAzAVwQlVpz8UOblqqc;q9|MEx zC&1|Zyfv@v($yqucOCD8o37UqIv-iLFK)o4c0(N_rt_%I$H4e&`a6GO-$DN~9)FYb z-|F=LllL#j{l8KCAHM7H1kmzBhnJ5$uzd8Sm0N6wu?Qf#>DOS%R0GN5;Z-p(Vfc)i z!9fV4#s NWCO zUp=q#noAy+kYWi>D7+G=SWew_^w`{Wiols Zh7r>{q=yq@XAm8t%mQ}UC<8f@IpTeNAE3Y zeLElx|H$dqyj!`o9-eK5;tktM7jMkWIB9xU|DHg~s96O`IU*@fB{9T|4AqZUN{F89 zA1H+{>pW)`zqTs{1OhAX$}1_RrHdZ3NK~;J7eNhovZYrk;5%wKvWLO)m!LhMbN8By z31(>-~GtI{klt24(2okzrWvuorl{^15ci_S8j=tySw$*=%R~#2JC@Ta84kDO4%p zhEveGtUO$9iZ}%;rT7d4m~s44s+JX_2d^!FA$xkc@V_A_KuDcZGA3@{pvY+ z+{K+0^c~B*+AZSs${eng$Tk6M#HCb>-LhG#Mr96o5Dex;NGE#0Wxv~|_eU2XtM{WZ abddfzI*AfAGw?T>9k|?jX2{U5?)x5!c^4)C delta 2386 zcmah~TWs6b85R$zi|-^&-6cn0CCgUhnzrTJ>J_Rh}1aw<6siX~L+zU%@pjkFG# zU7f}YwufzDa)Jc~1|+D1JhU^kGzQjU=(^BD5d_OH$iTWibRag-1J-0FurM>a+1fdh z(>Q>|9}4T{a3;iOmzWp7l4<<8vX%lKY7)Ft!wxF@%gR+N z#2f25wFR*)OS`!v7i(*okH&08Cvx;75Tt$5|y@c0zUvnJk)*0%2^YZ!Xq`taU| z>u3V>yF=|)USE)Q?v>uhrw1CwCZ+bnj94#tT%QJ%LtGQTTdF?z z({}OoIY6D>l<9r*i#Umvd 2d2>l*-$?k}>(R>#rIUJF8y!eVJs*IpV{!Rn;sH*U~ zHLEg=*?-*vmugN|OD}F#F39PDpW2KFdvJxF5`L>S0cOkyEqW?{a+aEWc2i z=PxPz`zQI0S32J~)%kuwcpJKdOG4$m_7h_$vA0P@*Wc6bIfFHJ?fedUo3s>xsaO z2aMb*=rFz}=?;}@E4a)>3W7yYp2bPS(g>g>y7|%G7+k+drCL?0RZjzRSx+-2`iK>t zCUBTXvHLYrOULn(({pje@ttj>lAEpwSnAWQI2z!EQXDcy9BYD}P2xSP wx%=;D`GUp;)o&^AxOx*>98)!FI z=o_7JVNz9wj3XwI;&=?{>z7j}QJ2si+9Er_gunfq!rJ9bKT&9^D==6A1%=++79p;( z`%RVYFO09@hM6=GCZxAt+2wMeV|;2z!ah`uZ-6-VjFegV 54~scb}o Xf5gT>C$Vw=lW)L zCk?jA@{*B6l6xO@9cA3{*!9gc-GKKTs+#tskz94rIPb=b%B$#S?m$WMzfh7E-(6_o zsefb~D#I31W@%_~kOzOrG^s43Xa8+h9LCW4#lDmz1^TqWo4yPFh(D?_O?viY941Cj zyG$)#p~b2-M1+#xNrY(;J0=N|s`znr;-vWWLsnb`y(B??eP{C+UZWImZ{J&@nt+0y ziT#}CuFZRz@qWkUon^hYh>y`-i5QzKX>-P b9M5)GeMUm*ltOmn zc*JOt!hQ@?!}emL6#{nxz3z>5CKOsa$Y}=~xRc;F-t*2=R2+5red#gSQ5l0R z#+RhO((8~~yD%nA+sknfbdm-nujzTG+<~7ixd}g;F#A9eH>NI4(=`b0*UrV!X@5UG zu8pCe`+J@n)5c-vBXbyrjD|sJnknzbtYNjaZm$K~3$}jFo;T3Pj>9kPu>$+hd;Z|)
[PATCH 2/2] linux-firmware: update rt2870.bin, rt2800usb driver
rt2870.bin from 29 to 0.36 Cc: Shiang TuCc: Hua Shao (邵华) Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: linux-firmw...@kernel.org Signed-off-by: Xose Vazquez Perez --- WHENCE | 4 +++- rt2870.bin | Bin 8192 -> 8192 bytes 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/WHENCE b/WHENCE index 3feac35..1b72160 100644 --- a/WHENCE +++ b/WHENCE @@ -1393,10 +1393,12 @@ Licence: Redistributable. See LICENCE.ralink-firmware.txt for details Driver: rt2800usb - Ralink RT2870, RT3070, RT3071, RT3072, RT5370 wireless MACs File: rt2870.bin +Version: 36 Licence: Redistributable. See LICENCE.ralink-firmware.txt for details -Binary file supplied by Shiang Tu . Firmware Version 29 +Binary file supplied originally by Shiang Tu , latest +from http://www.mediatek.com/en/downloads1/downloads/ -- diff --git a/rt2870.bin b/rt2870.bin index f1535d1eced0844d0aba9e65d188f769624c9fa4..9ddac4a4bb190770789b1fbd7e28cea0a6349854 100644 GIT binary patch literal 8192 zcmeHMeQXrR6~Fzs^Z5gOw|D0|b2dJ ^O~ApQfit#Y@fk3%b=@i?plrxp zqO>x%g*bn-m9lY2{)r+YTWTxP$PK*^qBIb#qo`8)N42O)|EV; v@6=Jj4c$uoZo5#Yv$eF0$c^ zY;_46s%L`-C8sO0gcGW#q#{?OoD-I}iaPUSBwdc+ehGPSOhSCBSz}WU-P15dU@YM# z8J+nlC6R=xbVfsIHZYFTj7Mi4N9i9FQzeE7OMWftydOpW$gu%cR|RDC={%2wlIJ~F zZ}Ysj!CTei-P!9M*x?=6=^c>0&+qd7xledyNZ9%v;rrheJ~-lg`C;F?3IDsA|6@H+ z|CGZ)-FT6;F{7(K0=^R(!F|_M>Yoi9jIf- MreeCATxl?#E}vtU$#>ZiPqb2#j?nuU}12Zp*W=A_ mlfFvV`% znC7^Q)ecMvWf;ojXE1p?uxnWw%K>P;Xjfggu7(IDb+wY@6{P@g`n8oXf~-27U4uZk z63tBQ2bxG7{6w9`<2vxeuAVB~R_fO`8aAq4iWe+N3cJiAb5LWA!Ow289(x(-v2#R^ zorV59WJ~O2U|s{}EScxzI!lISW>4= zEj)P_67?44Z`#Y7)b!?NEL>h{Hg5~I%RafVNn1_l?0(yqz-%5Vk7;UtA1mnQSOfFa z;1l3IWE}4$ncNrg(L7gLwI-?zeuLE5+BeTg3i=AdLNc-9ZTldn;Rd3{MY>u`zq2Uf zO>K88C3sU{lUfqETXW^o*Oqc@MFek#d#WOmc%inzI+nR3W*tY$_fkiNV9%61)5=a$ zaszHiIcnidMjh6%MAxQ?V|wgoWPA$Z?X%*k6exoLeKL+} r3dv3@jt7Pqbp?)tR6;I#Of??CNyTyL(rwPYc(1zFxkp x^l8EFt|5ouq|iMHD@5<7P-9DW3^~2VFKQMKb)?X{d{su zF+3P9k3BBIxXaw8v1Tk|)#5F0$s|h$x~&7IBANl*5w(=k=sQYLv{`i-0Z|D5TnP0T z0b|18VP|0L;VqY!!sQ&&+<1FiH=LJ{X-mg4qm_x}1RsD!ti!dcPYOBlfe0>@Dl0)K zWzS1q5Id8#kQsqm^N@L1E5`?<_gw}hdGnBQ7((aN71FkxC H2Ub%m~#NHq-y((94x~7BZxhHU*rKwU1U$+A302^OYG@G z$@=EVL4NE$ZKZUd3%8G5(yFO8pJHgmgWF{?bB^#wfjjEB@*u4E;n5?J2l%o3!QlQm zgNq9rBu5jG!~EDG`{R_TqI8IwUDkqjtTuTEZjWR*33C@TW)d9R8o5X=E$sNAQFZQK
Re: mwifiex 8897 disable 11ac in sta mode
Hi, On Wed, May 4, 2016 at 3:04 PM, Amitkumar Karwarwrote: > Hi Marek, > >> From: Belisko Marek [mailto:marek.beli...@gmail.com] >> Sent: Wednesday, May 04, 2016 5:48 PM >> To: linux-wireless@vger.kernel.org; Amitkumar Karwar >> Subject: mwifiex 8897 disable 11ac in sta mode >> >> Hi, >> >> it is possible somehow to disable 11ac in mwifiex driver for sta mode(I >> tried in wpa_supplicant by disable_vht without success). Any ideas? Many >> thanks. > > There is not standard way. You can try attached hack. Thanks. It helps. > > Regards, > Amitkumar BR, marek -- as simple and primitive as possible - Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: mwifiex 8897 disable 11ac in sta mode
Hi Marek, > From: Belisko Marek [mailto:marek.beli...@gmail.com] > Sent: Wednesday, May 04, 2016 5:48 PM > To: linux-wireless@vger.kernel.org; Amitkumar Karwar > Subject: mwifiex 8897 disable 11ac in sta mode > > Hi, > > it is possible somehow to disable 11ac in mwifiex driver for sta mode(I > tried in wpa_supplicant by disable_vht without success). Any ideas? Many > thanks. There is not standard way. You can try attached hack. Regards, Amitkumar disable_11AC.diff Description: disable_11AC.diff
Re: [PATCH net-next 4/5] treewide: replace dev->trans_start update with helper
On Tuesday 03 May 2016 08:03 PM, Florian Westphal wrote: > Replace all trans_start updates with netif_trans_update helper. > change was done via spatch: > > struct net_device *d; > @@ > - d->trans_start = jiffies > + netif_trans_update(d) > > Compile tested only. > > Cc: user-mode-linux-de...@lists.sourceforge.net > Cc: linux-xte...@linux-xtensa.org > Cc: linux1394-de...@lists.sourceforge.net > Cc: linux-r...@vger.kernel.org > Cc: net...@vger.kernel.org > Cc: mpt-fusionlinux@broadcom.com > Cc: linux-s...@vger.kernel.org > Cc: linux-...@vger.kernel.org > Cc: linux-par...@vger.kernel.org > Cc: linux-o...@vger.kernel.org > Cc: linux-h...@vger.kernel.org > Cc: linux-...@vger.kernel.org > Cc: linux-wireless@vger.kernel.org > Cc: linux-s...@vger.kernel.org > Cc: de...@driverdev.osuosl.org > Cc: b.a.t.m@lists.open-mesh.org > Cc: linux-blueto...@vger.kernel.org > Signed-off-by: Florian Westphal> --- snip... > diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c > index 0fa75a8..3d4662d 100644 > --- a/drivers/net/ethernet/ti/cpsw.c > +++ b/drivers/net/ethernet/ti/cpsw.c > @@ -1381,7 +1381,7 @@ static netdev_tx_t cpsw_ndo_start_xmit(struct sk_buff > *skb, > struct cpsw_priv *priv = netdev_priv(ndev); > int ret; > > - ndev->trans_start = jiffies; > + netif_trans_update(ndev); > > if (skb_padto(skb, CPSW_MIN_PACKET_SIZE)) { > cpsw_err(priv, tx_err, "packet pad failed\n"); for cpsw Acked-by: Mugunthan V N Regards Mugunthan V N -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] mac80211_hwsim: Allow managing radios from non-initial namespaces
> > +static __net_init int hwsim_init_net(struct net *net) > > +{ > > + struct mac80211_hwsim_data *data; > > + bool exists = true; > > + int netgroup = 0; > > + > > + spin_lock_bh(_radio_lock); > > + while (exists) { > > + exists = false; > > + list_for_each_entry(data, _radios, list) { > > + if (netgroup == data->netgroup) { > > + exists = true; > > + netgroup++; > > + break; > > + } > > + } > > + } > > + spin_unlock_bh(_radio_lock); > > + > > + *(int *)net_generic(net, hwsim_net_id) = netgroup; > > This seems somewhat awkward. Why not just take the maximum of all the > netgroup IDs + 1? We'd run out of memory and radio IDs long before > netgroup IDs even that way My intention was to reuse netgroups for the case many namespaces come and go, but I agree that it is not optimal. > consider a new netns that doesn't have any hwsim radios yet. > Now you create *another* one, but it would get the same netgroup. Correct, that is indeed broken if there are no radios. > IOW, you should simply use a global counter. Surprising (net) > namespaces don't have an index like that already, but I don't see > one. Ok, will do that in a v2. > > +static void __net_exit hwsim_exit_net(struct net *net) > > +{ > > + struct mac80211_hwsim_data *entry, *tmp; > > + > > + spin_lock_bh(_radio_lock); > > + list_for_each_entry_safe(entry, tmp, _radios, list) { > > + if (net_eq(wiphy_net(entry->hw->wiphy), net)) { > > + list_del(>list); > > + INIT_WORK(>destroy_work, destroy_radio); > > + schedule_work(>destroy_work); > > + } > > + } > > + spin_unlock_bh(_radio_lock); > > +} > This changes today's default behaviour of moving the wiphys to the > default namespace. Did you intend to destroy them based on the > netgroup, i.e. based on the namespace that created them? Actually, > maybe they should move back to the namespace that created them, if > the namespace they are in is destroyed? But that's difficult, I don't > mind this behaviour, but I'm not sure it's what we want by default > for radios created in the init_net. With the proposed approach I destroy all radios if the owning namespace gets deleted, because we probably don't want them landing in init_net if they are created from a (unprivileged) userns process. I think this is what other "virtual" interfaces do (gre tunnels, veth etc.). If we think of hwsim radios as such a "virtual" device, that makes IMO sense to delete them. If we want to keep the existing behavior, we could move radios belonging to the init_net-associated netgroup back to init_net, that shouldn't be too difficult. Moving the radio back to the creators namespace would be the most consistent behavior, so I'll check how difficult such a reverse lookup is. We then would delete the radio only if it is in the creators namespace, or if the creators namespace is gone. Does that make sense? Martin -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 4/5] treewide: replace dev->trans_start update with helper
Hi, Florian Westphalwrites: > Replace all trans_start updates with netif_trans_update helper. > change was done via spatch: > > struct net_device *d; > @@ > - d->trans_start = jiffies > + netif_trans_update(d) > > Compile tested only. > > Cc: user-mode-linux-de...@lists.sourceforge.net > Cc: linux-xte...@linux-xtensa.org > Cc: linux1394-de...@lists.sourceforge.net > Cc: linux-r...@vger.kernel.org > Cc: net...@vger.kernel.org > Cc: mpt-fusionlinux@broadcom.com > Cc: linux-s...@vger.kernel.org > Cc: linux-...@vger.kernel.org > Cc: linux-par...@vger.kernel.org > Cc: linux-o...@vger.kernel.org > Cc: linux-h...@vger.kernel.org > Cc: linux-...@vger.kernel.org > Cc: linux-wireless@vger.kernel.org > Cc: linux-s...@vger.kernel.org > Cc: de...@driverdev.osuosl.org > Cc: b.a.t.m@lists.open-mesh.org > Cc: linux-blueto...@vger.kernel.org > Signed-off-by: Florian Westphal > --- for u_ether.c: Acked-by: Felipe Balbi > diff --git a/drivers/usb/gadget/function/u_ether.c > b/drivers/usb/gadget/function/u_ether.c > index 637809e..a3f7e7c 100644 > --- a/drivers/usb/gadget/function/u_ether.c > +++ b/drivers/usb/gadget/function/u_ether.c > @@ -597,7 +597,7 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb, > DBG(dev, "tx queue err %d\n", retval); > break; > case 0: > - net->trans_start = jiffies; > + netif_trans_update(net); > atomic_inc(>tx_qlen); > } -- balbi signature.asc Description: PGP signature
Re: [RESEND PATCH 1/3] rfkill: Create "rfkill-airplane-mode" LED trigger
Hi! > This creates a new LED trigger to be used by platform drivers as a > default trigger for airplane-mode indicator LEDs. > > By default this trigger will fire when RFKILL_OP_CHANGE_ALL is called > for all types (RFKILL_TYPE_ALL), setting the LED brightness to LED_FULL > when the changing the state to blocked, and to LED_OFF when the changing > the state to unblocked. In the future there will be a mechanism for > userspace to override the default policy, so it can implement its > own. If userspace wants to control the manually, it can do just that -- control it manually. There should not be a need to "override the default policy". Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: dynamic ps + offchannel mgmt_tx + HW RoC
On Wed, May 4, 2016 at 1:33 AM, Johannes Bergwrote: > On Wed, 2016-05-04 at 01:20 +0530, Krishna Chaitanya wrote: >> On Wed, May 4, 2016 at 1:05 AM, Johannes Berg > net> wrote: >> > >> > There is, btw, perhaps a different way - just fix the damn stuff. >> > >> > Requires moving everything into ifmgd rather than local, and then >> > perhaps if only a single managed interface exists mirroring its >> > state >> > into the existing driver calls etc. >> > >> > It'd still be a big task, and I don't see much advantage over just >> > reimplementing it. >> Yes, requires quite an effort and also need to handle lot of cases. >> Instead, why don't we make the default as complete PS offload >> and force the drivers who need to use mac80211 PS negate these >> in the register_hw? That way we are clear about the intentions. > > I don't really see a big advantage, and it'd create churn in a lot of > drivers. Maybe documenting it with the flags that we really think you > should set them or something, or making the powersave DOC section > mention this would be good, but beyond that I don't think it'd be a > good idea. that's fine with me. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch] iwlwifi: mvm: silence unintialized variable warning
"max_amsdu_len" isn't set if kstrtouint() fails. Signed-off-by: Dan Carpenterdiff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c index 362a546..cb8db23 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c @@ -1020,6 +1020,8 @@ static ssize_t iwl_dbgfs_max_amsdu_len_write(struct iwl_mvm *mvm, int ret; ret = kstrtouint(buf, 0, _amsdu_len); + if (ret) + return ret; if (max_amsdu_len > IEEE80211_MAX_MPDU_LEN_VHT_11454) return -EINVAL; -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch] iwlwifi: mvm: remove an unused variable
We never initalize ampdu_status so it causes a static checker warning when we pass it to iwl_mvm_pass_packet_to_mac80211(). Fortunately, it's never used so we can just remove it. Signed-off-by: Dan Carpenterdiff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c index 263e8a8..c9d419f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c @@ -100,7 +100,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm, struct napi_struct *napi, struct sk_buff *skb, struct ieee80211_hdr *hdr, u16 len, - u32 ampdu_status, u8 crypt_len, + u8 crypt_len, struct iwl_rx_cmd_buffer *rxb) { unsigned int hdrlen, fraglen; @@ -267,7 +267,6 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi, struct ieee80211_sta *sta = NULL; struct sk_buff *skb; u32 len; - u32 ampdu_status; u32 rate_n_flags; u32 rx_pkt_status; u8 crypt_len = 0; @@ -453,8 +452,8 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi, mvm->sched_scan_pass_all == SCHED_SCAN_PASS_ALL_ENABLED)) mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_FOUND; - iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, hdr, len, ampdu_status, - crypt_len, rxb); + iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, hdr, len, crypt_len, + rxb); } static void iwl_mvm_update_rx_statistics(struct iwl_mvm *mvm, -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch] rtlwifi: rtl818x: silence uninitialized variable warning
What about if "rtlphy->pwrgroup_cnt" is 2? In that case we would use an uninitialized "chnlgroup" variable and probably crash. Maybe that can't happen for some reason which is not obvious but in that case this patch is harmless. Setting it to zero seems like a standard default in the surrounding code so it's probably fine here as well. Signed-off-by: Dan Carpenterdiff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.c index 78a81c1..9475aa2 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.c @@ -208,8 +208,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw, "Realtek regulatory, 40MHz, writeval = 0x%x\n", writeval); } else { - if (rtlphy->pwrgroup_cnt == 1) - chnlgroup = 0; + chnlgroup = 0; if (rtlphy->pwrgroup_cnt >= 3) { if (chnl <= 3) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html