parent
c272d54969
commit
085737e0b0
@ -0,0 +1,20 @@ |
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -1610,7 +1610,7 @@ static int ath_tx_setup_buffer(struct ie
|
||||
bf->bf_frmlen -= padsize;
|
||||
}
|
||||
|
||||
- if (conf_is_ht(&hw->conf) && !is_pae(skb))
|
||||
+ if (conf_is_ht(&hw->conf))
|
||||
bf->bf_state.bf_type |= BUF_HT;
|
||||
|
||||
bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq);
|
||||
@@ -1696,7 +1696,7 @@ static void ath_tx_start_dma(struct ath_
|
||||
goto tx_done;
|
||||
}
|
||||
|
||||
- if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
|
||||
+ if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) {
|
||||
/*
|
||||
* Try aggregation if it's a unicast data frame
|
||||
* and the destination is HT capable.
|
@ -1,20 +0,0 @@ |
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2359,7 +2359,7 @@ static void __ieee80211_rx_handle_packet
|
||||
continue;
|
||||
}
|
||||
|
||||
- rx.sta = sta_info_get(prev, hdr->addr2);
|
||||
+ rx.sta = sta_info_get_bss(prev, hdr->addr2);
|
||||
|
||||
rx.flags |= IEEE80211_RX_RA_MATCH;
|
||||
prepares = prepare_for_handlers(prev, &rx, hdr);
|
||||
@@ -2395,7 +2395,7 @@ next:
|
||||
}
|
||||
|
||||
if (prev) {
|
||||
- rx.sta = sta_info_get(prev, hdr->addr2);
|
||||
+ rx.sta = sta_info_get_bss(prev, hdr->addr2);
|
||||
|
||||
rx.flags |= IEEE80211_RX_RA_MATCH;
|
||||
prepares = prepare_for_handlers(prev, &rx, hdr);
|
@ -1,48 +0,0 @@ |
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -274,6 +274,8 @@ struct ieee80211_bss_conf {
|
||||
* @IEEE80211_TX_INTFL_RETRANSMISSION: This frame is being retransmitted
|
||||
* after TX status because the destination was asleep, it must not
|
||||
* be modified again (no seqno assignment, crypto, etc.)
|
||||
+ * @IEEE80211_TX_INTFL_HAS_RADIOTAP: This frame was injected and still
|
||||
+ * has a radiotap header at skb->data.
|
||||
*/
|
||||
enum mac80211_tx_control_flags {
|
||||
IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
|
||||
@@ -295,6 +297,7 @@ enum mac80211_tx_control_flags {
|
||||
IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17),
|
||||
IEEE80211_TX_CTL_MORE_FRAMES = BIT(18),
|
||||
IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19),
|
||||
+ IEEE80211_TX_INTFL_HAS_RADIOTAP = BIT(20),
|
||||
};
|
||||
|
||||
/**
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1110,7 +1110,7 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
tx->flags |= IEEE80211_TX_FRAGMENTED;
|
||||
|
||||
/* process and remove the injection radiotap header */
|
||||
- if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED)) {
|
||||
+ if (unlikely(info->flags & IEEE80211_TX_INTFL_HAS_RADIOTAP)) {
|
||||
if (!__ieee80211_parse_tx_radiotap(tx, skb))
|
||||
return TX_DROP;
|
||||
|
||||
@@ -1119,6 +1119,7 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
* the radiotap header that was present and pre-filled
|
||||
* 'tx' with tx control information.
|
||||
*/
|
||||
+ info->flags &= ~IEEE80211_TX_INTFL_HAS_RADIOTAP;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1501,7 +1502,8 @@ static void ieee80211_xmit(struct ieee80
|
||||
int hdrlen;
|
||||
u16 len_rthdr;
|
||||
|
||||
- info->flags |= IEEE80211_TX_CTL_INJECTED;
|
||||
+ info->flags |= IEEE80211_TX_CTL_INJECTED |
|
||||
+ IEEE80211_TX_INTFL_HAS_RADIOTAP;
|
||||
|
||||
len_rthdr = ieee80211_get_radiotap_len(skb->data);
|
||||
hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr);
|
@ -1,37 +0,0 @@ |
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -1353,25 +1353,6 @@ static enum ath9k_pkt_type get_hw_packet
|
||||
return htype;
|
||||
}
|
||||
|
||||
-static bool is_pae(struct sk_buff *skb)
|
||||
-{
|
||||
- struct ieee80211_hdr *hdr;
|
||||
- __le16 fc;
|
||||
-
|
||||
- hdr = (struct ieee80211_hdr *)skb->data;
|
||||
- fc = hdr->frame_control;
|
||||
-
|
||||
- if (ieee80211_is_data(fc)) {
|
||||
- if (ieee80211_is_nullfunc(fc) ||
|
||||
- /* Port Access Entity (IEEE 802.1X) */
|
||||
- (skb->protocol == cpu_to_be16(ETH_P_PAE))) {
|
||||
- return true;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return false;
|
||||
-}
|
||||
-
|
||||
static int get_hw_crypto_keytype(struct sk_buff *skb)
|
||||
{
|
||||
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
|
||||
@@ -1610,7 +1591,7 @@ static int ath_tx_setup_buffer(struct ie
|
||||
bf->bf_frmlen -= padsize;
|
||||
}
|
||||
|
||||
- if (conf_is_ht(&hw->conf) && !is_pae(skb))
|
||||
+ if (conf_is_ht(&hw->conf))
|
||||
bf->bf_state.bf_type |= BUF_HT;
|
||||
|
||||
bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq);
|
@ -1,11 +0,0 @@ |
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1135,6 +1135,8 @@ ieee80211_tx_prepare(struct ieee80211_su
|
||||
tx->sta = rcu_dereference(sdata->u.vlan.sta);
|
||||
if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr)
|
||||
return TX_DROP;
|
||||
+ } else if (info->flags & IEEE80211_TX_CTL_INJECTED) {
|
||||
+ tx->sta = sta_info_get_bss(sdata, hdr->addr1);
|
||||
}
|
||||
if (!tx->sta)
|
||||
tx->sta = sta_info_get(sdata, hdr->addr1);
|
Loading…
Reference in new issue