[PATCH 1/8] rtlwifi: rtl8821ae: Remove set but not used variables 'rtstatus','bd'

2019-10-04 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c: In function rtl8812ae_phy_config_rf_with_headerfile: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:2079:7: warning: variable rtstatus set but not used [-Wunused-but-set-variable] drivers/n

[PATCH 8/8] rtlwifi: rtl8723: Remove set but not used variable 'own'

2019-10-04 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c: In function rtl8723_cmd_send_packet: drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c:226:5: warning: variable own set but not used [-Wunused-but-set-variable] It is not used s

[PATCH 0/8] net/rtlwifi: remove some unused variables

2019-10-04 Thread zhengbin
zhengbin (8): rtlwifi: rtl8821ae: Remove set but not used variables 'rtstatus','bd' rtlwifi: rtl8723ae: Remove set but not used variables 'reg_ecc','reg_ec4','reg_eac','b_pathb_ok' rtlwifi: rtl8192c: Remove set but not used variables 'reg_ecc','reg_eac' rtlwifi: rtl8188ee: Remove se

[PATCH 4/8] rtlwifi: rtl8188ee: Remove set but not used variables 'v3','rtstatus','reg_ecc','reg_ec4','reg_eac','b_pathb_ok'

2019-10-04 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c: In function phy_config_bb_with_pghdr: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c:652:22: warning: variable v3 set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/r

[PATCH 6/8] rtlwifi: btcoex: Remove set but not used variable 'result'

