if (!skb)
return NULL;
- true_len = mt76_mac_process_rx(dev, skb, data, rxwi);
+ true_len = mt76x0_mac_process_rx(dev, skb, data, rxwi);
if (!true_len || true_len > seg_len)
goto bad_frame;
info->flags |= IEEE80211_TX_STAT_ACK;
}
-u16 mt76_mac_tx_rate_val(struct mt76x0_dev *dev,
+u16 mt76x0_mac_tx_rate_val(struct mt76x0_dev *dev,
const struct ieee80211_tx_rate *rate, u8 *nss_val)
{
u16 rateval;
return cpu_to_le16(rateval);
}
-void mt76_mac_wcid_set_rate(struct mt76x0_dev *dev, struct mt76_wcid *wcid,
+void mt76x0_mac_wcid_set_rate(struct mt76x0_dev *dev, struct mt76_wcid *wcid,
const struct ieee80211_tx_rate *rate)
{
unsigned long flags;
spin_lock_irqsave(&dev->mt76.lock, flags);
- wcid->tx_rate = mt76_mac_tx_rate_val(dev, rate, &wcid->tx_rate_nss);
+ wcid->tx_rate = mt76x0_mac_tx_rate_val(dev, rate, &wcid->tx_rate_nss);
wcid->tx_rate_set = true;
spin_unlock_irqrestore(&dev->mt76.lock, flags);
}
return stat;
}
-void mt76_send_tx_status(struct mt76x0_dev *dev, struct mt76_tx_status *stat, u8 *update)
+void mt76x0_send_tx_status(struct mt76x0_dev *dev, struct mt76_tx_status *stat, u8 *update)
{
struct ieee80211_tx_info info = {};
struct ieee80211_sta *sta = NULL;
ether_addr_equal(hdr->addr2, dev->ap_bssid);
}
-u32 mt76_mac_process_rx(struct mt76x0_dev *dev, struct sk_buff *skb,
+u32 mt76x0_mac_process_rx(struct mt76x0_dev *dev, struct sk_buff *skb,
u8 *data, void *rxi)
{
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
}
}
-int mt76_mac_wcid_set_key(struct mt76x0_dev *dev, u8 idx,
+int mt76x0_mac_wcid_set_key(struct mt76x0_dev *dev, u8 idx,
struct ieee80211_key_conf *key)
{
enum mt76_cipher_type cipher;
return 0;
}
-int mt76_mac_shared_key_setup(struct mt76x0_dev *dev, u8 vif_idx, u8 key_idx,
+int mt76x0_mac_shared_key_setup(struct mt76x0_dev *dev, u8 vif_idx, u8 key_idx,
struct ieee80211_key_conf *key)
{
enum mt76_cipher_type cipher;
#define MT_TXWI_PKTID_PROBE BIT(7)
-u32 mt76_mac_process_rx(struct mt76x0_dev *dev, struct sk_buff *skb,
+u32 mt76x0_mac_process_rx(struct mt76x0_dev *dev, struct sk_buff *skb,
u8 *data, void *rxi);
-int mt76_mac_wcid_set_key(struct mt76x0_dev *dev, u8 idx,
+int mt76x0_mac_wcid_set_key(struct mt76x0_dev *dev, u8 idx,
struct ieee80211_key_conf *key);
-void mt76_mac_wcid_set_rate(struct mt76x0_dev *dev, struct mt76_wcid *wcid,
+void mt76x0_mac_wcid_set_rate(struct mt76x0_dev *dev, struct mt76_wcid *wcid,
const struct ieee80211_tx_rate *rate);
-int mt76_mac_shared_key_setup(struct mt76x0_dev *dev, u8 vif_idx, u8 key_idx,
+int mt76x0_mac_shared_key_setup(struct mt76x0_dev *dev, u8 vif_idx, u8 key_idx,
struct ieee80211_key_conf *key);
-u16 mt76_mac_tx_rate_val(struct mt76x0_dev *dev,
+u16 mt76x0_mac_tx_rate_val(struct mt76x0_dev *dev,
const struct ieee80211_tx_rate *rate, u8 *nss_val);
struct mt76_tx_status
mt76x0_mac_fetch_tx_status(struct mt76x0_dev *dev);
-void mt76_send_tx_status(struct mt76x0_dev *dev, struct mt76_tx_status *stat, u8 *update);
+void mt76x0_send_tx_status(struct mt76x0_dev *dev, struct mt76_tx_status *stat, u8 *update);
#endif
if (!msta) {
if (key || wcid->hw_key_idx == idx) {
- ret = mt76_mac_wcid_set_key(dev, wcid->idx, key);
+ ret = mt76x0_mac_wcid_set_key(dev, wcid->idx, key);
if (ret)
return ret;
}
- return mt76_mac_shared_key_setup(dev, mvif->idx, idx, key);
+ return mt76x0_mac_shared_key_setup(dev, mvif->idx, idx, key);
}
- return mt76_mac_wcid_set_key(dev, msta->wcid.idx, key);
+ return mt76x0_mac_wcid_set_key(dev, msta->wcid.idx, key);
}
static int mt76x0_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
rate.idx = rates->rate[0].idx;
rate.flags = rates->rate[0].flags;
- mt76_mac_wcid_set_rate(dev, &msta->wcid, &rate);
+ mt76x0_mac_wcid_set_rate(dev, &msta->wcid, &rate);
out:
rcu_read_unlock();
void mt76x0_tx_stat(struct work_struct *work);
/* util */
-void mt76_remove_hdr_pad(struct sk_buff *skb);
-int mt76_insert_hdr_pad(struct sk_buff *skb);
+void mt76x0_remove_hdr_pad(struct sk_buff *skb);
+int mt76x0_insert_hdr_pad(struct sk_buff *skb);
int mt76x0_dma_init(struct mt76x0_dev *dev);
void mt76x0_dma_cleanup(struct mt76x0_dev *dev);
skb_pull(skb, sizeof(struct mt76_txwi) + 4);
if (ieee80211_get_hdrlen_from_skb(skb) % 4)
- mt76_remove_hdr_pad(skb);
+ mt76x0_remove_hdr_pad(skb);
skb_trim(skb, pkt_len);
}
rate_ctl = wcid->tx_rate;
nss = wcid->tx_rate_nss;
} else {
- rate_ctl = mt76_mac_tx_rate_val(dev, rate, &nss);
+ rate_ctl = mt76x0_mac_tx_rate_val(dev, rate, &nss);
}
spin_unlock_irqrestore(&dev->mt76.lock, flags);
BUILD_BUG_ON(ARRAY_SIZE(info->status.status_driver_data) < 1);
info->status.status_driver_data[0] = (void *)(unsigned long)pkt_len;
- if (mt76x0_skb_rooms(dev, skb) || mt76_insert_hdr_pad(skb)) {
+ if (mt76x0_skb_rooms(dev, skb) || mt76x0_insert_hdr_pad(skb)) {
ieee80211_free_txskb(dev->mt76.hw, skb);
return;
}
if (!stat.valid)
break;
- mt76_send_tx_status(dev, &stat, &update);
+ mt76x0_send_tx_status(dev, &stat, &update);
cleaned++;
}
#include "mt76x0.h"
-void mt76_remove_hdr_pad(struct sk_buff *skb)
+void mt76x0_remove_hdr_pad(struct sk_buff *skb)
{
int len = ieee80211_get_hdrlen_from_skb(skb);
skb_pull(skb, 2);
}
-int mt76_insert_hdr_pad(struct sk_buff *skb)
+int mt76x0_insert_hdr_pad(struct sk_buff *skb)
{
int len = ieee80211_get_hdrlen_from_skb(skb);
int ret;