summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ralink
Commit message (Collapse)AuthorAgeFilesLines
...
| * rt2800: replace mdelay by usleep on vco calibration.Stanislaw Gruszka2016-12-301-1/+1
| | | | | | | | | | | | | | This procedure can sleep, hence mdelay is not needed. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2x00: merge agc and vco works with link tunerStanislaw Gruszka2016-12-303-128/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | We need to perform different actions (AGC and VCO calibrations and VGC tuning) periodically at different intervals. We don't need separate works for those, we can use link tuner work and just check for proper interval on it. This fixes performing AGC and VCO calibration when scanning on STA mode. We need to be on-channel to perform those calibrations. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: perform VCO recalibration for RF5592 chipStanislaw Gruszka2016-12-301-0/+2
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: warn if doing VCO recalibration for unknow RF chipStanislaw Gruszka2016-12-301-0/+2
| | | | | | | | | | | | | | | | Since we reset TX_PIN_CFG register, we have to finish recalibration. Warn if this is not possible. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: rename adjust_freq_offset functionStanislaw Gruszka2016-12-301-8/+8
| | | | | | | | | | | | | | | | We have different modes of adjusting freq offset on different chips. Call current adjustment similarly like vendor driver - mode1 . Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: set MAX_PSDU len according to remote STAs capabilitiesStanislaw Gruszka2016-12-305-7/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAX_LEN_CFG_MAX_PSDU specify maximum transmitted by HW AMPDU length (0 - 8kB, 1 - 16kB, 2 - 32kB, 3 - 64kB). Set this option according to remote stations capabilities (based on HT ampdu_factor). However limit the value based our hardware TX capabilities as some chips can not send more than 16kB (factor 1). Limit for all chips is currently 32kB (factor 2), but perhaps for some chips this could be increased to 64kB by setting drv_data->max_psdu to 3. Since MAX_LEN_CFG_MAX_PSDU is global setting, on multi stations modes (AP, IBSS, mesh) we limit according to less capable remote STA. We can not set bigger value to speed up communication with some stations and do not break communication with slow stations. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: set minimum MPDU and PSDU lengths to sane valuesStanislaw Gruszka2016-12-301-2/+2
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: don't set ht parameters for non-aggregated framesStanislaw Gruszka2016-12-301-6/+6
| | | | | | | | | | | | | | | | Do not set ampdu_density and ba_size for frames without AMPDU bit i.e. frames that will not be aggregated to AMPDU. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: make rx ampdu_factor depend on number of rx chainsStanislaw Gruszka2016-12-301-1/+1
| | | | | | | | | | | | | | | | Initalize max ampdu_factor supported by us based on rx chains, vendor driver do the same. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ktime: Cleanup ktime_set() usageThomas Gleixner2016-12-251-2/+2
|/ | | | | | | | | | ktime_set(S,N) was required for the timespec storage type and is still useful for situations where a Seconds and Nanoseconds part of a time value needs to be converted. For anything where the Seconds argument is 0, this is pointless and can be replaced with a simple assignment. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
* Merge tag 'wireless-drivers-next-for-davem-2016-11-25' of ↵David S. Miller2016-11-279-59/+58
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.10 Major changes: iwlwifi * finalize and enable dynamic queue allocation * use dev_coredumpmsg() to prevent locking the driver * small fix to pass the AID to the FW * use FW PS decisions with multi-queue ath9k * add device tree bindings * switch to use mac80211 intermediate software queues to reduce latency and fix bufferbloat wl18xx * allow scanning in AP mode ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * rt2800: disable CCK rates on HTStanislaw Gruszka2016-11-231-1/+0
| | | | | | | | | | | | | | Sending frames in CCK rates on HT can cause performance problems. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: tune *_PROT_CFG parametersStanislaw Gruszka2016-11-231-8/+8
| | | | | | | | | | | | | | | | Use RTS/CTS protection for TXOP on all rates modes as default and disable CCK rates (this cause performance problems). Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: use RTS/CTS protection instead of CTS-to-selfStanislaw Gruszka2016-11-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change default to RTS/CTS protection. This has a cost of transmitting one more control frame (RTS) however protect us from traffic from hidden node. On station mode will use CTS-to-self if AP will configure that for the network. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: correct TX_SW_CFG1 for 5592Stanislaw Gruszka2016-11-231-2/+5
| | | | | | | | | | | | | | Those TX_SW_CFG1 values are used in vendor driver. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: correct AUTO_RSP_CFGStanislaw Gruszka2016-11-231-4/+2
| | | | | | | | | | | | | | | | | | | | Initialize AUTO_RSP_CFG register to similar value as vendor driver does. Do not set BAC_ACK_POLICY based on short preamble setting, those are unrelated. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: do not overwrite WPDMA_GLO_CFG_WP_DMA_BURST_SIZEStanislaw Gruszka2016-11-231-1/+0
| | | | | | | | | | | | | | | | | | | | We already initlized WPDMA_GLO_CFG_WP_DMA_BURST_SIZE to 3 on rt2800_init_registers() for USB devices. For PCI devices we will use HW default setting, which is 2, so patch does not change behaviour on PCI devices. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: OFDM rates are mandatoryStanislaw Gruszka2016-11-231-1/+1
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800usb: do not wipe out USB_DMA_CFG settingsStanislaw Gruszka2016-11-231-4/+1
| | | | | | | | | | | | | | | | | | We should not reset USB_DMA_CFG on rt2800usb_init_registers() as this function is called indirectly from rt2800_enable_radio(). If we do so, we wipe out USB_DMA_CFG settings from rt2800usb_enable_radio(). Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2800: correctly report MCS TX parametersStanislaw Gruszka2016-11-231-10/+13
| | | | | | | | | | | | | | | | | | We should only set IEEE80211_HT_MCS_TX_RX_DIF when TX and RX MCS sets are not equal, i.e. when number of tx streams is different than number of RX streams. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2x00: Fix incorrect usage of CONFIG_RT2X00_LIB_USBVishal Thanki2016-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | In device removal routine, usage of "#ifdef CONFIG_RT2X00_LIB_USB" will not cover the case when it is configured as module. This will omit the entire if-block which does cleanup of URBs and cancellation of pending work. Changing the #ifdef to #if IS_ENABLED() to fix it. Signed-off-by: Vishal Thanki <vishalthanki@gmail.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rt2x00: add support for mac addr from device treeMathias Kresin2016-11-098-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On some devices the EEPROMs of Ralink Wi-Fi chips have a default Ralink MAC address set (RT3062F: 00:0C:43:30:62:00, RT3060F: 00:0C:43:30:60:00). Using multiple of these devices in the same network can cause nasty issues. Allow to override the MAC in the EEPROM with (a known good) one set in the device tree to bypass the issue. Signed-off-by: Mathias Kresin <dev@kresin.me> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | wireless: deprecate WDS and disable by defaultJohannes Berg2016-10-271-2/+4
|/ | | | | | | | | | | | | | | | | | | | The old WDS 4-addr frame support is very limited, e.g. * no encryption is possible on such links * it cannot support rate/HT/VHT negotiation * management APIs are very restricted These make the WDS legacy mode useless in practice. All of these are resolved by the 4-addr AP/client support, so there's also no reason to improve WDS in the future. Therefore, add a Kconfig option to disable legacy WDS. This gives people an "emergency valve" while they migrate to the better-supported 4-addr AP/client option; we plan to remove it (and the associated cfg80211/mac80211 code, which is the ultimate goal) in the future. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* rt2x00usb: Fix error return codeChristophe Jaillet2016-09-031-1/+3
| | | | | | | | | | | We know that 'retval = 0' because it has been tested a few lines above. So, if 'devm_kmalloc' fails, 0 will be returned instead of an error code. Return -ENOMEM instead. Fixes: 8b4c0009313f ("rt2x00usb: Use usb anchor to manage URB") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rt2800lib: enable MFP if hw crypt is disabledChun-Yeow Yeoh2016-04-261-0/+4
| | | | | | | | | | | | If rt2800usb is loaded with nohwcrypt=1, mac80211 takes care of the crypto with software encryption/decryption and thus, MFP can be used. Tested for secured mesh using ath9k_htc and ath9k. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* cfg80211: remove enum ieee80211_bandJohannes Berg2016-04-125-59/+59
| | | | | | | | | This enum is already perfectly aliased to enum nl80211_band, and the only reason for it is that we get IEEE80211_NUM_BANDS out of it. There's no really good reason to not declare the number of bands in nl80211 though, so do that and remove the cfg80211 one. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* rt2x00usb: Use usb anchor to manage URBVishal Thanki2016-04-063-2/+25
| | | | | | | | | | | | | | With current driver, it is observed that a URB is not completed while the USB disconnect is initiated. Due to that, the URB completion handler is trying to access the resource which was freed as a part of USB disconnect. Managing the URBs with anchor will make sure that all the URBs are handled gracefully before device gets disconnected. Signed-off-by: Vishal Thanki <vishalthanki@gmail.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rt2x00: add new rt2800usb device Buffalo WLI-UC-G450Anthony Wong2016-03-071-0/+1
| | | | | | | | | | Add USB ID 0411:01fd for Buffalo WLI-UC-G450 wireless adapter, RT chipset 3593 Signed-off-by: Anthony Wong <anthony.wong@ubuntu.com> Cc: stable@vger.kernel.org Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rt2x00: unterminated strlen of user dataOne Thousand Gnomes2016-03-071-2/+3
| | | | | | | | | The buffer needs to be zero terminated in case the user data is not. Otherwise we run off the end of the buffer. Signed-off-by: Alan Cox <alan@linux.intel.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* Merge tag 'mac80211-next-for-davem-2016-02-26' of ↵David S. Miller2016-03-012-6/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Here's another round of updates for -next: * big A-MSDU RX performance improvement (avoid linearize of paged RX) * rfkill changes: cleanups, documentation, platform properties * basic PBSS support in cfg80211 * MU-MIMO action frame processing support * BlockAck reordering & duplicate detection offload support * various cleanups & little fixes ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * mac80211: pass block ack session timeout to to driverSara Sharon2016-01-142-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | Currently mac80211 does not inform the driver of the session block ack timeout when starting a rx aggregation session. Drivers that manage the reorder buffer need to know this parameter. Seeing that there are now too many arguments for the drv_ampdu_action() function, wrap them inside a structure. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | Merge tag 'wireless-drivers-next-for-davem-2016-02-12' of ↵David S. Miller2016-02-163-21/+21
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== Major changes: wl12xx * add device tree support for SPI mwifiex * add debugfs file to read chip information * add MSIx support for newer pcie chipsets (8997 onwards) * add schedule scan support * add WoWLAN net-detect support * firmware dump support for w8997 chipset iwlwifi * continue the work on multiple Rx queues * add support for beacon storing used in low power states * use the regular firmware image of WoWLAN * fix 8000 devices for Big Endian machines * more firmware debug hooks * add support for P2P Client snoozing * make the beacon filtering for AP mode configurable * fix transmit queues overflow with LSO libertas * add support for setting power save via cfg80211 ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net: wireless: rt2x00: Space RequiredPaul Mcquade2016-02-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Space needed before open parenthesis Signed-off-by: Paul McQuade <paulmcquad@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | net: wireless: rt2x00: Space issuePaul Mcquade2016-02-071-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Removed empty spaces before/after parenthesis Signed-off-by: Paul McQuade <paulmcquad@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | net: wireless: rt2x00: Fixed Spacing issuesPaul Mcquade2016-02-071-10/+10
| |/ | | | | | | | | | | | | | | Removed empty spaces before/after parenthesis Signed-off-by: Paul McQuade <paulmcquad@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | rt2x00: fix monitor mode regressionEli Cooper2016-01-259-11/+23
|/ | | | | | | | | | | | | | Since commit df1404650ccb ("mac80211: remove support for IFF_PROMISC") monitor mode for rt2x00 has been made effectively useless because the hardware filter is configured to drop packets whose intended recipient is not the device, regardless of the presence of monitor mode interfaces. This patch fixes this regression by adding explicit monitor mode support, and by configuring the hardware filter accordingly. Signed-off-by: Eli Cooper <elicooper@gmx.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rt2x00pci: Disable memory-write-invalidate when the driver exitsJia-Ju Bai2016-01-071-0/+2
| | | | | | | | | | | | | | The driver calls pci_set_mwi to enable memory-write-invalidate when it is initialized, but does not call pci_clear_mwi when it is removed. Many other drivers calls pci_clear_mwi when pci_set_mwi is called, such as r8169, 8139cp and e1000. This patch adds pci_clear_mwi in error handling and removal procedure, which can fix the problem. Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rt2x00: type bug in _rt2500usb_register_read()Dan Carpenter2015-11-301-1/+4
| | | | | | | | | | | | | | | | | | | | | This code causes a static checker bug. drivers/net/wireless/ralink/rt2x00/rt2500usb.c:232 _rt2500usb_register_read() warn: passing casted pointer 'value' to 'rt2500usb_register_read()' 32 vs 16. If the low 16 bits were initialized to zero then this code would only be a problem on big endian systems. But in this case this is case the low 16 bits are never initialized. This is called from a function which is created using a macro: RT2X00DEBUGFS_OPS(csr, "0x%.8x\n", u32); We end up copying uninitialized data to the user which is bogus and an information leak. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rt2x00: move under ralink vendor directoryKalle Valo2015-11-1848-0/+43364
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
OpenPOWER on IntegriCloud