aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2014-07-07iwlwifi: mvm: Use CS tx block bit for AP/GOAndrei Otcheretianski7-3/+136
An AP/GO may perform the channel switch slightly before its stations. This scenario may result in packet loss, since the transmission may start before the client is actually on a new channel. In order to prevent potential packet loss disable tx to all the stations when the channel switch flow starts. Clear the disable_tx bit when a station is seen on a target channel, or after IWL_MVM_CS_UNBLOCK_TX_TIMEOUT beacons on a new channel. In addition call ieee80211_sta_block_awake in order to inform mac80211 that the frames for this station should be buffered. Signed-off-by: Andrei Otcheretianski <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: Reflect GO channel switch in NoAAndrei Otcheretianski6-10/+153
According to the spec, GO/AP should perform the channel switch just before "beacon 0". However, since the exact timing isn't defined, it may result in a sudden GO disappearance from the channel. Prevent potential packet loss when performing the CS by scheduling NoA time event and executing the channel switch flow when a notification from fw is received. Signed-off-by: Andrei Otcheretianski <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: Protect mvm->csa_vif with RCUAndrei Otcheretianski3-9/+20
Currently mvm->csa_vif is protected with mvm mutex. The RCU protection is required for "iwlwifi: mvm: Reflect GO channel switch in NoA" patch. Signed-off-by: Andrei Otcheretianski <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: Use beacon_get_template instead of beacon_getAndrei Otcheretianski1-1/+2
Call ieee80211_beacon_get_template instead of ieee80211_beacon_get and sync the CSA counters with mac80211 after each beacon transmission. Signed-off-by: Andrei Otcheretianski <[email protected]> Reviewed-by: Luciano Coelho <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: CSA unbind-bind flow support for clientLuciano Coelho1-10/+25
Implement support for unbind-bind flow for the client roles. This includes telling the firmware that we are not associated, removing time-events, removing quotas and updating power management during the actual switch, and redoing everything in the new channel. Signed-off-by: Luciano Coelho <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: add switch_vif_chanctx operationLuciano Coelho3-32/+135
Implement the switch_vif_chanctx operation with support for a single-vif and SWAP mode. The REASSIGN mode and multi-vifs are not supported yet. This operation needs to implement 4 steps, namely unassign, remove, add and assign the chanctx. In order to do this, split out these operations into locked and non-locked parts, thus allowing us to call them while locked. Additionally, in order to allow us to restart the hardware when something fails, add a boolean to the iwl_mvm_nic_restart() function that tells whether the restart was triggered by a FW error or something else. Signed-off-by: Luciano Coelho <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: remove update type argument from quota updateJohannes Berg4-62/+19
It turns out that adding the update type argument was pointless as quota update is never called from the add_interface() callback. Therefore, IWL_MVM_QUOTA_UPDATE_TYPE_NEW isn't actually needed and then only a "disabled_vif" argument is needed for the upcoming CSA work. Remove the whole enum iwl_mvm_quota_update_type and pass the right arguments (always NULL for disabled vif right now) to the function in all current call sites. Signed-off-by: Johannes Berg <[email protected]> Reviewed-by: Luciano Coelho <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: don't pass update type to quota iteratorJohannes Berg1-11/+5
Simplify the quota iterator by not passing the update type, it only needs to know whether or not to skip an interface. Signed-off-by: Johannes Berg <[email protected]> Reviewed-by: Luciano Coelho <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: validate that we don't send zero quotaJohannes Berg1-0/+8
The firmware currently deals with zero quota for a given binding, but it seems odd to send that down. Make sure that we don't do that. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: don't send zero quota to the firmwareJohannes Berg1-5/+5
There are some cases where we can currently send zero quota for a valid binding, e.g. if we update while an interface is bound to a channel context but not yet acting as an AP. Avoid this by reordering the checks. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: let iwl_mvm_update_quotas disregard a disabled vifLuciano Coelho4-20/+61
In some cases (e.g. when we're doing a channel switch), we may need to disable the quota of a vif temporarily. In order to do so, add an argument to the iwl_mvm_update_quotas() function to tell if the passed vif is a new one or if it should be disregarded. Signed-off-by: Luciano Coelho <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: 8000: drop a print when the address is invalidEran Harary1-0/+3
when driver takes the MAC address from the HW section and it isn't valid - print an error. Signed-off-by: Eran Harary <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: fix endianity in scan commandDavid Spinadel2-5/+5
Signed-off-by: David Spinadel <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: init lmac scan commandDavid Spinadel1-7/+13
Initialize LMAC scan command. Fix EBS flag to be dependant on TLV flg and fix other bugs. Signed-off-by: David Spinadel <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: add unified LMAC scan APIDavid Spinadel7-70/+653
Add new scan API that uses the same command 0x51 for both regular and sched scan. Signed-off-by: David Spinadel <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: rs: don't save debugfs filesEliad Peller2-26/+10
These file are removed recursively anyway, so there's no point saving them just to redundantly remove them later. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: rs: don't clear persistent fieldsEliad Peller2-52/+59
iwl_mvm_rs_rate_init() is called multiple times to re-init the rate scaling statistics (e.g. after some idle time). It clears all the lq_sta sta, including some fields that shouldn't be cleared (e.g. debugfs pointers). Fix it by adding a new 'persistent' sub-struct, and avoid clearing it on (re-)init. Move the initialization of the persistent fields to rs_alloc_sta instead. Signed-off-by: Eliad Peller <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: warn about empty OTPEran Harary1-0/+2
Signed-off-by: Eran Harary <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: BT Coex - relax constraints when TTC / RRC is activeEmmanuel Grumbach2-9/+18
When TxTxCo-Running is active, we can relax the constraints on the rate control. When RxRxCo-Running is active, we can relax the constrains on SMPS. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: BT Coex - fix debugfs with old APIEmmanuel Grumbach1-35/+148
Fix the debugfs hook to make it able to display the data with the old firmware API. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: BT Coex - add High Band retentionEmmanuel Grumbach2-0/+3
Tell the firmware if TTC should be enabled when switching to High Band. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: BT Coex - convert reduced Tx power to new APIEmmanuel Grumbach1-22/+7
No need to send the big BT_COEX_CMD command, we have now a much thiner command that updates only what is needed. Adapt the code to that. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: BT Coex - convert the co-running update to new APIEmmanuel Grumbach1-29/+7
No need to send the big BT_COEX_CMD command, we have now a much thiner command that updates only what is needed. Adapt the code to that. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: BT Coex - convert the sw boost update to new APIEmmanuel Grumbach1-42/+16
No need to send the big BT_COEX_CMD command, we have now a much thiner command that updates only what is needed. Adapt the code to that, and open the patch to the updates. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: BT Coex - new APIEmmanuel Grumbach6-175/+233
Start the new BT Coex implementation. Don't react to notifications for now - only the initial configuration is implemented. The rest will happen in next patches. Since coex.c now uses the new the new structures in all functions, we need to adapt the code to compile, even if it doesn't run yet. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-07iwlwifi: mvm: BT Coex - prepare towards new APIEmmanuel Grumbach7-38/+1448
A new API is coming. This new API is not backward compatible. So we need to keep the old commands to be able to work with the former API. Move all the current code into a new file: coex_legacy. If a firmware with the new API is detected, we currently just bail out since the implementation of the new API will come in future patches. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-06iwlwifi: mvm: fix merge damageEmmanuel Grumbach1-7/+0
Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-06iwlwifi: mvm: remove unused flags from TX commandEmmanuel Grumbach2-15/+2
These flags are not used by the firmware anyway. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-06iwlwifi: rename iwl_fw_error_fw_mon to iwl_fw_error_dump_fw_monEmmanuel Grumbach2-4/+4
This is matches the convention of the other structures. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-06iwlwifi: mvm: read the mac address in family 8000Eran Harary1-12/+48
In family 8000 products the MAC address in the OTP could be in either: - WFPM address - PCIE address In sdio product we should read it from the WFPM, in pcie product we should read it from the PCIe location. This is relevant only from otp version 0xE08 and above. While at it, fix the bytes order in version 0xE08. Signed-off-by: Eran Harary <[email protected]> Reviewed-by: Liad Kaufman <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-06iwlwifi: mvm: wait for d0i3 exit in add interface flowGregory Greenman2-9/+32
This patch makes sure there're no target accesses in the add interface flow before d0i3 exit completes. Signed-off-by: Gregory Greenman <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-06iwlwifi: mvm: update layout of firmware error dumpEmmanuel Grumbach1-1/+1
The memory was not zeroed - fix that. Also update the iwl_fw_error_dump_info structure. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-06iwlwifi: mvm: kill iwl_mvm_fw_error_rxf_dumpEmmanuel Grumbach4-132/+100
Its content can move to the caller. While at it, move iwl_mvm_fw_error_rxf_dump to caller. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-06iwlwifi: mvm: don't collect logs in the interrupt threadEmmanuel Grumbach3-44/+12
Instead of reading all the data in the context of the interrupt thread, collect the data in the restart flow before the actual restart takes place so that the device still has all the information. Remove iwl_mvm_fw_error_sram_dump and move its content to iwl_mvm_fw_error_dump. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-06iwlwifi: remove wrong comment about alignment in iwl-fw-error-dump.hEmmanuel Grumbach1-2/+2
The chunks of data do not need to be multipliers of 4 nor 4-bytes aligned. Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-06iwlwifi: fix naming mistake for the fw_monitor module parameterEmmanuel Grumbach1-1/+1
Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-06Merge remote-tracking branch 'wireless-next/master' into iwlwifi-nextEmmanuel Grumbach165-1378/+4923
2014-07-06Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-nextEmmanuel Grumbach5-22/+18
2014-07-03mwifiex: initialize Tx/Rx info of a packet correctlyAmitkumar Karwar7-0/+8
There are few places at the begining of Tx/Rx paths where tx_info/rx_info is not correctly initialized. This patch takes care of it. Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Avinash Patil <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-07-03iwlwifi: mvm: disable CTS to SelfEmmanuel Grumbach1-3/+2
Firmware folks seem say that this flag can make trouble. Drop it. The advantage of CTS to self is that it slightly reduces the cost of the protection, but make the protection less reliable. Cc: <[email protected]> [3.13+] Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-03iwlwifi: dvm: don't enable CTS to selfEmmanuel Grumbach1-12/+0
We should always prefer to use full RTS protection. Using CTS to self gives a meaningless improvement, but this flow is much harder for the firmware which is likely to have issues with it. CC: <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-07-01b43: add more bcma coresRafał Miłecki1-0/+12
This adds some cores with 0x2057 radio which will be supported soon as well as core 40 that I missed in the earlier firmware patch. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-07-01b43: N-PHY: complete generic support for 0x2057 radioRafał Miłecki3-20/+282
It doesn't include any device (radio revision) specific code yet, so it isn't really usable. As the commit says, it's just some generic code. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-07-01b43: N-PHY: fixes for radio 0x2057Rafał Miłecki2-22/+61
Enable initialization and update calibration code to fix: b43-phy0 ERROR: Radio 0x2057 rcal timeout b43-phy0 debug: Radio 0x2057 rccal timeout b43-phy0 debug: Radio 0x2057 rccal timeout b43-phy0 ERROR: Radio 0x2057 rcal timeout Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-07-01rtl818x_pci: fix pci probe returns success when it failsAndrea Merello1-0/+4
There are several exit path from the PCI probe function. Some of them, that are taken in case of errors, forget to set the "err" variable, that is returned by the probe function. This can lead to the kernel thinking the probe function succeeds while it didn't, and this in turn causes extra calls to the "remove" function. This patch fix this problem by ensuring "err" variable is assigned to a proper non-zero value in each exit path. Signed-off-by: Andrea Merello <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-07-01rtl818x_pci: handle broken PIO mappingAndrea Merello2-4/+21
All boards supported by this driver could work using PIO or MMIO for accessing registers. This driver tries to access HW by using MMIO, and, if this fails for somewhat reason, the driver tries to fall back to PIO mode. MMIO-mode is straightforward on all boards. PIO-mode is straightforward on rtl8180 only. On rtl8185 and rtl8187se boards not all registers are directly available in PIO mode (they are paged). On rtl8185 there are two pages and it is known how to switch page. PIO mode works, except for only one access to a register out of default page, recently added by me in the initialization code with patch: rtl818x_pci: Fix rtl8185 excessive IFS after CTS-to-self This can be easily fixed to work in both cases (MMIO and PIO). On rtl8187se, for a number of reasons, there is much more work to do to fix PIO access. PIO access is currently broken on rtl8187se, and it never worked. This patch fixes the said register write for rtl8185 and makes the driver to fail cleanly if PIO mode is attempted with rtl8187se boards. While doing this, I converted also a couple of printk(KERN_ERR) to dev_err(), in order to make checkpatch happy. Signed-off-by: Andrea Merello <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-07-01rtl8180: disable buggy rate fallback mechanismAndrea Merello1-5/+2
Currently the driver configures mac80211 to provide two rates for each TX frame: One initial rate and one alternate fallback rate, each one with its retry count. HW does not support fully this: rtl8180 doesn't have support for rate scaling at all, and rtl8185/rtl8187SE supports it in a way that does not fit with mac80211: The HW does automatically fall back to the next lower rate, and only a lower limit can be specified, so the HW may TX also on rates in between the two rates specified by mac80211. Furthermore only the total TX retry count can be specified for each packet, while the number of TX attempts before scaling rate can be configured only globally (not per each packet). Currently the driver sets the HW auto rate fallback mechanism to quickly scale rate after a couple of retries, and it uses the alternate rate requested by mac80211 as fallback limit rate (and it does this even wrongly). The HW indeed will behave differently than what mac80211 mandates, that is probably undesirable, and the reported TX retry count may not refer to what mac80211 thinks, and this could fool mac80211. This patch makes the driver to declare to mac80211 to support only one rate configuration for each packet, and it does disable the HW auto rate fallback mechanism, relying only on SW and letting mac80211 to do all by itself. This should ensure correct operation and fairness respect to mac80211. Indeed here tests with iperf do not show significant performance differences. Signed-off-by: Andrea Merello <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-07-01rtl8180: fix incorrect TX retry.Andrea Merello1-1/+1
HW is programmed with wrong retry count value for TX: Mac80211 passes to driver the number of times the TX should be attempted. The HW, instead, wants the number of time the TX should be retried if it fails the first time (assuming we have to TX it at least one time). This patch correct this. Signed-off-by: Andrea Merello <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-07-01rtl818x_pci: add comment pointing to the rtl8187se reference codeAndrea Merello1-0/+1
Rtl8187se support has been added to the rtl818x_pci driver by extracting a lot of information from a rtl8187se Linux staging driver included in the kernel at the time rtl8187se support was added. The rtl818x_pci main file has a comment that advertises this. Recently this staging driver has been removed from the kernel, but I still feel it can be useful as "reference" code (in case of bugs, or to implement improvements in rtl818x_pci driver). This one-line patch adds a comment in rtl818x_pci driver to point people searching for that "reference code" to the last kernel version still containing it (3.14). Signed-off-by: Andrea Merello <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-07-01rtl818x_pci: Fix rtl8185 excessive IFS after CTS-to-selfAndrea Merello1-0/+2
Measuring time between _end_ of CTS-to-self and _end_ of datapacket (with a prism54 board and mac80211 hacked to let the MAC timestamp stay untouched in the radiotap header) resulted in about 300uS, while the datapacket itself should be by far shorter (less than 100uS) and IFS should be SIFS (10uS). This measure was confirmed whith a scope: about 250uS IFS has been seen between the two packets. This situation causes the CTS-to-self protection mechanism to work incorrectly due to the NAV expiring during, or even before beginning, the packet transmission, and it also causes the performances to be anyway reduced due to time waste. This problem has been seen at every packet TXed with CTS-to-self enabled on rtl8185 board. rtl8187se seems not affected (and rtl8180, being a 802.11b card, does not have CTS-to-self mechaninsm). This patch fixes this by adding a magic register write, making the board wait for correct SIFS after CTS-to-self packet. Signed-off-by: Andrea Merello <[email protected]> Signed-off-by: John W. Linville <[email protected]>