aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-09-05mt76: mt76x0: remove unneeded return value on set channelStanislaw Gruszka3-16/+9
We allways return 0 from mt76x0_phy_set_channel(), no need to pass return value upward. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt76x0: remove redundant chandef copyStanislaw Gruszka1-1/+0
We set dev->mt76.chandef in mt76_set_channel() already. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: make mt76_rx_convert staticStanislaw Gruszka2-4/+1
mt76_rx_convert() not need to be exported any longer. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: remove offchannel check in tx schedulingFelix Fietkau3-10/+2
tx queues are already disabled by mac80211 during scanning or other off-channel activity. There is no need to repeat the check in mt76, since scheduled queues are selected by mac80211 as well. Signed-off-by: Balakrishna Bandi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: do not send BAR frame on tx aggregation flush stopFelix Fietkau3-3/+0
There is no need to send a BAR frame after stopping aggregation, and doing so could lead to sending class 3 frames after deauthentication from an AP Signed-off-by: Balakrishna Bandi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: stop rx aggregation on station removalFelix Fietkau1-0/+3
Fixes use-after-free issues on forced station removal during hardware restart on MT76x02 Fixes: aee5b8cf2477 ("mt76: implement A-MPDU rx reordering in the driver code") Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: dma: reset q->rx_head on rx resetFelix Fietkau1-0/+6
Fixes rx of the first frame if a fragmented rx was interrupted by the reset Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: apply calibration-free data from OTPFelix Fietkau1-0/+38
MT7615 chips usually come pre-calibrated, even when used on embedded boards. In that case, the on-flash EEPROM data needs to be merged with some data from OTP ROM. Run this merge if the external EEPROM data is valid and OTP has valid fields. Tested-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: add default implementation for mt76_sw_scan/mt76_sw_scan_completeLorenzo Bianconi10-53/+29
Introduce a default implementation for mt76_sw_scan and mt76_sw_scan_complete in mt76 module and remove duplicated code since most of the drivers share the same implementation Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: fix some checkpatch warningsRyder Lee10-63/+70
This fixes the following checkpatch warnings: CHECK: Alignment should match open parenthesis CHECK: No space is necessary after a cast Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: add BIP_CMAC_128 cipher supportLorenzo Bianconi4-47/+135
Refactor mt7615_mac_wtbl_set_key and introduce the following routines in order to configure wtbl entries and properly add hw support to BIP_CMAC_128 cipher: - mt7615_mac_wtbl_update_cipher - mt7615_mac_wtbl_update_pk - mt7615_mac_wtbl_update_key Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7603: remove unnecessary mcu queue initializationLorenzo Bianconi1-3/+0
Remove unnecessary mcu queue initialization in mt7603_dma_init since it has been already done in mt76_mmio_init Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: move mt76_tx_tasklet in mt76 moduleLorenzo Bianconi5-21/+10
Move mt76{15,03}_tx_tasklet in mt76_alloc_device in order to be used as default tx_tasklet initialization. Remove duplicated code in mt7603/mt7615 drivers Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: enable survey supportLorenzo Bianconi5-0/+34
Introduce channel survey support for mt7615 driver Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7603: move survey_time in mt76_devLorenzo Bianconi4-5/+7
Move survey_time field in mt76_dev in order to be reused adding survey support to mt7615 driver Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt76x02u: enable survey supportLorenzo Bianconi4-0/+22
Introduce channel survey support for mt76x2u and mt76x0u drivers Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt76x02u: enable multi-vif supportLorenzo Bianconi1-0/+26
Enable multi-interface support for mt76x02u driver. For the moment allow max two concurrent interfaces in order to preserve enough room for ps traffic since we are using beacon slots for it. I have successfully tested the following configuration: - AP + STA - AP0 + AP1 Signed-off-by: Lorenzo Bianconi <[email protected]> Tested-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt76x02: do not copy beacon skb in mt76x02_mac_set_beacon_enableLorenzo Bianconi2-37/+26
Do not copy beacon skb in mt76x02_mac_set_beacon_enable for usb devices since it will be done in mt76x02_update_beacon_iter. Moreover squash mt76x02_mac_set_beacon_enable and __mt76x02_mac_set_beacon_enable since the latter is run just by mt76x02_mac_set_beacon_enable Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt76x02: introduce mt76x02_pre_tbtt_enable and mt76x02_beacon_enable ↵Lorenzo Bianconi4-8/+12
macros Improve code readability introducing mt76x02_pre_tbtt_enable and mt76x02_beacon_enable utility macros Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: add Smart Carrier Sense supportLorenzo Bianconi6-0/+270
Introduce Smart Carrier Sense support in order to tune device sensitivity according to RTS error rate and False CCA reported by the radio Tested-by: Ryder Lee <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: rework locking scheme for mt7615_set_channelLorenzo Bianconi1-6/+8
As already done for mt7603 driver, move mt76.mutex lock inside mt7615_set_channel since we need to grab mt76.mutex in mt7615_mac_work. This is a preliminary patch to add Smart Carrier Sense (SCS) support Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: switch to SPDX tag instead of verbose boilerplate textRyder Lee63-756/+63
No functional change intended. Add SPDX identifiers to all remaining files in /mt76. Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt76x02: fix some checkpatch warningsRyder Lee18-100/+114
This fixes the following checkpatch warnings: ERROR: code indent should use tabs where possible CHECK: Alignment should match open parenthesis CHECK: No space is necessary after a cast CHECK: Please don't use multiple blank lines CHECK: Avoid precedence issues in macro WARNING: Statements should start on a tabstop WARNING: Unnecessary space before function pointer arguments Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: fix some checkpatch warningsRyder Lee3-5/+3
This fixes the following checkpatch warnings: WARNING: Improper SPDX comment style Fix blank lines. Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7603: fix some checkpatch warningsRyder Lee11-18/+19
This fixes the following checkpatch warnings: WARNING: Improper SPDX comment style CHECK: No space is necessary after a cast Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: Add paragraphs to describe the config symbols fullyRyder Lee4-8/+31
Update the help text to fix a checkpatch warning: WARNING: please write a paragraph that describes the config symbol fully Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: update cw_min/max related settingsRyder Lee1-9/+9
Add default values of cw_min/max and use fls() for configuration. Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: add 4 WMM sets supportRyder Lee3-12/+10
Hardware supports 4 sets of WMM that should be put to good use. And fix incorrect queue mapping in mt7615_conf_tx(). Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7603: fix watchdog rescheduling in mt7603_set_channelLorenzo Bianconi1-1/+1
Convert MT7603_WATCHDOG_TIME in jiffies rescheduling watchdog delayed work Fixes: c8846e101502 ("mt76: add driver for MT7603E and MT7628/7688") Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: fix MT7615_WATCHDOG_TIME definitionLorenzo Bianconi1-1/+1
Express watchdog timeout in jiffies since it is used directly in ieee80211_queue_delayed_work Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets") Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: introduce mt76_mmio_read_copy routineLorenzo Bianconi3-8/+19
Add mt76_mmio_read_copy routine and the related function pointer in mt76_bus_ops data structure. mt76_mmio_read_copy will be used to add BIP_CMAC_128 cipher hw support to mt7615 driver Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: add set_key_cmd and mt76_wcid to mt7615_mac_wtbl_set_key signatureLorenzo Bianconi3-18/+21
Introduce set_key_cmd and mt76_wcid pointer to mt7615_mac_wtbl_set_key signature and do not set key to NULL if cmd is DISABLE_KEY. This is a preliminary patch to add BIP_CMAC_128 hw support to mt7615 driver Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: remove wtbl_sec_key definitionLorenzo Bianconi1-14/+0
Get rid of wtbl_sec_key definition since it is no longer used Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: introduce mt7615_mac_wtbl_set_key routineLorenzo Bianconi6-48/+63
Add mt7615_mac_wtbl_set_key routine to configure wtbl key parameter directly from host cpu. This is a preliminary patch to add BIP_CMAC_128 hw support. Moreover add static qualifier to mt7615_mac_get_key_info routine Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: add mt7615_mac_wtbl_addr routineLorenzo Bianconi1-1/+6
Introduce mt7615_mac_wtbl_addr rouinte to compute sta wtbl address. This is a preliminary patch to update wtbl key directly from host processor Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: move mt7615_mac_get_key_info in mac.cLorenzo Bianconi4-49/+55
This is a preliminary patch to update wtbl key directly from host processor Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: add missing register initializationFelix Fietkau2-4/+31
- initialize CCA signal source - initialize clock for band 1 (7615D) - initialize BAR rate Reviewed-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt76x0u: add support to TP-Link T2UHPLorenzo Bianconi1-0/+1
Introduce support to TP-Link T2UHP https://wikidevi.com/wiki/TP-LINK_Archer_T2UHP Tested-by: Sid Hayn <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: use params->ssn value directlyStanislaw Gruszka1-3/+3
There is no point to use pointer to params->ssn. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7603: use params->ssn value directlyStanislaw Gruszka1-3/+3
There is no point to use pointer to params->ssn. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt76x02: use params->ssn value directlyStanislaw Gruszka1-3/+3
There is no point to use pointer to params->ssn. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: usb: remove unneeded {put,get}_unalignedStanislaw Gruszka2-5/+8
Compiler give us guarantees on variables alignment, so use an variable as buffer when read/write registers and remove unneeded {put,get}_unaligned. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: usb: fix endian in mt76u_copyStanislaw Gruszka1-2/+2
In contrast to mt76_wr() which we use to program registers, on mt76_wr_copy() we should not change endian of the data. Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer") Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7603: fix invalid fallback ratesFelix Fietkau1-0/+3
Only decrement the rate index on duplicate rates if it is not already 0 Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: fix invalid fallback ratesFelix Fietkau1-0/+3
Only decrement the rate index on duplicate rates if it is not already 0 Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: fix PS buffering of action framesFelix Fietkau1-1/+1
Bufferable management frames need to be put in the data queue, otherwise they will not be buffered when the receiver is asleep. Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: fix using VHT STBC ratesFelix Fietkau1-6/+12
The hardware expects MT_TX_RATE_NSS to be filled with the number of space/time streams. For non-STBC rates, this is equal to nss. For 1-stream STBC, this needs to be set to 2. This is relevant for VHT rates only, on HT, the value is derived from MCS internally. Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt76u: fix typo in mt76u_fill_rx_sgLorenzo Bianconi1-1/+1
Fix typo setting urb->transfer_buffer_length in mt76u_fill_rx_sg Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer") Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx") Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: sync with mt7603 rate control changesFelix Fietkau4-44/+124
- Store the previous and current rate set in the driver + the TSF value at the time of the switch. - Use the tx status TSF value to determine which rate set needs to be used as reference. - Report only short or long GI rates for a single status event, not a mix. - The hardware reports the last used rate index. Use it along with the retry count to figure out what rate was used for the first attempt. - Use the same retry count value for all rate slots to make this calculation work. - Derive the probe rate from the current rateset instead of the skb cb - Do not wait for a status report for the probe frame before removing the probe rate from the rate table. Do it immediately after it was referenced in a tx status report. - Use the first half of the first rate retry budget for the probe rate in order to avoid using too many retries on that rate - Switch from lower rates to higher rates more conservatively - enable hardware rate up/down selection Reviewed-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-09-05mt76: mt7615: reset rate index/counters on rate table updateFelix Fietkau2-1/+8
These values must be initialized to zero, otherwise the hardware could reuse previous values, especially the rate index Reviewed-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>