diff options
Diffstat (limited to 'net/mac80211/rx.c')
| -rw-r--r-- | net/mac80211/rx.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 10bbbd33b314..5f6e32ca0858 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
| @@ -2188,9 +2188,14 @@ ieee80211_rx_h_mgmt_check(struct ieee80211_rx_data *rx) | |||
| 2188 | if (rx->sdata->vif.type == NL80211_IFTYPE_AP && | 2188 | if (rx->sdata->vif.type == NL80211_IFTYPE_AP && |
| 2189 | ieee80211_is_beacon(mgmt->frame_control) && | 2189 | ieee80211_is_beacon(mgmt->frame_control) && |
| 2190 | !(rx->flags & IEEE80211_RX_BEACON_REPORTED)) { | 2190 | !(rx->flags & IEEE80211_RX_BEACON_REPORTED)) { |
| 2191 | int sig = 0; | ||
| 2192 | |||
| 2193 | if (rx->local->hw.flags & IEEE80211_HW_SIGNAL_DBM) | ||
| 2194 | sig = status->signal; | ||
| 2195 | |||
| 2191 | cfg80211_report_obss_beacon(rx->local->hw.wiphy, | 2196 | cfg80211_report_obss_beacon(rx->local->hw.wiphy, |
| 2192 | rx->skb->data, rx->skb->len, | 2197 | rx->skb->data, rx->skb->len, |
| 2193 | status->freq, GFP_ATOMIC); | 2198 | status->freq, sig, GFP_ATOMIC); |
| 2194 | rx->flags |= IEEE80211_RX_BEACON_REPORTED; | 2199 | rx->flags |= IEEE80211_RX_BEACON_REPORTED; |
| 2195 | } | 2200 | } |
| 2196 | 2201 | ||
| @@ -2414,6 +2419,7 @@ static ieee80211_rx_result debug_noinline | |||
| 2414 | ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx) | 2419 | ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx) |
| 2415 | { | 2420 | { |
| 2416 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb); | 2421 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb); |
| 2422 | int sig = 0; | ||
| 2417 | 2423 | ||
| 2418 | /* skip known-bad action frames and return them in the next handler */ | 2424 | /* skip known-bad action frames and return them in the next handler */ |
| 2419 | if (status->rx_flags & IEEE80211_RX_MALFORMED_ACTION_FRM) | 2425 | if (status->rx_flags & IEEE80211_RX_MALFORMED_ACTION_FRM) |
| @@ -2426,7 +2432,10 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx) | |||
| 2426 | * it transmitted were processed or returned. | 2432 | * it transmitted were processed or returned. |
| 2427 | */ | 2433 | */ |
| 2428 | 2434 | ||
| 2429 | if (cfg80211_rx_mgmt(rx->sdata->dev, status->freq, | 2435 | if (rx->local->hw.flags & IEEE80211_HW_SIGNAL_DBM) |
| 2436 | sig = status->signal; | ||
| 2437 | |||
| 2438 | if (cfg80211_rx_mgmt(rx->sdata->dev, status->freq, sig, | ||
| 2430 | rx->skb->data, rx->skb->len, | 2439 | rx->skb->data, rx->skb->len, |
| 2431 | GFP_ATOMIC)) { | 2440 | GFP_ATOMIC)) { |
| 2432 | if (rx->sta) | 2441 | if (rx->sta) |
