aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2016-09-26brcmfmac: fix memory leak in brcmf_fill_bss_paramRafał Miłecki1-1/+4
This function is called from get_station callback which means that every time user space was getting/dumping station(s) we were leaking 2 KiB. Signed-off-by: Rafał Miłecki <[email protected]> Fixes: 1f0dc59a6de ("brcmfmac: rework .get_station() callback") Cc: [email protected] # 4.2+ Acked-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26rtl8xxxu: Stop log spam from each successful interruptLarry Finger2-1/+3
As soon as debugging is turned on, the logs are filled with messages reporting the interrupt status. As this quantity is usually zero, this output is not needed. In fact, there will be a report if the status is not zero, thus the debug line in question could probably be deleted. Rather than taking that action, I have changed it to only be printed when the newly added RTL8XXXU_DEBUG_INTERRUPT bit is set in the debug mask. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26rtl8xxxu: Use a struct rtl8xxxu_fileops * in rtl8xxxu_init_device()Jes Sorensen1-18/+19
This saves some 217, or about, derefences of priv->fops. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26rtl8xxxu: Clean up llt_init() APIJes Sorensen2-6/+9
Remove last_tx_page argument from the llt_init() function. The rtl8xxxu_fileops structure contains the correct TX_TOTAL_PAGE_NUM value for the device, and rtl8xxxu_auto_llt_table() doesn't need to know the value in the first place. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26rtl8xxxu: Fix off by one error calculating pubqJes Sorensen1-1/+1
This was detected tracing the 8188eu driver, but doesn't seem to make any difference when using it. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26mwifiex: code rearrangement in mwifiex_usb_host_to_card()Amitkumar Karwar1-17/+6
This patch helps get rid of goto statement and improves readability. Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Cathy Luo <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26mwifiex: fix race condition causing tx timeoutCathy Luo1-3/+9
It's been observed that in a corner case mwifiex_usb_tx_complete() gets called before we exit from mwifiex_usb_host_to_card() after submitting the urb. 'data_sent' flag remains set in this case. It blocks further Tx packets and triggers watchdog timeout. The problem is fixed by setting data_sent and port_block flag at correct place. Signed-off-by: Cathy Luo <[email protected]> Signed-off-by: Shengzhen Li <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26mwifiex: fix kernel crash for USB chipsetsCathy Luo1-2/+2
Following crash issue is observed during TCP traffic stress test [ 2253.625439] NMI watchdog: BUG: soft lockup - CPU#3 stuck for 22s! [kworker/u17:1:5191] [ 2253.625520] Call Trace: [ 2253.625527] [<ffffffffc0b47030>] ? moal_spin_lock+0x30/0x30 [usb8xxx] [ 2253.625533] [<ffffffffc0ac3ceb>] ? wlan_wmm_lists_empty+0xb/0xf0 [mlan] [ 2253.625537] [<ffffffffc0ab0ea3>] mlan_main_process+0x1b3/0x720 [mlan] [ 2253.625540] [<ffffffffc0b337f5>] woal_main_work_queue+0x45/0x80 [usb8xxx] [ 2253.625543] [<ffffffff8108aaf0>] process_one_work+0x150/0x3f0 [ 2253.625545] [<ffffffff8108b1e1>] worker_thread+0x121/0x520 [ 2253.625547] [<ffffffff8108b0c0>] ? rescuer_thread+0x330/0x330 [ 2253.625549] [<ffffffff81090222>] kthread+0xd2/0xf0 [ 2253.625551] [<ffffffff81090150>] ? kthread_create_on_node+0x1c0/0x1c0 [ 2253.625553] [<ffffffff8179423c>] ret_from_fork+0x7c/0xb0 [ 2253.625555] [<ffffffff81090150>] ? kthread_create_on_node+0x1c0/0x1c0 In mwifiex_usb_tx_complete(), we are updating port->block_status first and then freeing the skb attached to that URB. We may end up attaching new skb to URB in a corner case and same will be freed. This results in the kernel crash. The problem is solved by changing the sequence. Signed-off-by: Cathy Luo <[email protected]> Signed-off-by: Shengzhen Li <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26brcmfmac: simplify mapping of auth typeHante Meuleman1-7/+1
The 802.11 standard only has four valid auth type configurations of which our firmware only supports two, ie. Open System and Shared Key. Simplify the mapping falling back to automatic for other types specified by user-space. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26brcmfmac: fix out of bound access on clearing wowl wake indicatorHante Meuleman1-2/+4
Clearing the wowl wakeindicator happens with a rather odd construction where the string "clear" is used to set the iovar wowl_wakeind. This was implemented incorrectly as it caused an out of bound access. Use an intermediate variable of correct length and copy string in that. Problem was found using coverity. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26brcmfmac: fix clearing entry IPv6 addressHante Meuleman1-2/+5
When IPv6 address is to be cleared there is a possible out of bound access. But also the clearing of the last entry and the adjustment of total number of stored IPv6 addresses is not updated. This patch fixes that bug. Bug was found using coverity. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26brcmfmac: remove unnecessary null pointer checkHante Meuleman1-2/+1
in the function brcmf_bus_start() in the exception handling a check is made to dermine whether ifp is null, though this is not possible. Removing the unnessary check. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26brcmfmac: remove worker from .ndo_set_mac_address() callbackArend Van Spriel2-28/+13
As it turns out there is no need to use a worker for the callback because it is not called from atomic context. Reported-by: Dan Williams <[email protected]> Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Franky Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26brcmfmac: initialize variable in brcmf_sdiod_regrl()Arend Van Spriel1-1/+1
In case of an error the variable returned is uninitialized. The caller will probably check the error code before using it, but better assure it is set to zero. Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26brcmfmac: fix memory leak in brcmf_flowring_add_tdls_peer()Arend Van Spriel1-2/+6
In the error paths in brcmf_flowring_add_tdls_peer() the allocated resource should be freed. Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26brcmfmac: rework pointer trickery in brcmf_proto_bcdc_query_dcmd()Arend Van Spriel1-1/+1
The variable info is assigned to point to bcdc->msg[1], which is the same as pointing to bcdc->buf. As that is what we want to access make it clear by fixing the assignment. This also avoid out-of-bounds errors from static analyzers are bcdc->msg[1] is not in the structure definition. Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Franky Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26brcmfmac: ignore 11d configuration errorsHante Meuleman1-12/+15
802.11d is not always supported by firmware anymore. Currently the AP configuration of 11d will cause an abort if the ioctl set is failing. This behavior is not correct and the error should be ignored. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26mwifiex: cfg80211 set_default_mgmt_key handlerGanapathi Bhat4-0/+31
Previously device used to start using IGTK key as Tx key as soon as it gets downloaded in add_key(). This patch implements set_default_mgmt_key handler. We will update Tx key ID in set_default_mgmt_key(). Signed-off-by: Ganapathi Bhat <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26wlcore: wl18xx: Use chip specific configuration firmwareTony Lindgren1-9/+10
Use the wl18xx specific config firmware we now have available. Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26wlcore: Fix config firmware loading issuesTony Lindgren3-23/+35
Booting multiple wl12xx and wl18xx devices using the same rootfs is a pain. You currently have to symlink the right nvs file depending on the wl12xx type. For example, with wl1271-nvs.bin being a symlink to wl127x-nvs.bin by default and trying to bring up a wl128x based device: wlcore: ERROR nvs size is not as expected: 1113 != 912 wlcore: ERROR NVS file is needed during boot wlcore: ERROR NVS file is needed during boot wlcore: ERROR firmware boot failed despite 3 retries Note that wl18xx uses a separate config firmware wl18xx-conf.bin that can be generated with tools using the following two git repos: git.ti.com/wilink8-wlan/18xx-ti-utils git.ti.com/wilink8-wlan/wl18xx_fw So let's not configure the nvs file for wl18xx as it's not needed AFAIK. If it turns out that we also need the nvs file for wl18xx, we can just add it to the config firmware data for wl18xx. Let's fix the issue by using the chip specific config firmware data, and make sure we produce understandable warnings if something is missing. Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26wlcore: spi: Populate config firmware dataTony Lindgren1-18/+24
Configure the config firmware names and make it available in platform data. Let's also fix the order of the struct wilink_family_data while at it. Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26wlcore: sdio: Populate config firmware dataTony Lindgren1-29/+47
Configure the config firmware names and make it available in platform data. Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-26wlcore: Prepare family to fix nvs file handlingTony Lindgren2-8/+11
Move struct wilink_family_data to be available for all TI WLAN variants. And fix familiy typo, it should be just family. Looks like wl12xx use two different nvs.bin files and wl18xx uses a different conf.bin file. Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-10/+9
2016-09-22iwlwifi: mvm: correct rate_idx bounds-checkJohannes Berg1-1/+1
The upper bound IWL_RATE_COUNT_LEGACY should be used with a >= check, rejecting the value itself; fix that. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-22iwlwifi: mvm: bail out if CTDP start operation failsLuca Coelho1-1/+4
We were assigning the return value of iwl_mvm_ctdp_command() to a variable, but never checking it. If this command fails, we should not allow the interface up process to proceed, since it is potentially dangerous to ignore thermal management requirements. Fixes: commit 5c89e7bc557e ("iwlwifi: mvm: add registration to cooling device") Signed-off-by: Luca Coelho <[email protected]>
2016-09-22iwlwifi: pcie: avoid variable shadowing in TFD helpersJohannes Berg2-33/+33
The various TFD/TB helpers have two code paths depending on the type of TFD supported, with variable shadowing due to the new if branches. Move the fall-through code into else branches to avoid variable shadowing. While doing so, rename some of the variables and do some other cleanups (like removing void * casts of void * pointers.) Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-22iwlwifi: add two new 9560 series PCI IDsOren Givon1-0/+2
Add two new PCI IDs for the 9560 series. Signed-off-by: Oren Givon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-22iwlwifi: mvm: cleanup usage of init_dbg parameterSara Sharon1-14/+14
Move the init_dbg check to earlier in the function to simplify the code. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-22iwlwifi: mvm: cleanup redundant no_power_up_nic_in_init configSara Sharon2-32/+15
This is never really used anymore. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-21carl9170: fix debugfs crashesChristian Lamparter1-2/+4
Ben Greear reported: > I see lots of instability as soon as I load up the carl9710 NIC. > My application is going to be poking at it's debugfs files... > > BUG: KASAN: slab-out-of-bounds in carl9170_debugfs_read+0xd5/0x2a0 > [carl9170] at addr 0xffff8801bc1208b0 > Read of size 8 by task btserver/5888 > ======================================================================= > BUG kmalloc-256 (Tainted: G W ): kasan: bad access detected > ----------------------------------------------------------------------- > > INFO: Allocated in seq_open+0x50/0x100 age=2690 cpu=2 pid=772 >... This breakage was caused by the introduction of intermediate fops in debugfs by commit 9fd4dcece43a ("debugfs: prevent access to possibly dead file_operations at file open") Thankfully, the original/real fops are still available in d_fsdata. Reported-by: Ben Greear <[email protected]> Signed-off-by: Christian Lamparter <[email protected]> Cc: stable <[email protected]> # 4.7+ Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-21b43legacy: fix debugfs crashChristian Lamparter1-2/+4
This patch fixes a crash that happens because b43legacy's debugfs code expects file->f_op to be a pointer to its own b43legacy_debugfs_fops struct. This is no longer the case since commit 9fd4dcece43a ("debugfs: prevent access to possibly dead file_operations at file open") Reviewed-by: Nicolai Stange <[email protected]> Signed-off-by: Christian Lamparter <[email protected]> Cc: stable <[email protected]> # 4.7+ Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-21b43: fix debugfs crashChristian Lamparter1-2/+4
This patch fixes a crash that happens because b43's debugfs code expects file->f_op to be a pointer to its own b43_debugfs_fops struct. This is no longer the case since commit 9fd4dcece43a ("debugfs: prevent access to possibly dead file_operations at file open") Reviewed-by: Nicolai Stange <[email protected]> Signed-off-by: Christian Lamparter <[email protected]> Cc: stable <[email protected]> # 4.7+ Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-19iwlwifi: pcie: use LIST_HEAD() macroJohannes Berg1-3/+1
There's no need to declare a list and then init it manually, just use the LIST_HEAD() macro. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: mvm: use LIST_HEAD() macroJohannes Berg1-3/+1
There's no need to declare a list and then init it manually, just use the LIST_HEAD() macro. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: mvm: set HCMD_NAME for PHY_DB as wellSara Sharon3-2/+3
Currently it is logged as UNKNOWN. Also, 0x6c seems to be the permanent ID for this command, remove incorrect comment and uncomment the command from the commands list. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: mvm: Add mem debugfs entryIdo Yariv2-0/+179
In order to access cached/paged memory, there are a couple of firmware commands (one for UMAC and one for LMAC) that let the host access memory and registers indirectly. Since this is done by the firmware on behalf of the host, even if memory is paged out or cached, the host will retrieve the memory as the firmware sees it (paged out memory will get paged in). Export this mechanism via a debugfs entry for both read and write access. WARNING: This mechanism has no protections at all. Invalid addresses may crash or hang the firmware. Writing to arbitrary memory also comes with no guarantees. Signed-off-by: Ido Yariv <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: mvm: move AP-specific code to right functionJohannes Berg1-22/+20
There's no need for the common MAC context function to have an if on AP mode, the values can be overridden in the AP-specific function later. Clean that up by adding the full command as a new parameter to the AP-specific function, and doing it there. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: add new 8265 series PCI IDOren Givon1-0/+1
Add a new PCI ID for the 8265 series. Signed-off-by: Oren Givon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: mvm: Add debugfs function for clocks diffRoee Zamir3-0/+49
New function, reveals the diff between gp2 and host time. Signed-off-by: Roee Zamir <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: migrate to devm_* APISharon Dvir2-55/+34
Change PCIE and trans resource allocations to managed resources. Signed-off-by: Sharon Dvir <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: mvm: disable P2P queue on mac context releaseSara Sharon1-0/+5
AP queue is properly released, but P2P queue isn't. Fixes: commit 4c965139a3cd ("iwlwifi: mvm: support p2p device frames tx on dqa queue #2") Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: don't export trace points that are used in iwlwifi onlyEmmanuel Grumbach1-3/+0
This can save a few bytes Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: mvm: document passing unexpected Block Ack Request framesJohannes Berg1-0/+5
When we get an unexpected Block Ack Request frame, the BAID from the hardware will be invalid, and we'll pass it to mac80211 for further handling (sending a delBA action frame.) Add a comment explaining that, in case anyone looks in the future. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: move to wide ID for all commandsSara Sharon7-10/+15
Due to firmware design considerations, move to wide ID for all commands. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: mvm: make iwl_mvm_update_sta() an inlineJohannes Berg2-10/+8
There's no point in making this an out-of-line function since it just calls a single other function with a few changed parameters. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: pcie: log full command sequenceSara Sharon1-2/+3
Log group as well. Remove 0x prefix to match TX logging. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: move BIOS MCC retrieval to common codeArik Nemtsov3-93/+109
This will be used by more than MVM, so move it to iwlwifi While at it, rename WRD_METHOD to the more appropriate WRDD_METHOD and add some documentation. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: mvm: support packet injectionSara Sharon1-0/+55
For automatic testing packet injection can be useful. Support injection through debugfs. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: mvm: Add support for RRM by scanAvrahams Stern5-14/+88
Implement support for RRM by adding an option to configure the scan dwell time and reporting scan start time and BSS detection time, and Advertise support for these features. Signed-off-by: David Spinadel <[email protected]> Signed-off-by: Avraham Stern <[email protected]> Signed-off-by: Luca Coelho <[email protected]>