Commit 69c264de authored by David Kilroy's avatar David Kilroy Committed by John W. Linville

orinoco: use cfg80211_find_ie

Instead of using a local function.
Signed-off-by: default avatarDavid Kilroy <kilroyd@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c3d41503
...@@ -33,18 +33,6 @@ int orinoco_commit(struct orinoco_private *priv); ...@@ -33,18 +33,6 @@ int orinoco_commit(struct orinoco_private *priv);
void orinoco_reset(struct work_struct *work); void orinoco_reset(struct work_struct *work);
/* Information element helpers - find a home for these... */ /* Information element helpers - find a home for these... */
static inline u8 *orinoco_get_ie(u8 *data, size_t len,
enum ieee80211_eid eid)
{
u8 *p = data;
while ((p + 2) < (data + len)) {
if (p[0] == eid)
return p;
p += p[1] + 2;
}
return NULL;
}
#define WPA_OUI_TYPE "\x00\x50\xF2\x01" #define WPA_OUI_TYPE "\x00\x50\xF2\x01"
#define WPA_SELECTOR_LEN 4 #define WPA_SELECTOR_LEN 4
static inline u8 *orinoco_get_wpa_ie(u8 *data, size_t len) static inline u8 *orinoco_get_wpa_ie(u8 *data, size_t len)
......
...@@ -126,7 +126,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv, ...@@ -126,7 +126,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv,
{ {
struct wiphy *wiphy = priv_to_wiphy(priv); struct wiphy *wiphy = priv_to_wiphy(priv);
struct ieee80211_channel *channel; struct ieee80211_channel *channel;
u8 *ie; const u8 *ie;
u64 timestamp; u64 timestamp;
s32 signal; s32 signal;
u16 capability; u16 capability;
...@@ -135,7 +135,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv, ...@@ -135,7 +135,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv,
int chan, freq; int chan, freq;
ie_len = len - sizeof(*bss); ie_len = len - sizeof(*bss);
ie = orinoco_get_ie(bss->data, ie_len, WLAN_EID_DS_PARAMS); ie = cfg80211_find_ie(WLAN_EID_DS_PARAMS, bss->data, ie_len);
chan = ie ? ie[2] : 0; chan = ie ? ie[2] : 0;
freq = ieee80211_dsss_chan_to_freq(chan); freq = ieee80211_dsss_chan_to_freq(chan);
channel = ieee80211_get_channel(wiphy, freq); channel = ieee80211_get_channel(wiphy, freq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment