summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7615/init.c
AgeCommit message (Collapse)AuthorFilesLines
2019-09-05mt76: mt7615: add Smart Carrier Sense supportLorenzo Bianconi1-0/+1
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 <ryder.lee@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: mt7615: add missing register initializationFelix Fietkau1-4/+18
- initialize CCA signal source - initialize clock for band 1 (7615D) - initialize BAR rate Reviewed-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: mt7615: sync with mt7603 rate control changesFelix Fietkau1-6/+13
- 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 <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: mt7615: add radar pattern test knob to debugfsLorenzo Bianconi1-13/+0
Introduce mt7615_mcu_rdd_send_pattern routine to trigger a radar pattern detection. Moreover move debugfs related routines in a dedicated source file. Suggested-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: mt7615: add csa supportLorenzo Bianconi1-0/+1
Add Channel Switch Announcement support to mt7615 driver updating beacon template with CSA IE received from mac80211 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: mt7615: add hw dfs pattern detector supportLorenzo Bianconi1-0/+17
Add hw radar detection support to mt7615 driver in order to unlock dfs channels on 5GHz band Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-09-05mt76: mt7615: introduce mt7615_regd_notifierLorenzo Bianconi1-0/+11
Introduce mt7615_regd_notifier callback. This is a preliminary patch to add radar detection support to mt7615 driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: take into account extPA when configuring tx powerLorenzo Bianconi1-3/+6
When TSSI calibration is disabled (which it means the device has been equipped with an external power amplifier) we need to refer to different eeprom fields in order to properly configure tx power Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: init per-channel target powerLorenzo Bianconi1-0/+43
Set per-channel target power as the minimum between the regulatory tx power and the value configured in the eeprom Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: fix slow performance when enable encryptionRyder Lee1-6/+10
Fix wrong WCID assignment and add RKV (RX Key of this entry is valid) flag to check if peer uses the same configuration with previous handshaking. If the configuration is mismatch, WTBL indicates a “cipher mismatch” to stop SEC decryption to prevent the packet from damage. Suggested-by: YF Luo <yf.luo@mediatek.com> Suggested-by: Yiwei Chung <yiwei.chung@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: enable support for meshRyder Lee1-0/+6
Enable NL80211_IFTYPE_MESH_POINT and update its path. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25mt76: mt7615: rearrange cleanup operations in mt7615_unregister_deviceLorenzo Bianconi1-4/+5
Cleanup tx/rx napi before releasing pending idrs. Moreover unmap txwi_cache running mt76_free_device routine Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-01mt76: add mac80211 driver for MT7615 PCIe-based chipsetsRyder Lee1-0/+229
This driver is for a newer generation of MediaTek MT7615 4x4 802.11ac PCIe-based chipsets, which support wave2 MU-MIMO up to 4 users/group and also support up to 160MHz bandwidth. The driver fully supports AP, station and monitor mode. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Roy Luo <royluo@google.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>