diff options
author | Lior David <qca_liord@qca.qualcomm.com> | 2017-12-14 11:53:13 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-09 03:03:38 -0500 |
commit | 7d3e4dbe570e79940624ff46387e34db741dcb5c (patch) | |
tree | 0ffebeea8f8c54e2ed01686b69c904dfba9b2fb6 | |
parent | 83957bc3aeaf8e6d1b7917ce4ebe943e5d48dc4c (diff) |
wil6210: remove reference to preset_chandef
The field preset_chandef of wireless_dev must not be accessed
by the driver because it is private to cfg80211. Store the
monitor channel locally in wil6210_priv instead.
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/ath/wil6210/cfg80211.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/debugfs.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/netdev.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/txrx.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wil6210.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.c | 2 |
6 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index 39509d053eea..768f63f38341 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c | |||
@@ -956,9 +956,8 @@ static int wil_cfg80211_set_channel(struct wiphy *wiphy, | |||
956 | struct cfg80211_chan_def *chandef) | 956 | struct cfg80211_chan_def *chandef) |
957 | { | 957 | { |
958 | struct wil6210_priv *wil = wiphy_to_wil(wiphy); | 958 | struct wil6210_priv *wil = wiphy_to_wil(wiphy); |
959 | struct wireless_dev *wdev = wil_to_wdev(wil); | ||
960 | 959 | ||
961 | wdev->preset_chandef = *chandef; | 960 | wil->monitor_chandef = *chandef; |
962 | 961 | ||
963 | return 0; | 962 | return 0; |
964 | } | 963 | } |
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c index 4475937faf25..4a4888246e8c 100644 --- a/drivers/net/wireless/ath/wil6210/debugfs.c +++ b/drivers/net/wireless/ath/wil6210/debugfs.c | |||
@@ -869,7 +869,6 @@ static ssize_t wil_write_file_txmgmt(struct file *file, const char __user *buf, | |||
869 | 869 | ||
870 | params.buf = frame; | 870 | params.buf = frame; |
871 | params.len = len; | 871 | params.len = len; |
872 | params.chan = wdev->preset_chandef.chan; | ||
873 | 872 | ||
874 | rc = wil_cfg80211_mgmt_tx(wiphy, wdev, ¶ms, NULL); | 873 | rc = wil_cfg80211_mgmt_tx(wiphy, wdev, ¶ms, NULL); |
875 | 874 | ||
diff --git a/drivers/net/wireless/ath/wil6210/netdev.c b/drivers/net/wireless/ath/wil6210/netdev.c index b641ac17a053..7ba4e0af8f57 100644 --- a/drivers/net/wireless/ath/wil6210/netdev.c +++ b/drivers/net/wireless/ath/wil6210/netdev.c | |||
@@ -150,7 +150,7 @@ void *wil_if_alloc(struct device *dev) | |||
150 | wdev->iftype = NL80211_IFTYPE_STATION; /* TODO */ | 150 | wdev->iftype = NL80211_IFTYPE_STATION; /* TODO */ |
151 | /* default monitor channel */ | 151 | /* default monitor channel */ |
152 | ch = wdev->wiphy->bands[NL80211_BAND_60GHZ]->channels; | 152 | ch = wdev->wiphy->bands[NL80211_BAND_60GHZ]->channels; |
153 | cfg80211_chandef_create(&wdev->preset_chandef, ch, NL80211_CHAN_NO_HT); | 153 | cfg80211_chandef_create(&wil->monitor_chandef, ch, NL80211_CHAN_NO_HT); |
154 | 154 | ||
155 | ndev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, wil_dev_setup); | 155 | ndev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, wil_dev_setup); |
156 | if (!ndev) { | 156 | if (!ndev) { |
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index 62c04f078ebf..16b8a4e5201f 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c | |||
@@ -348,7 +348,6 @@ static int wil_vring_alloc_skb(struct wil6210_priv *wil, struct vring *vring, | |||
348 | static void wil_rx_add_radiotap_header(struct wil6210_priv *wil, | 348 | static void wil_rx_add_radiotap_header(struct wil6210_priv *wil, |
349 | struct sk_buff *skb) | 349 | struct sk_buff *skb) |
350 | { | 350 | { |
351 | struct wireless_dev *wdev = wil->wdev; | ||
352 | struct wil6210_rtap { | 351 | struct wil6210_rtap { |
353 | struct ieee80211_radiotap_header rthdr; | 352 | struct ieee80211_radiotap_header rthdr; |
354 | /* fields should be in the order of bits in rthdr.it_present */ | 353 | /* fields should be in the order of bits in rthdr.it_present */ |
@@ -375,7 +374,7 @@ static void wil_rx_add_radiotap_header(struct wil6210_priv *wil, | |||
375 | int rtap_len = sizeof(struct wil6210_rtap); | 374 | int rtap_len = sizeof(struct wil6210_rtap); |
376 | int phy_length = 0; /* phy info header size, bytes */ | 375 | int phy_length = 0; /* phy info header size, bytes */ |
377 | static char phy_data[128]; | 376 | static char phy_data[128]; |
378 | struct ieee80211_channel *ch = wdev->preset_chandef.chan; | 377 | struct ieee80211_channel *ch = wil->monitor_chandef.chan; |
379 | 378 | ||
380 | if (rtap_include_phy_info) { | 379 | if (rtap_include_phy_info) { |
381 | rtap_len = sizeof(*rtap_vendor) + sizeof(*d); | 380 | rtap_len = sizeof(*rtap_vendor) + sizeof(*d); |
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index da0b28c288e0..0a0766b2c80a 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h | |||
@@ -655,6 +655,7 @@ struct wil6210_priv { | |||
655 | unsigned long last_fw_recovery; /* jiffies of last fw recovery */ | 655 | unsigned long last_fw_recovery; /* jiffies of last fw recovery */ |
656 | wait_queue_head_t wq; /* for all wait_event() use */ | 656 | wait_queue_head_t wq; /* for all wait_event() use */ |
657 | /* profile */ | 657 | /* profile */ |
658 | struct cfg80211_chan_def monitor_chandef; | ||
658 | u32 monitor_flags; | 659 | u32 monitor_flags; |
659 | u32 privacy; /* secure connection? */ | 660 | u32 privacy; /* secure connection? */ |
660 | u8 hidden_ssid; /* relevant in AP mode */ | 661 | u8 hidden_ssid; /* relevant in AP mode */ |
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 9b9882ca3bff..2ab71bb32327 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c | |||
@@ -1782,7 +1782,7 @@ int wmi_rx_chain_add(struct wil6210_priv *wil, struct vring *vring) | |||
1782 | int rc; | 1782 | int rc; |
1783 | 1783 | ||
1784 | if (wdev->iftype == NL80211_IFTYPE_MONITOR) { | 1784 | if (wdev->iftype == NL80211_IFTYPE_MONITOR) { |
1785 | struct ieee80211_channel *ch = wdev->preset_chandef.chan; | 1785 | struct ieee80211_channel *ch = wil->monitor_chandef.chan; |
1786 | 1786 | ||
1787 | cmd.sniffer_cfg.mode = cpu_to_le32(WMI_SNIFFER_ON); | 1787 | cmd.sniffer_cfg.mode = cpu_to_le32(WMI_SNIFFER_ON); |
1788 | if (ch) | 1788 | if (ch) |