diff options
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index a910148b8228..364222bfb10d 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -400,6 +400,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
400 | sta_info_set_tim_bit(sta); | 400 | sta_info_set_tim_bit(sta); |
401 | 401 | ||
402 | info->control.jiffies = jiffies; | 402 | info->control.jiffies = jiffies; |
403 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; | ||
403 | skb_queue_tail(&sta->ps_tx_buf, tx->skb); | 404 | skb_queue_tail(&sta->ps_tx_buf, tx->skb); |
404 | return TX_QUEUED; | 405 | return TX_QUEUED; |
405 | } | 406 | } |
@@ -420,7 +421,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
420 | * frame filtering and keeps a station blacklist on its own | 421 | * frame filtering and keeps a station blacklist on its own |
421 | * (e.g: p54), so that frames can be delivered unimpeded. | 422 | * (e.g: p54), so that frames can be delivered unimpeded. |
422 | * | 423 | * |
423 | * Note: It should be save to disable the filter now. | 424 | * Note: It should be safe to disable the filter now. |
424 | * As, it is really unlikely that we still have any pending | 425 | * As, it is really unlikely that we still have any pending |
425 | * frame for this station in the hw's buffers/fifos left, | 426 | * frame for this station in the hw's buffers/fifos left, |
426 | * that is not rejected with a unsuccessful tx_status yet. | 427 | * that is not rejected with a unsuccessful tx_status yet. |
@@ -907,9 +908,8 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx) | |||
907 | * deal with packet injection down monitor interface | 908 | * deal with packet injection down monitor interface |
908 | * with Radiotap Header -- only called for monitor mode interface | 909 | * with Radiotap Header -- only called for monitor mode interface |
909 | */ | 910 | */ |
910 | static ieee80211_tx_result | 911 | static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx, |
911 | __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx, | 912 | struct sk_buff *skb) |
912 | struct sk_buff *skb) | ||
913 | { | 913 | { |
914 | /* | 914 | /* |
915 | * this is the moment to interpret and discard the radiotap header that | 915 | * this is the moment to interpret and discard the radiotap header that |
@@ -960,7 +960,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx, | |||
960 | * on transmission | 960 | * on transmission |
961 | */ | 961 | */ |
962 | if (skb->len < (iterator.max_length + FCS_LEN)) | 962 | if (skb->len < (iterator.max_length + FCS_LEN)) |
963 | return TX_DROP; | 963 | return false; |
964 | 964 | ||
965 | skb_trim(skb, skb->len - FCS_LEN); | 965 | skb_trim(skb, skb->len - FCS_LEN); |
966 | } | 966 | } |
@@ -982,7 +982,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx, | |||
982 | } | 982 | } |
983 | 983 | ||
984 | if (ret != -ENOENT) /* ie, if we didn't simply run out of fields */ | 984 | if (ret != -ENOENT) /* ie, if we didn't simply run out of fields */ |
985 | return TX_DROP; | 985 | return false; |
986 | 986 | ||
987 | /* | 987 | /* |
988 | * remove the radiotap header | 988 | * remove the radiotap header |
@@ -991,7 +991,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx, | |||
991 | */ | 991 | */ |
992 | skb_pull(skb, iterator.max_length); | 992 | skb_pull(skb, iterator.max_length); |
993 | 993 | ||
994 | return TX_CONTINUE; | 994 | return true; |
995 | } | 995 | } |
996 | 996 | ||
997 | /* | 997 | /* |
@@ -1025,7 +1025,7 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx, | |||
1025 | /* process and remove the injection radiotap header */ | 1025 | /* process and remove the injection radiotap header */ |
1026 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1026 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
1027 | if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED)) { | 1027 | if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED)) { |
1028 | if (__ieee80211_parse_tx_radiotap(tx, skb) == TX_DROP) | 1028 | if (!__ieee80211_parse_tx_radiotap(tx, skb)) |
1029 | return TX_DROP; | 1029 | return TX_DROP; |
1030 | 1030 | ||
1031 | /* | 1031 | /* |
@@ -1238,7 +1238,6 @@ static void ieee80211_tx(struct net_device *dev, struct sk_buff *skb, | |||
1238 | bool txpending) | 1238 | bool txpending) |
1239 | { | 1239 | { |
1240 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 1240 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
1241 | struct sta_info *sta; | ||
1242 | struct ieee80211_tx_data tx; | 1241 | struct ieee80211_tx_data tx; |
1243 | ieee80211_tx_result res_prepare; | 1242 | ieee80211_tx_result res_prepare; |
1244 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 1243 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
@@ -1270,7 +1269,6 @@ static void ieee80211_tx(struct net_device *dev, struct sk_buff *skb, | |||
1270 | return; | 1269 | return; |
1271 | } | 1270 | } |
1272 | 1271 | ||
1273 | sta = tx.sta; | ||
1274 | tx.channel = local->hw.conf.channel; | 1272 | tx.channel = local->hw.conf.channel; |
1275 | info->band = tx.channel->band; | 1273 | info->band = tx.channel->band; |
1276 | 1274 | ||
@@ -1417,7 +1415,8 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1417 | } | 1415 | } |
1418 | 1416 | ||
1419 | if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) && | 1417 | if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) && |
1420 | local->hw.conf.dynamic_ps_timeout > 0) { | 1418 | local->hw.conf.dynamic_ps_timeout > 0 && |
1419 | !local->sw_scanning && !local->hw_scanning && local->ps_sdata) { | ||
1421 | if (local->hw.conf.flags & IEEE80211_CONF_PS) { | 1420 | if (local->hw.conf.flags & IEEE80211_CONF_PS) { |
1422 | ieee80211_stop_queues_by_reason(&local->hw, | 1421 | ieee80211_stop_queues_by_reason(&local->hw, |
1423 | IEEE80211_QUEUE_STOP_REASON_PS); | 1422 | IEEE80211_QUEUE_STOP_REASON_PS); |