diff options
author | David S. Miller <davem@davemloft.net> | 2012-03-27 22:15:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-27 22:15:01 -0400 |
commit | 7dd30d447b7f4a129586cce8e57d0163dde876b0 (patch) | |
tree | f6a3c26bccbd31e144c8c68fda979988739d4af5 | |
parent | de8856d2c11f562c60ed9340a83db4a4f829a6e6 (diff) | |
parent | 643c61e119459e9d750087b7b34be94491efebf9 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/calib.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/3945-mac.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965-mac.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.c | 31 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/phy.c | 2 | ||||
-rw-r--r-- | include/net/cfg80211.h | 6 | ||||
-rw-r--r-- | net/mac80211/agg-rx.c | 3 | ||||
-rw-r--r-- | net/mac80211/main.c | 3 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 29 |
14 files changed, 58 insertions, 44 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 3d11fa581bb7..3adbbb294bad 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1251,7 +1251,6 @@ ATHEROS ATH5K WIRELESS DRIVER | |||
1251 | M: Jiri Slaby <jirislaby@gmail.com> | 1251 | M: Jiri Slaby <jirislaby@gmail.com> |
1252 | M: Nick Kossifidis <mickflemm@gmail.com> | 1252 | M: Nick Kossifidis <mickflemm@gmail.com> |
1253 | M: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com> | 1253 | M: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com> |
1254 | M: Bob Copeland <me@bobcopeland.com> | ||
1255 | L: linux-wireless@vger.kernel.org | 1254 | L: linux-wireless@vger.kernel.org |
1256 | L: ath5k-devel@lists.ath5k.org | 1255 | L: ath5k-devel@lists.ath5k.org |
1257 | W: http://wireless.kernel.org/en/users/Drivers/ath5k | 1256 | W: http://wireless.kernel.org/en/users/Drivers/ath5k |
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c index 2f4b48e6fb03..e5cceb077574 100644 --- a/drivers/net/wireless/ath/ath9k/calib.c +++ b/drivers/net/wireless/ath/ath9k/calib.c | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | /* Common calibration code */ | 21 | /* Common calibration code */ |
22 | 22 | ||
23 | #define ATH9K_NF_TOO_HIGH -60 | ||
24 | 23 | ||
25 | static int16_t ath9k_hw_get_nf_hist_mid(int16_t *nfCalBuffer) | 24 | static int16_t ath9k_hw_get_nf_hist_mid(int16_t *nfCalBuffer) |
26 | { | 25 | { |
@@ -346,10 +345,10 @@ static void ath9k_hw_nf_sanitize(struct ath_hw *ah, s16 *nf) | |||
346 | "NF calibrated [%s] [chain %d] is %d\n", | 345 | "NF calibrated [%s] [chain %d] is %d\n", |
347 | (i >= 3 ? "ext" : "ctl"), i % 3, nf[i]); | 346 | (i >= 3 ? "ext" : "ctl"), i % 3, nf[i]); |
348 | 347 | ||
349 | if (nf[i] > ATH9K_NF_TOO_HIGH) { | 348 | if (nf[i] > limit->max) { |
350 | ath_dbg(common, CALIBRATE, | 349 | ath_dbg(common, CALIBRATE, |
351 | "NF[%d] (%d) > MAX (%d), correcting to MAX\n", | 350 | "NF[%d] (%d) > MAX (%d), correcting to MAX\n", |
352 | i, nf[i], ATH9K_NF_TOO_HIGH); | 351 | i, nf[i], limit->max); |
353 | nf[i] = limit->max; | 352 | nf[i] = limit->max; |
354 | } else if (nf[i] < limit->min) { | 353 | } else if (nf[i] < limit->min) { |
355 | ath_dbg(common, CALIBRATE, | 354 | ath_dbg(common, CALIBRATE, |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 60159f4ee532..cb006458fc4b 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -680,7 +680,7 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
680 | hw->queues = 4; | 680 | hw->queues = 4; |
681 | hw->max_rates = 4; | 681 | hw->max_rates = 4; |
682 | hw->channel_change_time = 5000; | 682 | hw->channel_change_time = 5000; |
683 | hw->max_listen_interval = 10; | 683 | hw->max_listen_interval = 1; |
684 | hw->max_rate_tries = 10; | 684 | hw->max_rate_tries = 10; |
685 | hw->sta_data_size = sizeof(struct ath_node); | 685 | hw->sta_data_size = sizeof(struct ath_node); |
686 | hw->vif_data_size = sizeof(struct ath_vif); | 686 | hw->vif_data_size = sizeof(struct ath_vif); |
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index f4ae3ba994a8..1c4583c7ff7c 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -1913,13 +1913,13 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) | |||
1913 | if (sc->rx.frag) { | 1913 | if (sc->rx.frag) { |
1914 | int space = skb->len - skb_tailroom(hdr_skb); | 1914 | int space = skb->len - skb_tailroom(hdr_skb); |
1915 | 1915 | ||
1916 | sc->rx.frag = NULL; | ||
1917 | |||
1918 | if (pskb_expand_head(hdr_skb, 0, space, GFP_ATOMIC) < 0) { | 1916 | if (pskb_expand_head(hdr_skb, 0, space, GFP_ATOMIC) < 0) { |
1919 | dev_kfree_skb(skb); | 1917 | dev_kfree_skb(skb); |
1920 | goto requeue_drop_frag; | 1918 | goto requeue_drop_frag; |
1921 | } | 1919 | } |
1922 | 1920 | ||
1921 | sc->rx.frag = NULL; | ||
1922 | |||
1923 | skb_copy_from_linear_data(skb, skb_put(hdr_skb, skb->len), | 1923 | skb_copy_from_linear_data(skb, skb_put(hdr_skb, skb->len), |
1924 | skb->len); | 1924 | skb->len); |
1925 | dev_kfree_skb_any(skb); | 1925 | dev_kfree_skb_any(skb); |
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c index 0c1209390169..faec40467208 100644 --- a/drivers/net/wireless/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/iwlegacy/3945-mac.c | |||
@@ -2673,8 +2673,6 @@ il3945_bg_restart(struct work_struct *data) | |||
2673 | 2673 | ||
2674 | if (test_and_clear_bit(S_FW_ERROR, &il->status)) { | 2674 | if (test_and_clear_bit(S_FW_ERROR, &il->status)) { |
2675 | mutex_lock(&il->mutex); | 2675 | mutex_lock(&il->mutex); |
2676 | /* FIXME: vif can be dereferenced */ | ||
2677 | il->vif = NULL; | ||
2678 | il->is_open = 0; | 2676 | il->is_open = 0; |
2679 | mutex_unlock(&il->mutex); | 2677 | mutex_unlock(&il->mutex); |
2680 | il3945_down(il); | 2678 | il3945_down(il); |
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index 17f1c6853182..c46275a92565 100644 --- a/drivers/net/wireless/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c | |||
@@ -5652,8 +5652,6 @@ il4965_bg_restart(struct work_struct *data) | |||
5652 | 5652 | ||
5653 | if (test_and_clear_bit(S_FW_ERROR, &il->status)) { | 5653 | if (test_and_clear_bit(S_FW_ERROR, &il->status)) { |
5654 | mutex_lock(&il->mutex); | 5654 | mutex_lock(&il->mutex); |
5655 | /* FIXME: do we dereference vif without mutex locked ? */ | ||
5656 | il->vif = NULL; | ||
5657 | il->is_open = 0; | 5655 | il->is_open = 0; |
5658 | 5656 | ||
5659 | __il4965_down(il); | 5657 | __il4965_down(il); |
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index e5ac04739bcc..eaf249452e51 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c | |||
@@ -4508,6 +4508,7 @@ il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | |||
4508 | { | 4508 | { |
4509 | struct il_priv *il = hw->priv; | 4509 | struct il_priv *il = hw->priv; |
4510 | int err; | 4510 | int err; |
4511 | bool reset; | ||
4511 | 4512 | ||
4512 | mutex_lock(&il->mutex); | 4513 | mutex_lock(&il->mutex); |
4513 | D_MAC80211("enter: type %d, addr %pM\n", vif->type, vif->addr); | 4514 | D_MAC80211("enter: type %d, addr %pM\n", vif->type, vif->addr); |
@@ -4518,7 +4519,12 @@ il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | |||
4518 | goto out; | 4519 | goto out; |
4519 | } | 4520 | } |
4520 | 4521 | ||
4521 | if (il->vif) { | 4522 | /* |
4523 | * We do not support multiple virtual interfaces, but on hardware reset | ||
4524 | * we have to add the same interface again. | ||
4525 | */ | ||
4526 | reset = (il->vif == vif); | ||
4527 | if (il->vif && !reset) { | ||
4522 | err = -EOPNOTSUPP; | 4528 | err = -EOPNOTSUPP; |
4523 | goto out; | 4529 | goto out; |
4524 | } | 4530 | } |
@@ -4528,8 +4534,11 @@ il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | |||
4528 | 4534 | ||
4529 | err = il_set_mode(il); | 4535 | err = il_set_mode(il); |
4530 | if (err) { | 4536 | if (err) { |
4531 | il->vif = NULL; | 4537 | IL_WARN("Fail to set mode %d\n", vif->type); |
4532 | il->iw_mode = NL80211_IFTYPE_STATION; | 4538 | if (!reset) { |
4539 | il->vif = NULL; | ||
4540 | il->iw_mode = NL80211_IFTYPE_STATION; | ||
4541 | } | ||
4533 | } | 4542 | } |
4534 | 4543 | ||
4535 | out: | 4544 | out: |
@@ -5279,9 +5288,9 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
5279 | D_MAC80211("BSSID %pM\n", bss_conf->bssid); | 5288 | D_MAC80211("BSSID %pM\n", bss_conf->bssid); |
5280 | 5289 | ||
5281 | /* | 5290 | /* |
5282 | * If there is currently a HW scan going on in the | 5291 | * If there is currently a HW scan going on in the background, |
5283 | * background then we need to cancel it else the RXON | 5292 | * then we need to cancel it, otherwise sometimes we are not |
5284 | * below/in post_associate will fail. | 5293 | * able to authenticate (FIXME: why ?) |
5285 | */ | 5294 | */ |
5286 | if (il_scan_cancel_timeout(il, 100)) { | 5295 | if (il_scan_cancel_timeout(il, 100)) { |
5287 | D_MAC80211("leave - scan abort failed\n"); | 5296 | D_MAC80211("leave - scan abort failed\n"); |
@@ -5290,14 +5299,10 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
5290 | } | 5299 | } |
5291 | 5300 | ||
5292 | /* mac80211 only sets assoc when in STATION mode */ | 5301 | /* mac80211 only sets assoc when in STATION mode */ |
5293 | if (vif->type == NL80211_IFTYPE_ADHOC || bss_conf->assoc) { | 5302 | memcpy(il->staging.bssid_addr, bss_conf->bssid, ETH_ALEN); |
5294 | memcpy(il->staging.bssid_addr, bss_conf->bssid, | ||
5295 | ETH_ALEN); | ||
5296 | 5303 | ||
5297 | /* currently needed in a few places */ | 5304 | /* FIXME: currently needed in a few places */ |
5298 | memcpy(il->bssid, bss_conf->bssid, ETH_ALEN); | 5305 | memcpy(il->bssid, bss_conf->bssid, ETH_ALEN); |
5299 | } else | ||
5300 | il->staging.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
5301 | } | 5306 | } |
5302 | 5307 | ||
5303 | /* | 5308 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index cd490abced91..001735f7a661 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -163,7 +163,13 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev, | |||
163 | 163 | ||
164 | /* Reschedule urb to read TX status again instantly */ | 164 | /* Reschedule urb to read TX status again instantly */ |
165 | return true; | 165 | return true; |
166 | } else if (rt2800usb_txstatus_pending(rt2x00dev)) { | 166 | } |
167 | |||
168 | /* Check if there is any entry that timedout waiting on TX status */ | ||
169 | if (rt2800usb_txstatus_timeout(rt2x00dev)) | ||
170 | queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work); | ||
171 | |||
172 | if (rt2800usb_txstatus_pending(rt2x00dev)) { | ||
167 | /* Read register after 250 us */ | 173 | /* Read register after 250 us */ |
168 | hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 250000), | 174 | hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 250000), |
169 | HRTIMER_MODE_REL); | 175 | HRTIMER_MODE_REL); |
@@ -178,7 +184,7 @@ stop_reading: | |||
178 | * here again if status reading is needed. | 184 | * here again if status reading is needed. |
179 | */ | 185 | */ |
180 | if (rt2800usb_txstatus_pending(rt2x00dev) && | 186 | if (rt2800usb_txstatus_pending(rt2x00dev) && |
181 | test_and_set_bit(TX_STATUS_READING, &rt2x00dev->flags)) | 187 | !test_and_set_bit(TX_STATUS_READING, &rt2x00dev->flags)) |
182 | return true; | 188 | return true; |
183 | else | 189 | else |
184 | return false; | 190 | return false; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c index 1eec3a06d1f3..4c016241f340 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c | |||
@@ -1893,7 +1893,7 @@ void rtl92c_phy_set_io(struct ieee80211_hw *hw) | |||
1893 | break; | 1893 | break; |
1894 | case IO_CMD_PAUSE_DM_BY_SCAN: | 1894 | case IO_CMD_PAUSE_DM_BY_SCAN: |
1895 | rtlphy->initgain_backup.xaagccore1 = dm_digtable.cur_igvalue; | 1895 | rtlphy->initgain_backup.xaagccore1 = dm_digtable.cur_igvalue; |
1896 | dm_digtable.cur_igvalue = 0x17; | 1896 | dm_digtable.cur_igvalue = 0x37; |
1897 | rtl92c_dm_write_dig(hw); | 1897 | rtl92c_dm_write_dig(hw); |
1898 | break; | 1898 | break; |
1899 | default: | 1899 | default: |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c index 34591eeb8376..28fc5fb8057b 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c | |||
@@ -3077,7 +3077,7 @@ static void rtl92d_phy_set_io(struct ieee80211_hw *hw) | |||
3077 | break; | 3077 | break; |
3078 | case IO_CMD_PAUSE_DM_BY_SCAN: | 3078 | case IO_CMD_PAUSE_DM_BY_SCAN: |
3079 | rtlphy->initgain_backup.xaagccore1 = de_digtable.cur_igvalue; | 3079 | rtlphy->initgain_backup.xaagccore1 = de_digtable.cur_igvalue; |
3080 | de_digtable.cur_igvalue = 0x17; | 3080 | de_digtable.cur_igvalue = 0x37; |
3081 | rtl92d_dm_write_dig(hw); | 3081 | rtl92d_dm_write_dig(hw); |
3082 | break; | 3082 | break; |
3083 | default: | 3083 | default: |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 248fb05feb63..83d800c31e3c 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -620,8 +620,10 @@ struct sta_bss_parameters { | |||
620 | * @llid: mesh local link id | 620 | * @llid: mesh local link id |
621 | * @plid: mesh peer link id | 621 | * @plid: mesh peer link id |
622 | * @plink_state: mesh peer link state | 622 | * @plink_state: mesh peer link state |
623 | * @signal: signal strength of last received packet in dBm | 623 | * @signal: the signal strength, type depends on the wiphy's signal_type |
624 | * @signal_avg: signal strength average in dBm | 624 | NOTE: For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. |
625 | * @signal_avg: avg signal strength, type depends on the wiphy's signal_type | ||
626 | NOTE: For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. | ||
625 | * @txrate: current unicast bitrate from this station | 627 | * @txrate: current unicast bitrate from this station |
626 | * @rxrate: current unicast bitrate to this station | 628 | * @rxrate: current unicast bitrate to this station |
627 | * @rx_packets: packets received from this station | 629 | * @rx_packets: packets received from this station |
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 1068f668ac4e..64d3ce5ea1a0 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -49,6 +49,8 @@ static void ieee80211_free_tid_rx(struct rcu_head *h) | |||
49 | container_of(h, struct tid_ampdu_rx, rcu_head); | 49 | container_of(h, struct tid_ampdu_rx, rcu_head); |
50 | int i; | 50 | int i; |
51 | 51 | ||
52 | del_timer_sync(&tid_rx->reorder_timer); | ||
53 | |||
52 | for (i = 0; i < tid_rx->buf_size; i++) | 54 | for (i = 0; i < tid_rx->buf_size; i++) |
53 | dev_kfree_skb(tid_rx->reorder_buf[i]); | 55 | dev_kfree_skb(tid_rx->reorder_buf[i]); |
54 | kfree(tid_rx->reorder_buf); | 56 | kfree(tid_rx->reorder_buf); |
@@ -91,7 +93,6 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | |||
91 | tid, WLAN_BACK_RECIPIENT, reason); | 93 | tid, WLAN_BACK_RECIPIENT, reason); |
92 | 94 | ||
93 | del_timer_sync(&tid_rx->session_timer); | 95 | del_timer_sync(&tid_rx->session_timer); |
94 | del_timer_sync(&tid_rx->reorder_timer); | ||
95 | 96 | ||
96 | call_rcu(&tid_rx->rcu_head, ieee80211_free_tid_rx); | 97 | call_rcu(&tid_rx->rcu_head, ieee80211_free_tid_rx); |
97 | } | 98 | } |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index b581a24fa15c..16336480c631 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -102,9 +102,6 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) | |||
102 | 102 | ||
103 | might_sleep(); | 103 | might_sleep(); |
104 | 104 | ||
105 | /* If this off-channel logic ever changes, ieee80211_on_oper_channel | ||
106 | * may need to change as well. | ||
107 | */ | ||
108 | offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; | 105 | offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; |
109 | if (local->scan_channel) { | 106 | if (local->scan_channel) { |
110 | chan = local->scan_channel; | 107 | chan = local->scan_channel; |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 4c1eb9472ddb..e49da2797022 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -2386,7 +2386,9 @@ nla_put_failure: | |||
2386 | } | 2386 | } |
2387 | 2387 | ||
2388 | static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, | 2388 | static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, |
2389 | int flags, struct net_device *dev, | 2389 | int flags, |
2390 | struct cfg80211_registered_device *rdev, | ||
2391 | struct net_device *dev, | ||
2390 | const u8 *mac_addr, struct station_info *sinfo) | 2392 | const u8 *mac_addr, struct station_info *sinfo) |
2391 | { | 2393 | { |
2392 | void *hdr; | 2394 | void *hdr; |
@@ -2425,12 +2427,18 @@ static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, | |||
2425 | if (sinfo->filled & STATION_INFO_PLINK_STATE) | 2427 | if (sinfo->filled & STATION_INFO_PLINK_STATE) |
2426 | NLA_PUT_U8(msg, NL80211_STA_INFO_PLINK_STATE, | 2428 | NLA_PUT_U8(msg, NL80211_STA_INFO_PLINK_STATE, |
2427 | sinfo->plink_state); | 2429 | sinfo->plink_state); |
2428 | if (sinfo->filled & STATION_INFO_SIGNAL) | 2430 | switch (rdev->wiphy.signal_type) { |
2429 | NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL, | 2431 | case CFG80211_SIGNAL_TYPE_MBM: |
2430 | sinfo->signal); | 2432 | if (sinfo->filled & STATION_INFO_SIGNAL) |
2431 | if (sinfo->filled & STATION_INFO_SIGNAL_AVG) | 2433 | NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL, |
2432 | NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL_AVG, | 2434 | sinfo->signal); |
2433 | sinfo->signal_avg); | 2435 | if (sinfo->filled & STATION_INFO_SIGNAL_AVG) |
2436 | NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL_AVG, | ||
2437 | sinfo->signal_avg); | ||
2438 | break; | ||
2439 | default: | ||
2440 | break; | ||
2441 | } | ||
2434 | if (sinfo->filled & STATION_INFO_TX_BITRATE) { | 2442 | if (sinfo->filled & STATION_INFO_TX_BITRATE) { |
2435 | if (!nl80211_put_sta_rate(msg, &sinfo->txrate, | 2443 | if (!nl80211_put_sta_rate(msg, &sinfo->txrate, |
2436 | NL80211_STA_INFO_TX_BITRATE)) | 2444 | NL80211_STA_INFO_TX_BITRATE)) |
@@ -2523,7 +2531,7 @@ static int nl80211_dump_station(struct sk_buff *skb, | |||
2523 | if (nl80211_send_station(skb, | 2531 | if (nl80211_send_station(skb, |
2524 | NETLINK_CB(cb->skb).pid, | 2532 | NETLINK_CB(cb->skb).pid, |
2525 | cb->nlh->nlmsg_seq, NLM_F_MULTI, | 2533 | cb->nlh->nlmsg_seq, NLM_F_MULTI, |
2526 | netdev, mac_addr, | 2534 | dev, netdev, mac_addr, |
2527 | &sinfo) < 0) | 2535 | &sinfo) < 0) |
2528 | goto out; | 2536 | goto out; |
2529 | 2537 | ||
@@ -2568,7 +2576,7 @@ static int nl80211_get_station(struct sk_buff *skb, struct genl_info *info) | |||
2568 | return -ENOMEM; | 2576 | return -ENOMEM; |
2569 | 2577 | ||
2570 | if (nl80211_send_station(msg, info->snd_pid, info->snd_seq, 0, | 2578 | if (nl80211_send_station(msg, info->snd_pid, info->snd_seq, 0, |
2571 | dev, mac_addr, &sinfo) < 0) { | 2579 | rdev, dev, mac_addr, &sinfo) < 0) { |
2572 | nlmsg_free(msg); | 2580 | nlmsg_free(msg); |
2573 | return -ENOBUFS; | 2581 | return -ENOBUFS; |
2574 | } | 2582 | } |
@@ -7596,7 +7604,8 @@ void nl80211_send_sta_event(struct cfg80211_registered_device *rdev, | |||
7596 | if (!msg) | 7604 | if (!msg) |
7597 | return; | 7605 | return; |
7598 | 7606 | ||
7599 | if (nl80211_send_station(msg, 0, 0, 0, dev, mac_addr, sinfo) < 0) { | 7607 | if (nl80211_send_station(msg, 0, 0, 0, |
7608 | rdev, dev, mac_addr, sinfo) < 0) { | ||
7600 | nlmsg_free(msg); | 7609 | nlmsg_free(msg); |
7601 | return; | 7610 | return; |
7602 | } | 7611 | } |