diff options
author | Zhao, Gang | 2014-02-18 16:03:27 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-02-18 20:16:56 +0100 |
commit | 4e5e9d7c66f045558d5f70f640de0093fcd875e8 (patch) | |
tree | 580b777680c41a93b7c6272536372c8b7b3aba3e /drivers/staging/wlan-ng/cfg80211.c | |
parent | staging: gdm724x: cleanup alloc_tx_sdu_struct() (diff) | |
download | kernel-qcow2-linux-4e5e9d7c66f045558d5f70f640de0093fcd875e8.tar.gz kernel-qcow2-linux-4e5e9d7c66f045558d5f70f640de0093fcd875e8.tar.xz kernel-qcow2-linux-4e5e9d7c66f045558d5f70f640de0093fcd875e8.zip |
staging: wlan-ng: replace function ieee80211_dsss_chan_to_freq()
Replace ieee80211_dsss_chan_to_freq() with more generic
ieee80211_channel_to_frequency(), and add a variable to deal with 80
characters problem.
File cfg80211.c is included by p80211netdev.c, p80211netdev.c includes
<net/cfg80211.h>, both ieee80211_channel_to_frequency() and
IEEE80211_BAND_2GHZ is defined / declared in <net/cfg80211.h>. So this
change is safe.
This change is a preparation for the removal of function
ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng/cfg80211.c')
-rw-r--r-- | drivers/staging/wlan-ng/cfg80211.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index a7d24c95191d..6c317304b658 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c @@ -400,6 +400,8 @@ static int prism2_scan(struct wiphy *wiphy, numbss = msg1.numbss.data; for (i = 0; i < numbss; i++) { + int freq; + memset(&msg2, 0, sizeof(msg2)); msg2.msgcode = DIDmsg_dot11req_scan_results; msg2.bssindex.data = i; @@ -414,9 +416,10 @@ static int prism2_scan(struct wiphy *wiphy, ie_buf[1] = msg2.ssid.data.len; ie_len = ie_buf[1] + 2; memcpy(&ie_buf[2], &(msg2.ssid.data.data), msg2.ssid.data.len); + freq = ieee80211_channel_to_frequency(msg2.dschannel.data, + IEEE80211_BAND_2GHZ); bss = cfg80211_inform_bss(wiphy, - ieee80211_get_channel(wiphy, - ieee80211_dsss_chan_to_freq(msg2.dschannel.data)), + ieee80211_get_channel(wiphy, freq), (const u8 *) &(msg2.bssid.data.data), msg2.timestamp.data, msg2.capinfo.data, msg2.beaconperiod.data, |