diff options
author | Johannes Berg <johannes.berg@intel.com> | 2016-03-10 05:55:44 -0500 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2016-05-10 15:14:50 -0400 |
commit | 43ec72b75a8851b48e561c29f49586cc747bdad8 (patch) | |
tree | 7e576ec0825bd952b108aa127458bf758290ff49 /drivers/net/wireless | |
parent | 4896d7642fd34251ba7119bcb8304d9a73e51bf8 (diff) |
iwlwifi: mvm: pass station to mac80211 RX where known
When we've already looked up the transmitter station, we can just
pass it to mac80211 using the new ieee80211_rx_napi(). This saves
the overhead of looking it up in mac80211 again.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c index 263e8a8576b7..58e7e4feed3a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c | |||
@@ -97,6 +97,7 @@ void iwl_mvm_rx_rx_phy_cmd(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) | |||
97 | * Adds the rxb to a new skb and give it to mac80211 | 97 | * Adds the rxb to a new skb and give it to mac80211 |
98 | */ | 98 | */ |
99 | static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm, | 99 | static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm, |
100 | struct ieee80211_sta *sta, | ||
100 | struct napi_struct *napi, | 101 | struct napi_struct *napi, |
101 | struct sk_buff *skb, | 102 | struct sk_buff *skb, |
102 | struct ieee80211_hdr *hdr, u16 len, | 103 | struct ieee80211_hdr *hdr, u16 len, |
@@ -131,7 +132,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm, | |||
131 | fraglen, rxb->truesize); | 132 | fraglen, rxb->truesize); |
132 | } | 133 | } |
133 | 134 | ||
134 | ieee80211_rx_napi(mvm->hw, NULL, skb, napi); | 135 | ieee80211_rx_napi(mvm->hw, sta, skb, napi); |
135 | } | 136 | } |
136 | 137 | ||
137 | /* | 138 | /* |
@@ -453,8 +454,12 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi, | |||
453 | mvm->sched_scan_pass_all == SCHED_SCAN_PASS_ALL_ENABLED)) | 454 | mvm->sched_scan_pass_all == SCHED_SCAN_PASS_ALL_ENABLED)) |
454 | mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_FOUND; | 455 | mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_FOUND; |
455 | 456 | ||
456 | iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, hdr, len, ampdu_status, | 457 | if (unlikely(ieee80211_is_beacon(hdr->frame_control) || |
457 | crypt_len, rxb); | 458 | ieee80211_is_probe_resp(hdr->frame_control))) |
459 | rx_status->boottime_ns = ktime_get_boot_ns(); | ||
460 | |||
461 | iwl_mvm_pass_packet_to_mac80211(mvm, sta, napi, skb, hdr, len, | ||
462 | ampdu_status, crypt_len, rxb); | ||
458 | } | 463 | } |
459 | 464 | ||
460 | static void iwl_mvm_update_rx_statistics(struct iwl_mvm *mvm, | 465 | static void iwl_mvm_update_rx_statistics(struct iwl_mvm *mvm, |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 0da93b57d620..5fe7a0e16b42 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |||
@@ -210,7 +210,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm, | |||
210 | if (iwl_mvm_check_pn(mvm, skb, queue, sta)) | 210 | if (iwl_mvm_check_pn(mvm, skb, queue, sta)) |
211 | kfree_skb(skb); | 211 | kfree_skb(skb); |
212 | else | 212 | else |
213 | ieee80211_rx_napi(mvm->hw, NULL, skb, napi); | 213 | ieee80211_rx_napi(mvm->hw, sta, skb, napi); |
214 | } | 214 | } |
215 | 215 | ||
216 | static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, | 216 | static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, |