summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7603/main.c
Commit message (Collapse)AuthorAgeFilesLines
* mt76: fix fix ampdu lockingMarkus Theil2019-11-211-2/+4
| | | | | | | | | The current ampdu locking code does not unlock its mutex in the early return case. This patch fixes it. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de> Acked-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mt76: move mt76_get_antenna in mt76_core moduleLorenzo Bianconi2019-11-201-0/+1
| | | | | | | | | Move mt76_get_antenna in mac80211.c in order to be reused by all drivers. Initialize .get_antenna function pointer for mt76x0, mt7603, mt7615 and mt76x2u drivers Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: add missing locking around ampdu actionFelix Fietkau2019-11-201-0/+2
| | | | | | | This is needed primarily to avoid races in dealing with rx aggregation related data structures Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: mt7603: track tx airtime for airtime fairness and surveyFelix Fietkau2019-11-201-1/+14
| | | | | | Poll per-station hardware counters after tx status events Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: mt7603: collect aggregation statsLorenzo Bianconi2019-11-201-0/+1
| | | | | | | | Introduce ampdu_stat entry in mt7603 debugfs in order to dump 802.11 aggr cumulative statistics Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mac80211: simplify TX aggregation startJohannes Berg2019-10-041-2/+1
| | | | | | | | | | | | | | | There really is no need to make drivers call the ieee80211_start_tx_ba_cb_irqsafe() function and then schedule the worker if all we want is to set a bit. Add a new return value (that was previously considered invalid) to indicate that the driver is immediately ready for the session, and make drivers use it. The only drivers that remain different are the Intel ones as they need to negotiate more with the firmware. Link: https://lore.kernel.org/r/1570007543-I152912660131cbab2e5d80b4218238c20f8a06e5@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mt76: do not send BAR frame on tx aggregation flush stopFelix Fietkau2019-09-051-1/+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 <b.balakrishna@globaledgesoft.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: add default implementation for mt76_sw_scan/mt76_sw_scan_completeLorenzo Bianconi2019-09-051-19/+2
| | | | | | | | | 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 <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: mt7603: move survey_time in mt76_devLorenzo Bianconi2019-09-051-2/+2
| | | | | | | | Move survey_time field in mt76_dev in order to be reused adding survey support to mt7615 driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: mt7603: fix some checkpatch warningsRyder Lee2019-09-051-3/+4
| | | | | | | | | | This fixes the following checkpatch warnings: WARNING: Improper SPDX comment style CHECK: No space is necessary after a cast Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: mt7603: fix watchdog rescheduling in mt7603_set_channelLorenzo Bianconi2019-09-051-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 <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: mt7603: use params->ssn value directlyStanislaw Gruszka2019-09-051-3/+3
| | | | | | | There is no point to use pointer to params->ssn. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: mt7603: add debugfs knob to enable/disable edccaLorenzo Bianconi2019-06-251-2/+1
| | | | | | | | Introduce a knob in mt7603 debugfs in order to enable/disable energy detection based on CCA thresholds Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: mt7603: stop mac80211 queues before setting the channelLorenzo Bianconi2019-06-251-1/+4
| | | | | | | Suspend data transmission during channel switch Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: mt7603: enable/disable pre_tbtt_tasklet in mt7603_set_channelLorenzo Bianconi2019-05-011-2/+6
| | | | | | | | Disable pre_tbtt_tasklet tasklet before setting the operating channel. Enable/disable beacon_timer in mt7603_set_channel Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: move pre_tbtt_tasklet in mt76_devLorenzo Bianconi2019-05-011-2/+2
| | | | | | | | Move pre_tbtt_tasklet tasklet in mt76_dev data structure since it is used by all drivers Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: move beacon_int in mt76_devLorenzo Bianconi2019-05-011-1/+1
| | | | | | | | Move beacon_int in mt76_dev data structure since it is used by all drivers Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: use macro for sn and seq_ctrl conversionRyder Lee2019-05-011-1/+1
| | | | | | | | Use macro to convert sn and seq_ctrl for better readability. Signed-off-by: Roy Luo <royluo@google.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: move mac_work in mt76_devLorenzo Bianconi2019-05-011-5/+5
| | | | | | | | | Move mac_work delayed work in mt76_dev data structure since it is used by all drivers and it will be reused adding mac work to mt7615 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: unify set_timStanislaw Gruszka2019-05-011-7/+1
| | | | | | | | All mt76 drivers (now also USB drivers) require empty .set_tim callback. Add it to common mt76 module and use on all drivers. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: introduce mt76_sw_queue data structureLorenzo Bianconi2019-05-011-1/+1
| | | | | | | | | Introduce mt76_sw_queue data structure in order to support new chipsets (e.g. mt7615) that have a shared hardware queue for all traffic identifiers. mt76_sw_queue will be used to track outstanding packets Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: mt7603: send BAR after powersave wakeupFelix Fietkau2019-04-121-1/+1
| | | | | | | | Now that the sequence number allocation is fixed, we can finally send a BAR at powersave wakeup time to refresh the receiver side reorder window Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mt76: mt7603: fix sequence number assignmentFelix Fietkau2019-04-121-3/+3
| | | | | | | | | | | | | | | | | If the MT_TXD3_SN_VALID flag is not set in the tx descriptor, the hardware assigns the sequence number. However, the rest of the code assumes that the sequence number specified in the 802.11 header gets transmitted. This was causing issues with the aggregation setup, which worked for the initial one (where the sequence numbers were still close), but not for further teardown/re-establishing of sessions. Additionally, the overwrite of the TID sequence number in WTBL2 was resetting the hardware assigned sequence numbers, causing them to drift further apart. Fix this by using the software assigned sequence numbers Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mt76: mt7603: set moredata flag when queueing ps-filtered packetsFelix Fietkau2019-03-071-0/+11
| | | | | | Clients should poll for more packets afterwards Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: mt7603: clear the service period on releasing PS filtered packetsFelix Fietkau2019-03-071-0/+3
| | | | | | | | These packets have no txwi entry in the ring, so tracking via tx status does not work. To prevent PS poll requests from being unanswered, end the service period right away Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: mt7603: clear ps filtering mode before releasing buffered framesFelix Fietkau2019-03-071-0/+2
| | | | | | Fixes sending them, otherwise they loop back right into the buffer Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mt76: add driver for MT7603E and MT7628/7688Felix Fietkau2019-02-261-0/+709
This driver is for a newer generation of 2x2 MediaTek 802.11n chipsets. MT7603E is a PCIe chip. MT7628 and MT7688 are MIPS SoC devices with built-in WLAN. MT7688 is limited to 1x1 This driver fully supports AP, station, mesh, ad-hoc and monitor mode. Signed-off-by: Felix Fietkau <nbd@nbd.name>
OpenPOWER on IntegriCloud