summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
diff options
context:
space:
mode:
authorIgor Mitsyanko <igor.mitsyanko.os@quantenna.com>2017-10-05 04:38:13 +0300
committerKalle Valo <kvalo@codeaurora.org>2017-10-13 12:59:32 +0300
commitef81e8e9dbbb7f8348f3a62a6ab05e7aea33ea35 (patch)
tree968960a48f2d41c77fd9ae970d827ba151dafbdc /drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
parentd23d1361316219621d146ba4b396a2ec4ddebfbf (diff)
downloadlinux-ef81e8e9dbbb7f8348f3a62a6ab05e7aea33ea35.tar.xz
qtnfmac: do not cache current channel info in driver's state
Linux Wireless device structure already has current channel information that can be used when needed. Start using it. Since driver's channel info is not used anymore, remove it. Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/quantenna/qtnfmac/cfg80211.c')
-rw-r--r--drivers/net/wireless/quantenna/qtnfmac/cfg80211.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
index cf0f19effd20..028bed1acd82 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
@@ -630,15 +630,15 @@ qtnf_dump_survey(struct wiphy *wiphy, struct net_device *dev,
int idx, struct survey_info *survey)
{
struct qtnf_wmac *mac = wiphy_priv(wiphy);
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
struct ieee80211_supported_band *sband;
- struct cfg80211_chan_def *chandef;
+ const struct cfg80211_chan_def *chandef = &wdev->chandef;
struct ieee80211_channel *chan;
struct qtnf_chan_stats stats;
struct qtnf_vif *vif;
int ret;
vif = qtnf_netdev_get_priv(dev);
- chandef = &mac->chandef;
sband = wiphy->bands[NL80211_BAND_2GHZ];
if (sband && idx >= sband->n_channels) {
@@ -705,7 +705,6 @@ static int
qtnf_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_chan_def *chandef)
{
- struct qtnf_wmac *mac = wiphy_priv(wiphy);
struct net_device *ndev = wdev->netdev;
struct qtnf_vif *vif;
int ret;
@@ -728,8 +727,6 @@ qtnf_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev,
ret = -ENODATA;
}
- memcpy(&mac->chandef, chandef, sizeof(mac->chandef));
-
out:
return ret;
}