aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mac80211.c
AgeCommit message (Collapse)Author
2018-03-13mt76: add mt76_init_stream_cap routineLorenzo Bianconi
Add mt76_init_stream_cap utility routine to set ht/vht sta capabilities related to number of streams currently used by the device (it will be used by mac80211 set_antenna callback) Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-03-13mt76: initialize available_antennas_{tx,rx} infoLorenzo Bianconi
Initialize available_antennas related info in wiphy data structure according to antenna_mask field; antenna_mask info is initialized in device specific code and will be used in mac80211 {set,get}_antenna callbacks Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-02-01mt76: implement AP_LINK_PSFelix Fietkau
With software A-MPDU reordering in place, frames that notify mac80211 of powersave changes are reordered as well, which can cause connection stalls. Fix this by implementing powersave state processing in the driver. Fixes: aee5b8cf2477 ("mt76: implement A-MPDU rx reordering in the driver code") Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-26mt76: validate rx CCMP PNFelix Fietkau
Apparently hardware does not perform CCMP PN validation in hardware, so we need to take care of this in the driver. This is important for protecting against replay attacks. Since validation of fragmented frames is more complex, the CCMP header for those is preserved. To keep the counter in sync, the first fragment is verified by both mt76 and mac80211, and all other fragments only by mac80211. Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-26mt76: split mt76_rx_completeFelix Fietkau
Add a separate function for processing frames after A-MPDU reordering, reduce code duplication Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-26mt76: implement A-MPDU rx reordering in the driver codeFelix Fietkau
This is required for performing CCMP PN validation in software Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-26mt76: get station pointer by wcid and pass it to mac80211Felix Fietkau
Avoids the rhashtable lookup based on the MAC address inside mac80211 Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-26mt76: add an intermediate struct for rx status informationFelix Fietkau
Preparation for passing in more internal rx data via skb->cb Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-12-07mt76: add common code shared between multiple chipsetsFelix Fietkau
This will be used by drivers for MT76x2e, MT7603e and MT7628 Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>