Lorenzo Bianconi and Felix Fietkau
d00c6169c7
mt76x2: fix mrr idx/count estimation in mt76x2_mac_fill_tx_status()
...
Fix mcs and attempt count estimation in mt76x2_mac_fill_tx_status routine
if the number of tx retries reported by the hw is grater than
IEEE80211_TX_MAX_RATES
Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Kalle Valo <[email protected] >
2018-09-11 13:49:19 +02:00
Lorenzo Bianconi and Felix Fietkau
38014de244
mt76x2: remove unnecessary break in mt76x2_mac_process_tx_rate()
...
Remove unnecessary break statement in the default case of bw switch
block in mt76x2_mac_process_tx_rate routine
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Kalle Valo <[email protected] >
2018-09-11 13:49:19 +02:00
Felix Fietkau
0853d79366
Revert "mt76x2: add functions for setting extended MAC address registers"
...
This reverts commit 68b0cf17ef .
Not used at the moment, will be added back later, when needed.
Signed-off-by: Felix Fietkau <[email protected] >
2018-08-25 13:17:16 +02:00
Lorenzo Bianconi and Felix Fietkau
6780375236
mt76x2: add frame protection support
...
Introduce mac80211 rts threshold handler in order to add frame
protection support to mt76x2 driver
Signed-off-by: Lorenzo Bianconi <[email protected] >
2018-07-13 16:33:44 +02:00
Felix Fietkau
1d4ca10a56
mt76x2: track rssi for gain adjustment per station
...
This preserves more sensitivity when weak stations are active
Signed-off-by: Felix Fietkau <[email protected] >
2018-06-19 11:15:19 +02:00
Lorenzo Bianconi and Felix Fietkau
072fdac8d6
mt76x2: mac: consider multicast/broadcast frames in ewma rssi estimation
...
Take into account rx multicast and broadcast frames from connected AP in
ewma rssi estimation
Signed-off-by: Lorenzo Bianconi <[email protected] >
2018-06-18 12:09:16 +02:00
Felix Fietkau
65e161bec8
mt76x2: fix tracking rssi for dynamic gain adjustment
...
Only use unicast rssi, to avoid counting signal data from other
networks.
Signed-off-by: Felix Fietkau <[email protected] >
2018-06-15 20:49:55 +02:00
Felix Fietkau
73edb22822
mt76: discard early received packets if not running yet
...
If the radio was previously in running state, it can receive some
packets before it is able to process them.
This can lead to a crash if the channel is not initialized yet.
Discard all rx packets until start() is called
Signed-off-by: Felix Fietkau <[email protected] >
2018-05-15 14:28:28 +02:00
Lorenzo Bianconi and Felix Fietkau
238f3f1c2d
mt76x2: remove warnings in mt76x2_mac_write_txwi()
...
Fix following sparse warnings in mt76x2_mac_write_txwi:
- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: warning:
incorrect type in assignment (different base types)
- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: expected
restricted __le32 [usertype] iv
- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: got unsigned
int [unsigned] [usertype] <noident>
- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: warning:
incorrect type in assignment (different base types)
- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: expected
restricted __le32 [usertype] eiv
- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: got unsigned
int [unsigned] [usertype] <noident>
Fixes: 23405236460b ("mt76: fix transmission of encrypted management
frames")
Signed-off-by: Lorenzo Bianconi <[email protected] >
2018-03-21 11:23:10 +01:00
Felix Fietkau
e67e7a55fd
mt76x2: do not set status->aggr for NULL data frames
...
Avoids data connection stalls when the client toggles powersave mode
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-26 15:16:04 +01:00
Felix Fietkau
c6f8caced2
mt76: let mac80211 validate CCMP PN for fragmented frames
...
The rules for those are more complex and performance is not an issue
here
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-25 11:29:25 +01:00
Felix Fietkau
9b2c77826d
mt76: validate rx CCMP PN
...
Apparently hardware does not perform CCMP PN validation in hardware, so
we need to take care of this in the driver.
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-22 11:06:19 +01:00
Felix Fietkau
461cdf9f01
mt76: pass the per-vif wcid to the core for multicast rx
...
Preparation for adding software rx CCMP PN validation
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-22 11:06:17 +01:00
Felix Fietkau
b0508d3044
mt76: implement A-MPDU rx reordering in the driver code
...
This is required for performing CCMP PN validation in software
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-22 10:43:21 +01:00
Felix Fietkau
58a41f17aa
mt76: get station pointer by wcid and pass it to mac80211
...
Avoids the rhashtable lookup based on the MAC address inside mac80211
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-22 10:14:25 +01:00
Felix Fietkau
ad3f8e924e
mt76: add an intermediate struct for rx status information
...
Preparation for passing in more internal rx data via skb->cb
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-21 10:48:29 +01:00
Felix Fietkau
0f8327abba
mt76x2: fix TSF value in probe responses
...
Like beacons, probe responses need a hardware-generated TSF value. Set
the flag that causes the hw to generate it
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-19 18:07:54 +01:00
Felix Fietkau
68b0cf17ef
mt76x2: add functions for setting extended MAC address registers
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-17 11:50:14 +01:00
Felix Fietkau
d242650960
Revert "mt76x2: remove MAC address limitation for multi-vif setups"
...
This reverts commit 170f3341c6 .
2017-12-17 11:44:47 +01:00
Felix Fietkau
bdc6f2f970
Revert "mt76x2: clean up MAC/BSSID address initialization"
...
This reverts commit 3563b8fd0a .
2017-12-17 11:44:27 +01:00
Lorenzo Bianconi and Felix Fietkau
2d4b8f57cc
mt76x2: mac: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi()
...
Signed-off-by: Lorenzo Bianconi <[email protected] >
2017-12-14 16:42:01 +01:00
Felix Fietkau
3563b8fd0a
mt76x2: clean up MAC/BSSID address initialization
...
Drop the use of the EEPROM address entirely, rely on interface address
only
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-07 19:51:01 +01:00
Felix Fietkau
170f3341c6
mt76x2: remove MAC address limitation for multi-vif setups
...
The hardware has a separate set of registers to configure a
per-interface MAC address.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-07 19:50:46 +01:00
Felix Fietkau
b4034cf325
mt76x2: remove some harmless WARN_ONs in tx status and rx path
...
Discard affected packets instead. Should reduce the frequency of bogus
bug reports
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 18:14:12 +01:00
Felix Fietkau
792859b237
mt76x2: fix transmission of encrypted management frames
...
Hardware encryption seems to break encrypted unicast mgmt tx.
Unfortunately the hardware TXWI header does not have a bit to indicate
that a frame is software encrypted, so sw-encrypted frames need to use a
different WCID. For that to work, the CCMP PN needs to be generated in
software, which makes things a bit slower, so only do it for keys that
also need to tx management frames.
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-29 12:18:34 +01:00
Felix Fietkau
0ce792337d
mt76x2: add helper function for setting drop mask
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 14:07:03 +01:00
Felix Fietkau
d8140b6f40
mt76x2: clear per-WCID tx rate lookup register
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-15 18:07:39 +01:00
Felix Fietkau
e4e773440a
mt76x2: limit client WCID entries to 0-127
...
The rx WCID lookup table and the per-WCID rate table only have 128
entries. All further WCID entries are tx-only.
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-15 17:59:48 +01:00
Felix Fietkau
37654d7047
mt76x2: fix tx status ampdu length corner case
...
Sometimes the code would return a status update to mac80211 with a-mpdu
length of 0, leading to a crash in minstrel.
Make the logic of counting a-mpdu burst length easier to follow and add
an extra check to prevent this issue from happening.
Signed-off-by: Felix Fietkau <[email protected] >
2017-10-12 12:24:12 +02:00
Felix Fietkau
e78156982f
update to latest mac80211/cfg80211 API changes
...
Signed-off-by: Hauke Mehrtens <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2017-10-05 20:50:48 +02:00
Felix Fietkau
9af67d47e0
mt76x2: return -EOPNOTSUPP on unsupported ciphers
...
Silences a warning when using 802.11w
Signed-off-by: Felix Fietkau <[email protected] >
2017-01-14 23:04:59 +01:00
Lorenzo Bianconi and Felix Fietkau
93907807ca
mt76x2: fix typo in mt76x2_tx_get_max_txpwr_adj() signature
...
Signed-off-by: Lorenzo Bianconi <[email protected] >
2016-09-05 10:43:30 +02:00
Felix Fietkau
becce8bd46
mt76x2: fix more checkpatch errors
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-09-05 10:08:16 +02:00
Felix Fietkau
d7f5112c09
mt76x2: fix checkpatch warnings
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-09-04 18:59:22 +02:00
Felix Fietkau
01c63035b6
move mt76_remove_hdr_pad to mt76x2_mac.c
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-09-04 18:05:40 +02:00
Felix Fietkau
b300bdc42e
use the new bitfield accessor macros
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-09-04 17:37:26 +02:00
Felix Fietkau
53c1b7f6ac
update my email address
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-09-04 17:33:28 +02:00
Lorenzo Bianconi and Felix Fietkau
aa77eadf0e
mt76x2: add TPC support
...
add per-packet tx power adjustment support
Signed-off-by: Lorenzo Bianconi <[email protected] >
2016-08-25 12:57:47 +02:00
Felix Fietkau
ced81a3458
relicense to ISC (except for util.h which is based on GPL'd kernel code
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-07-12 08:38:46 +02:00
Felix Fietkau
f06ed811cd
mt76x2: handle peer in dynamic SMPS mode
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-06-17 14:44:12 +02:00
Felix Fietkau
3c8a4bc30e
mt76x2: implement survey support
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-06-15 16:47:23 +02:00
Felix Fietkau
6c4b37be98
move dev->chandef to mt76 struct
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-06-15 15:47:49 +02:00
Felix Fietkau
e4c05ba162
use nl80211_band instead of ieee80211_band
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-05-14 16:51:44 +02:00
Felix Fietkau
13c29223ef
Use NL80211_BAND_2GHZ instead of IEEE80211_BAND_2GHZ
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-05-14 16:49:30 +02:00
Felix Fietkau
079ad90fe2
update copyright lines
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-25 18:09:13 +01:00
Felix Fietkau
6735e9efac
mt76x2: remove mt76x2_mac_skb_tx_overhead, it is unused
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-20 20:25:18 +01:00
Felix Fietkau
84a312645c
mt76x2: fix trimming fragmented skbs
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-08 14:18:18 +01:00
Felix Fietkau
fa3ee92842
unify tx completion handling, allow a driver callback to clean up tx skbs
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-06 16:14:02 +01:00
Felix Fietkau
b08f5433d1
tx: move dma mapping code to core, unify tx callbacks into one that prepares tx_info, skb and txwi
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-03 20:14:53 +01:00
Felix Fietkau
435c5408a1
mt76x2: implement fragmented rx support
...
Signed-off-by: Felix Fietkau <[email protected] >
2016-02-01 23:16:51 +01:00