2019-10-04 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c: In function btc8192e2ant_tdma_duration_adjust: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c:1584:6: warning: variable result set but not used [-Wunused-but-set-var

[PATCH 5/8] rtlwifi: rtl8188ee: Remove set but not used variable 'h2c_parameter'

2019-10-04 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c: In function rtl88e_dm_pwdb_monitor: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c:763:6: warning: variable h2c_parameter set but not used [-Wunused-but-set-variable] It is not used since co

[PATCH 2/8] rtlwifi: rtl8723ae: Remove set but not used variables 'reg_ecc','reg_ec4','reg_eac','b_pathb_ok'

2019-10-04 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c: In function rtl8723e_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:1346:6: warning: variable reg_ecc set but not used [-Wunused-but-set-variable] drivers/net/wireless/rea

[PATCH 3/8] rtlwifi: rtl8192c: Remove set but not used variables 'reg_ecc','reg_eac'

2019-10-04 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c: In function rtl92c_phy_iq_calibrate: drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c:1373:6: warning: variable reg_ecc set but not used [-Wunused-but-set-variable] drivers/net/wi

[PATCH 7/8] rtlwifi: btcoex: Remove set but not used variables 'wifi_busy','bt_info_ext'

2019-10-04 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c: In function btc8723b1ant_tdma_dur_adj_for_acl: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:1428:7: warning: variable wifi_busy set but not used [-Wunused-but-set-

Re: [PATCH 0/8] net/rtlwifi: remove some unused variables

2019-10-04 Thread Pkshih
On Fri, 2019-10-04 at 16:43 +0800, zhengbin wrote: > zhengbin (8): >   rtlwifi: rtl8821ae: Remove set but not used variables 'rtstatus','bd' >   rtlwifi: rtl8723ae: Remove set but not used variables > 'reg_ecc','reg_ec4','reg_eac','b_pathb_ok' >   rtlwifi: rtl8192c: Remove set but not used vari

[PATCH] rtw88: 8822c: Remove set but not used variable 'corr_val'

2019-10-04 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtw88/rtw8822c.c: In function rtw8822c_dpk_dc_corr_check: drivers/net/wireless/realtek/rtw88/rtw8822c.c:2166:5: warning: variable corr_val set but not used [-Wunused-but-set-variable] It is not used since commit 5227c2e

Re: [PATCH 5.4 regression fix] brcmfmac: Fix brcmf_cfg80211_get_channel returning uninitialized fields

2019-10-04 Thread Arend Van Spriel
On 10/3/2019 10:08 PM, Hans de Goede wrote: With the new edmg support struct cfg80211_chan_def has been extended with a number of new members. brcmf_cfg80211_get_channel() was not setting (clearing) these causing the cfg80211_edmg_chandef_valid() check in cfg80211_chandef_valid() to fail. Trigger

[PATCH 2/2] cfg80211: wext: Reject malformed SSID elements

2019-10-04 Thread Will Deacon
Ensure the SSID element is bounds-checked prior to invoking memcpy() with its length field. Cc: Cc: Johannes Berg Cc: Kees Cook Reported-by: Nicolas Waisman Signed-off-by: Will Deacon --- net/wireless/wext-sme.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/net/

[PATCH 1/2] mac80211: Reject malformed SSID elements

2019-10-04 Thread Will Deacon
Although this shouldn't occur in practice, it's a good idea to bounds check the length field of the SSID element prior to using it for things like allocations or memcpy operations. Cc: Cc: Johannes Berg Cc: Kees Cook Reported-by: Nicolas Waisman Signed-off-by: Will Deacon --- net/mac80211/ml

Re: [PATCH 5.4 regression fix] brcmfmac: Fix brcmf_cfg80211_get_channel returning uninitialized fields

2019-10-04 Thread Kalle Valo
Hans de Goede writes: > With the new edmg support struct cfg80211_chan_def has been extended > with a number of new members. brcmf_cfg80211_get_channel() was not setting > (clearing) these causing the cfg80211_edmg_chandef_valid() check in > cfg80211_chandef_valid() to fail. Triggering a WARN_ON

Re: [PATCH 5.4 regression fix] brcmfmac: Fix brcmf_cfg80211_get_channel returning uninitialized fields

2019-10-04 Thread Hans de Goede
Hi, On 10/4/19 12:34 PM, Kalle Valo wrote: Hans de Goede writes: With the new edmg support struct cfg80211_chan_def has been extended with a number of new members. brcmf_cfg80211_get_channel() was not setting (clearing) these causing the cfg80211_edmg_chandef_valid() check in cfg80211_chandef

Re: [PATCH 5.4 regression fix] brcmfmac: Fix brcmf_cfg80211_get_channel returning uninitialized fields

2019-10-04 Thread Kalle Valo
Hans de Goede writes: > Hi, > > On 10/4/19 12:34 PM, Kalle Valo wrote: >> Hans de Goede writes: >> >>> With the new edmg support struct cfg80211_chan_def has been extended >>> with a number of new members. brcmf_cfg80211_get_channel() was not setting >>> (clearing) these causing the cfg80211_edm

Re: [PATCH 2/2] mac80211: Support LIVE_ADDRESS_CHANGE feature

2019-10-04 Thread Johannes Berg
Hi, I was tempted to apply this (sans the feature advertisement part that I don't think should be in nl80211), but: > > Signed-off-by: James Prestwood Please add a commit log. > +static int ieee80211_can_live_addr_change(struct ieee80211_sub_if_data > *sdata) > +{ > + if (netif_carrier_o

Re: [PATCH v3] mac80211: fix scan blocked on DFS channels in ETSI domains

2019-10-04 Thread Johannes Berg
On Thu, 2019-10-03 at 08:13 +, Aaron Komisar wrote: > > The real reason of scan failure is because mac80211 checks if it's DFS > > channel, but it doesn't check if CAC is done or not. > > The problem is that scan request is blocked in ETSI reg domains. In non-ETSI > reg domains the behavior i

Re: [PATCH 1/2] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-10-04 Thread Johannes Berg
Just took a very brief look so I can think about it while offline ;-) But some (editorial) comments: > +/** > + * ieee80211_sta_register_pending_airtime - register the estimated airtime > for > + * the frames pending in lower layer (firmware/hardware) txq. That doesn't work - the short descript

Re: [PATCH 1/2] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-10-04 Thread Johannes Berg
On Thu, 2019-10-03 at 23:21 -0700, Kan Yan wrote: > > +/* The firmware's transmit queue size limit in airtime */ > +#define IEEE80211_DEFAULT_AQL_INTERFACE_LIMIT24000 I'm not sure I understand this completely, but IMHO rewording it to be like a "NIC limit" would be better. However, I'm n

[PATCH 1/2] mac80211: accept deauth frames in IBSS mode

2019-10-04 Thread Luca Coelho
From: Johannes Berg We can process deauth frames and all, but we drop them very early in the RX path today - this could never have worked. Fixes: 2cc59e784b54 ("mac80211: reply to AUTH with DEAUTH if sta allocation fails in IBSS") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- n

[PATCH 0/2] cfg80211/mac80211 patches from our internal tree 2019-10-04

2019-10-04 Thread Luca Coelho
From: Luca Coelho Hi, A couple of patches with mac80211 and cfg80211 changes from our internal tree. Please review, though you have already reviewed most if not all of them ;) Cheers, Luca. Johannes Berg (1): mac80211: accept deauth frames in IBSS mode Sara Sharon (1): cfg80211: fix a b

[PATCH 2/2] cfg80211: fix a bunch of RCU issues in multi-bssid code

2019-10-04 Thread Luca Coelho
From: Sara Sharon cfg80211_update_notlisted_nontrans() leaves the RCU critical session too early, while still using nontrans_ssid which is RCU protected. In addition, it performs a bunch of RCU pointer update operations such as rcu_access_pointer and rcu_assign_pointer. The caller, cfg80211_info

[PATCH 8/8] iwlwifi: pcie: fix memory leaks in iwl_pcie_ctxt_info_gen3_init

2019-10-04 Thread Luca Coelho
From: Navid Emamdoost In iwl_pcie_ctxt_info_gen3_init there are cases that the allocated dma memory is leaked in case of error. DMA memories prph_scratch, prph_info, and ctxt_info_gen3 are allocated and initialized to be later assigned to trans_pcie. But in any error case before such assignment

[PATCH 6/8] iwlwifi: pcie: fix rb_allocator workqueue allocation

2019-10-04 Thread Luca Coelho
From: Johannes Berg We don't handle failures in the rb_allocator workqueue allocation correctly. To fix that, move the code earlier so the cleanup is easier and we don't have to undo all the interrupt allocations in this case. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- driver

[PATCH 7/8] iwlwifi: dbg_ini: fix memory leak in alloc_sgtable

2019-10-04 Thread Luca Coelho
From: Navid Emamdoost In alloc_sgtable if alloc_page fails, the alocated table should be released. Signed-off-by: Navid Emamdoost Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/intel/iwlwifi/f

[PATCH 5/8] iwlwifi: pcie: fix indexing in command dump for new HW

2019-10-04 Thread Luca Coelho
From: Johannes Berg We got a crash in iwl_trans_pcie_get_cmdlen(), while the TFD was being accessed to sum up the lengths. We want to access the TFD here, which is the information for the hardware. We always only allocate 32 buffers for the cmd queue, but on newer hardware (using TFH) we can als

[PATCH 1/8] iwlwifi: don't access trans_cfg via cfg

2019-10-04 Thread Luca Coelho
From: Luca Coelho We copy cfg->trans to trans->trans_cfg at the very beginning, so don't try to access it via cfg->trans anymore, because the cfg may be unset in later cases. Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/iwl-io.h | 12 ++-- 1 file changed, 6 inserti

[PATCH 0/8] iwlwifi: fixes intended for 5.4 2019-10-04

2019-10-04 Thread Luca Coelho
From: Luca Coelho This is my first patchset with fixes for v5.4. The changes are: * fix for an ACPI table parsing bug; * a fix for a NULL pointer dereference in the cfg with specific devices; * fix the rb_allocator; * prevent multiple phy configuration with new devices; * fix a race-condition

[PATCH 3/8] iwlwifi: mvm: force single phy init

2019-10-04 Thread Luca Coelho
From: Haim Dreyfuss The PHY is initialized during device initialization, but devices with the tx_siso_diversity flag set need to send PHY_CONFIGURATION_CMD first, otherwise the PHY would be reinitialized, causing a SYSASSERT. To fix this, use a bit that tells the FW not to complete the PHY initi

[PATCH 4/8] iwlwifi: mvm: fix race in sync rx queue notification

2019-10-04 Thread Luca Coelho
From: Naftali Goldstein Consider the following flow: 1. Driver starts to sync the rx queues due to a delba. mvm->queue_sync_cookie=1. This rx-queues-sync is synchronous, so it doesn't increment the cookie until all rx queues handle the notification from FW. 2. During this time, driv

[PATCH 2/8] iwlwifi: fix ACPI table revision checks

2019-10-04 Thread Luca Coelho
From: Luca Coelho We can't check for the ACPI table revision validity in the same if where we check if the package was read correctly, because we return PTR_ERR(pkg) and if the table is not valid but the pointer is, we would return a valid pointer as an error. Fix that by moving the table checks

[PATCH] mt76x0: eeprom: add support for MAC address from OF

2019-10-04 Thread Adrian Schmutzler
From: Pawel Dembicki mt76x0e driver only supports MAC addresses from calibration data eeprom. Many routers however do not have a valid stock address set in this field. This patch makes it possible to take a MAC address from OF (e.g. from mtd). Cc: Felix Fietkau Signed-off-by: Pawel Dembicki

Re: [PATCH 4/8] iwlwifi: mvm: fix race in sync rx queue notification

2019-10-04 Thread Kalle Valo
Luca Coelho writes: > From: Naftali Goldstein > > Consider the following flow: > 1. Driver starts to sync the rx queues due to a delba. > mvm->queue_sync_cookie=1. > This rx-queues-sync is synchronous, so it doesn't increment the > cookie until all rx queues handle the notification

Re: [PATCH 01/14] rtw88: check firmware leave lps successfully

2019-10-04 Thread Kalle Valo
wrote: > From: Chin-Yen Lee > > Driver needs to wait for firmware to restore hardware setting > to active mode after leaving lps. > > After getting H2C from driver for leaving lps, firmware will > issue null packet without PS bit to inform AP driver is active, > and then restore REG_TCR Regist

Re: [PATCH V3] brcmfmac: add support for SAE authentication offload

2019-10-04 Thread Kalle Valo
Chi-Hsien Lin wrote: > From: Chung-Hsien Hsu > > The firmware may have SAE authentication code built-in. This is > detected by the driver and indicated in the wiphy features flags. > User-space can use this flag to determine whether or not to provide > the password material for SAE authenticati

Re: [PATCH 1/2] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-10-04 Thread Toke Høiland-Jørgensen
Kan Yan writes: > In order for the Fq_CoDel integrated in mac80211 layer operates > effectively to control excessive queueing latency, the CoDel algorithm > requires an accurate measure of how long the packets stays in the > queue, aka sojourn time. The sojourn time measured at mac80211 layer > d

Re: [PATCH 1/2] mac80211: Reject malformed SSID elements

2019-10-04 Thread Kees Cook
On Fri, Oct 04, 2019 at 10:51:31AM +0100, Will Deacon wrote: > Although this shouldn't occur in practice, it's a good idea to bounds > check the length field of the SSID element prior to using it for things > like allocations or memcpy operations. > > Cc: > Cc: Johannes Berg > Cc: Kees Cook > R

Re: [PATCH 2/2] cfg80211: wext: Reject malformed SSID elements

2019-10-04 Thread Kees Cook
On Fri, Oct 04, 2019 at 10:51:32AM +0100, Will Deacon wrote: > Ensure the SSID element is bounds-checked prior to invoking memcpy() > with its length field. > > Cc: > Cc: Johannes Berg > Cc: Kees Cook > Reported-by: Nicolas Waisman > Signed-off-by: Will Deacon Reviewed-by: Kees Cook -Kees

Re: [PATCH 2/2] mac80211: Support LIVE_ADDRESS_CHANGE feature

2019-10-04 Thread James Prestwood
On Fri, 2019-10-04 at 13:56 +0200, Johannes Berg wrote: > Hi, > > I was tempted to apply this (sans the feature advertisement part that > I > don't think should be in nl80211), but: > > > > > Signed-off-by: James Prestwood > > Please add a commit log. > > > +static int ieee80211_can_live_addr

Re: [PATCH 2/2] mac80211: Support LIVE_ADDRESS_CHANGE feature

2019-10-04 Thread James Prestwood
Hi Johannes, After thinking about this more: On Fri, 2019-10-04 at 09:25 -0700, James Prestwood wrote: > On Fri, 2019-10-04 at 13:56 +0200, Johannes Berg wrote: > > Hi, > > > > I was tempted to apply this (sans the feature advertisement part > > that > > I > > don't think should be in nl80211),

Re: [PATCH v3] mac80211: fix scan blocked on DFS channels in ETSI domains

2019-10-04 Thread Peter Oh
On 10/4/19 5:15 AM, Johannes Berg wrote: On Thu, 2019-10-03 at 08:13 +, Aaron Komisar wrote: The real reason of scan failure is because mac80211 checks if it's DFS channel, but it doesn't check if CAC is done or not. The problem is that scan request is blocked in ETSI reg domains. In non

Re: [PATCH 4/8] iwlwifi: mvm: fix race in sync rx queue notification

2019-10-04 Thread Luca Coelho
On Fri, 2019-10-04 at 16:41 +0300, Kalle Valo wrote: > Luca Coelho writes: > > > From: Naftali Goldstein > > > > Consider the following flow: > > 1. Driver starts to sync the rx queues due to a delba. > > mvm->queue_sync_cookie=1. > > This rx-queues-sync is synchronous, so it doesn't i

[PATCH] staging: wilc1000: don't use wdev while setting tx power

2019-10-04 Thread Adham.Abozaeid
From: Adham Abozaeid WILC doesn't support per-vif tx power, and hence, wdev will always be null in calls to set_tx_power. Instead, wiphy should be used to execute the operation Signed-off-by: Adham Abozaeid --- .../staging/wilc1000/wilc_wfi_cfgoperations.c| 16 +++- 1 file chan

Re: [PATCH 1/2] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-10-04 Thread Kan Yan
Hi Johannes, Thanks for help review this patch. I will fix all style errors. > > +ieee80211_txq_airtime_check(struct ieee80211_hw *hw, struct ieee80211_txq > > *txq); > Why is it necessary to call this, vs. just returning NULL when an SKB is > requested? This function is also called by ath10k,

Re: [PATCH 1/2] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-10-04 Thread Kan Yan
Hi Toke, > So I think it'll be better to pass up the last_rate and have mac80211 > calculate the airtime (like I did in my patch set). But we can keep the > rest of your logic and just switch the calculation, I guess? Sounds like a good plan to me. Moving the airtime calculation do makes it easier