aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/wil6210/cfg80211.c1
-rw-r--r--drivers/net/wireless/ath/wil6210/txrx.c19
2 files changed, 18 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index 6b7664d20d2e..f65da91e1af8 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -858,6 +858,7 @@ static void wil_wiphy_init(struct wiphy *wiphy)
858 wiphy->cipher_suites = wil_cipher_suites; 858 wiphy->cipher_suites = wil_cipher_suites;
859 wiphy->n_cipher_suites = ARRAY_SIZE(wil_cipher_suites); 859 wiphy->n_cipher_suites = ARRAY_SIZE(wil_cipher_suites);
860 wiphy->mgmt_stypes = wil_mgmt_stypes; 860 wiphy->mgmt_stypes = wil_mgmt_stypes;
861 wiphy->features |= NL80211_FEATURE_SK_TX_STATUS;
861} 862}
862 863
863struct wireless_dev *wil_cfg80211_init(struct device *dev) 864struct wireless_dev *wil_cfg80211_init(struct device *dev)
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c
index b58ee52e1860..0499ebcdeff5 100644
--- a/drivers/net/wireless/ath/wil6210/txrx.c
+++ b/drivers/net/wireless/ath/wil6210/txrx.c
@@ -1121,6 +1121,22 @@ netdev_tx_t wil_start_xmit(struct sk_buff *skb, struct net_device *ndev)
1121 return NET_XMIT_DROP; 1121 return NET_XMIT_DROP;
1122} 1122}
1123 1123
1124static inline bool wil_need_txstat(struct sk_buff *skb)
1125{
1126 struct ethhdr *eth = (void *)skb->data;
1127
1128 return is_unicast_ether_addr(eth->h_dest) && skb->sk &&
1129 (skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS);
1130}
1131
1132static inline void wil_consume_skb(struct sk_buff *skb, bool acked)
1133{
1134 if (unlikely(wil_need_txstat(skb)))
1135 skb_complete_wifi_ack(skb, acked);
1136 else
1137 acked ? dev_consume_skb_any(skb) : dev_kfree_skb_any(skb);
1138}
1139
1124/** 1140/**
1125 * Clean up transmitted skb's from the Tx VRING 1141 * Clean up transmitted skb's from the Tx VRING
1126 * 1142 *
@@ -1199,8 +1215,7 @@ int wil_tx_complete(struct wil6210_priv *wil, int ringid)
1199 ndev->stats.tx_errors++; 1215 ndev->stats.tx_errors++;
1200 stats->tx_errors++; 1216 stats->tx_errors++;
1201 } 1217 }
1202 1218 wil_consume_skb(skb, d->dma.error == 0);
1203 dev_kfree_skb_any(skb);
1204 } 1219 }
1205 memset(ctx, 0, sizeof(*ctx)); 1220 memset(ctx, 0, sizeof(*ctx));
1206 /* There is no need to touch HW descriptor: 1221 /* There is no need to touch HW descriptor: