aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2010-04-19 03:16:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-19 16:41:42 -0400
commit69c264de2ada18bd9da6c9f582a8babd3dcf5f18 (patch)
tree496b1e5bdae3dad863e2d0ef64b972769845c4d7 /drivers/net/wireless/orinoco
parentc3d415030c1a00cc21935c38f8761db46ef1d7ff (diff)
orinoco: use cfg80211_find_ie
Instead of using a local function. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco')
-rw-r--r--drivers/net/wireless/orinoco/main.h12
-rw-r--r--drivers/net/wireless/orinoco/scan.c4
2 files changed, 2 insertions, 14 deletions
diff --git a/drivers/net/wireless/orinoco/main.h b/drivers/net/wireless/orinoco/main.h
index 21ab36cd76c..4dadf9880a9 100644
--- a/drivers/net/wireless/orinoco/main.h
+++ b/drivers/net/wireless/orinoco/main.h
@@ -33,18 +33,6 @@ int orinoco_commit(struct orinoco_private *priv);
33void orinoco_reset(struct work_struct *work); 33void orinoco_reset(struct work_struct *work);
34 34
35/* Information element helpers - find a home for these... */ 35/* Information element helpers - find a home for these... */
36static inline u8 *orinoco_get_ie(u8 *data, size_t len,
37 enum ieee80211_eid eid)
38{
39 u8 *p = data;
40 while ((p + 2) < (data + len)) {
41 if (p[0] == eid)
42 return p;
43 p += p[1] + 2;
44 }
45 return NULL;
46}
47
48#define WPA_OUI_TYPE "\x00\x50\xF2\x01" 36#define WPA_OUI_TYPE "\x00\x50\xF2\x01"
49#define WPA_SELECTOR_LEN 4 37#define WPA_SELECTOR_LEN 4
50static inline u8 *orinoco_get_wpa_ie(u8 *data, size_t len) 38static inline u8 *orinoco_get_wpa_ie(u8 *data, size_t len)
diff --git a/drivers/net/wireless/orinoco/scan.c b/drivers/net/wireless/orinoco/scan.c
index d2f10e9c216..e97a95bacb7 100644
--- a/drivers/net/wireless/orinoco/scan.c
+++ b/drivers/net/wireless/orinoco/scan.c
@@ -126,7 +126,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv,
126{ 126{
127 struct wiphy *wiphy = priv_to_wiphy(priv); 127 struct wiphy *wiphy = priv_to_wiphy(priv);
128 struct ieee80211_channel *channel; 128 struct ieee80211_channel *channel;
129 u8 *ie; 129 const u8 *ie;
130 u64 timestamp; 130 u64 timestamp;
131 s32 signal; 131 s32 signal;
132 u16 capability; 132 u16 capability;
@@ -135,7 +135,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv,
135 int chan, freq; 135 int chan, freq;
136 136
137 ie_len = len - sizeof(*bss); 137 ie_len = len - sizeof(*bss);
138 ie = orinoco_get_ie(bss->data, ie_len, WLAN_EID_DS_PARAMS); 138 ie = cfg80211_find_ie(WLAN_EID_DS_PARAMS, bss->data, ie_len);
139 chan = ie ? ie[2] : 0; 139 chan = ie ? ie[2] : 0;
140 freq = ieee80211_dsss_chan_to_freq(chan); 140 freq = ieee80211_dsss_chan_to_freq(chan);
141 channel = ieee80211_get_channel(wiphy, freq); 141 channel = ieee80211_get_channel(wiphy, freq);