mt76: unify rxwi parsing between mt76x2 and mt76x0 drivers

Unify rxwi parsing between mt76x2 and mt76x0. Remove the following
routines:
- mt76x0_phy_get_rssi
- mt76x0_queue_rx_skb
- mt76x0_mac_process_rx
Moreover remove mt76x2/common.c and mt76x0/mac.h since are empty files
Enable CCMP PN sw validation

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2018-10-05 19:59:24 +02:00
committed by Felix Fietkau
parent e236ba5514
commit 724d54760b
17 changed files with 32 additions and 142 deletions
+24
View File
@@ -20,6 +20,7 @@
#include "mt76x02_dma.h"
#include "mt76x02_regs.h"
#include "mt76x02_mac.h"
#include "mt76x02_util.h"
#define CCK_RATE(_idx, _rate) { \
.bitrate = _rate, \
@@ -531,4 +532,27 @@ void mt76x02_set_beacon_offsets(struct mt76_dev *dev)
}
EXPORT_SYMBOL_GPL(mt76x02_set_beacon_offsets);
void mt76x02_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
struct sk_buff *skb)
{
struct mt76x02_dev *dev = container_of(mdev, struct mt76x02_dev, mt76);
void *rxwi = skb->data;
if (q == MT_RXQ_MCU) {
/* this is used just by mmio code */
skb_queue_tail(&mdev->mmio.mcu.res_q, skb);
wake_up(&mdev->mmio.mcu.wait);
return;
}
skb_pull(skb, sizeof(struct mt76x02_rxwi));
if (mt76x02_mac_process_rx(dev, skb, rxwi)) {
dev_kfree_skb(skb);
return;
}
mt76_rx(mdev, q, skb);
}
EXPORT_SYMBOL_GPL(mt76x02_queue_rx_skb);
MODULE_LICENSE("Dual BSD/GPL");