cfg80211: add KHz variants of frame RX API
Drivers may wish to report the RX frequency in units of KHz. Provide cfg80211_rx_mgmt_khz() and wrap it with cfg80211_rx_mgmt() so exisiting drivers which can't report KHz anyway don't need to change. Add a similar wrapper for cfg80211_report_obss_beacon() so the frequency units stay somewhat consistent. This doesn't actually change the nl80211 API yet. Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com> Link: https://lore.kernel.org/r/20200430172554.18383-2-thomas@adapt-ip.com [fix mac80211 calling the non-khz version of obss beacon report, drop trace point name changes] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
c03369558c
commit
e76fede8bf
@ -3095,9 +3095,10 @@ ieee80211_rx_h_mgmt_check(struct ieee80211_rx_data *rx)
|
||||
!(status->flag & RX_FLAG_NO_SIGNAL_VAL))
|
||||
sig = status->signal;
|
||||
|
||||
cfg80211_report_obss_beacon(rx->local->hw.wiphy,
|
||||
rx->skb->data, rx->skb->len,
|
||||
status->freq, sig);
|
||||
cfg80211_report_obss_beacon_khz(rx->local->hw.wiphy,
|
||||
rx->skb->data, rx->skb->len,
|
||||
ieee80211_rx_status_to_khz(status),
|
||||
sig);
|
||||
rx->flags |= IEEE80211_RX_BEACON_REPORTED;
|
||||
}
|
||||
|
||||
@ -3443,8 +3444,9 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx)
|
||||
!(status->flag & RX_FLAG_NO_SIGNAL_VAL))
|
||||
sig = status->signal;
|
||||
|
||||
if (cfg80211_rx_mgmt(&rx->sdata->wdev, status->freq, sig,
|
||||
rx->skb->data, rx->skb->len, 0)) {
|
||||
if (cfg80211_rx_mgmt_khz(&rx->sdata->wdev,
|
||||
ieee80211_rx_status_to_khz(status), sig,
|
||||
rx->skb->data, rx->skb->len, 0)) {
|
||||
if (rx->sta)
|
||||
rx->sta->rx_stats.packets++;
|
||||
dev_kfree_skb(rx->skb);
|
||||
|
Reference in New Issue
Block a user