Removed the unused hapd argument to ieee802_11_parse_elems()

This commit is contained in:
Jouni Malinen 2008-10-29 21:33:46 +02:00
parent fefee8a74d
commit 3d536eb453
5 changed files with 10 additions and 15 deletions

View file

@ -189,8 +189,7 @@ void handle_probe_req(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
if (!hapd->iconf->send_probe_response) if (!hapd->iconf->send_probe_response)
return; return;
if (ieee802_11_parse_elems(hapd, ie, ie_len, &elems, 0) == ParseFailed) if (ieee802_11_parse_elems(ie, ie_len, &elems, 0) == ParseFailed) {
{
wpa_printf(MSG_DEBUG, "Could not parse ProbeReq from " MACSTR, wpa_printf(MSG_DEBUG, "Could not parse ProbeReq from " MACSTR,
MAC2STR(mgmt->sa)); MAC2STR(mgmt->sa));
return; return;

View file

@ -757,7 +757,7 @@ static void prism54_handle_assoc(struct prism54_driver_data *drv,
resp = WLAN_STATUS_UNSPECIFIED_FAILURE; resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
goto fail; goto fail;
} }
if (ieee802_11_parse_elems(drv->hapd, cb + ieofs, if (ieee802_11_parse_elems(cb + ieofs,
le_to_host16(mlme->size) - ieofs, le_to_host16(mlme->size) - ieofs,
&elems, 1) == ParseFailed) { &elems, 1) == ParseFailed) {
printf("STA " MACSTR " sent invalid association " printf("STA " MACSTR " sent invalid association "

View file

@ -293,8 +293,7 @@ u16 hostapd_own_capab_info(struct hostapd_data *hapd, struct sta_info *sta,
#define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs) #define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
* 00:50:F2 */ * 00:50:F2 */
static int ieee802_11_parse_vendor_specific(struct hostapd_data *hapd, static int ieee802_11_parse_vendor_specific(u8 *pos, size_t elen,
u8 *pos, size_t elen,
struct ieee802_11_elems *elems, struct ieee802_11_elems *elems,
int show_errors) int show_errors)
{ {
@ -390,8 +389,7 @@ static u8 * hostapd_eid_assoc_comeback_time(struct hostapd_data *hapd,
#endif /* CONFIG_IEEE80211W */ #endif /* CONFIG_IEEE80211W */
ParseRes ieee802_11_parse_elems(struct hostapd_data *hapd, u8 *start, ParseRes ieee802_11_parse_elems(u8 *start, size_t len,
size_t len,
struct ieee802_11_elems *elems, struct ieee802_11_elems *elems,
int show_errors) int show_errors)
{ {
@ -461,7 +459,7 @@ ParseRes ieee802_11_parse_elems(struct hostapd_data *hapd, u8 *start,
elems->ext_supp_rates_len = elen; elems->ext_supp_rates_len = elen;
break; break;
case WLAN_EID_VENDOR_SPECIFIC: case WLAN_EID_VENDOR_SPECIFIC:
if (ieee802_11_parse_vendor_specific(hapd, pos, elen, if (ieee802_11_parse_vendor_specific(pos, elen,
elems, elems,
show_errors)) show_errors))
unknown++; unknown++;
@ -1028,8 +1026,8 @@ static void handle_assoc(struct hostapd_data *hapd,
/* followed by SSID and Supported rates; and HT capabilities if 802.11n /* followed by SSID and Supported rates; and HT capabilities if 802.11n
* is used */ * is used */
if (ieee802_11_parse_elems(hapd, pos, left, &elems, 1) == ParseFailed if (ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed ||
|| !elems.ssid) { !elems.ssid) {
printf("STA " MACSTR " sent invalid association request\n", printf("STA " MACSTR " sent invalid association request\n",
MAC2STR(sta->addr)); MAC2STR(sta->addr));
resp = WLAN_STATUS_UNSPECIFIED_FAILURE; resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
@ -1561,7 +1559,7 @@ static void handle_beacon(struct hostapd_data *hapd,
return; return;
} }
(void) ieee802_11_parse_elems(hapd, mgmt->u.beacon.variable, (void) ieee802_11_parse_elems(mgmt->u.beacon.variable,
len - (IEEE80211_HDRLEN + len - (IEEE80211_HDRLEN +
sizeof(mgmt->u.beacon)), &elems, sizeof(mgmt->u.beacon)), &elems,
0); 0);

View file

@ -83,8 +83,7 @@ void ieee802_11_mgmt(struct hostapd_data *hapd, u8 *buf, size_t len,
u16 stype, struct hostapd_frame_info *fi); u16 stype, struct hostapd_frame_info *fi);
void ieee802_11_mgmt_cb(struct hostapd_data *hapd, u8 *buf, size_t len, void ieee802_11_mgmt_cb(struct hostapd_data *hapd, u8 *buf, size_t len,
u16 stype, int ok); u16 stype, int ok);
ParseRes ieee802_11_parse_elems(struct hostapd_data *hapd, u8 *start, ParseRes ieee802_11_parse_elems(u8 *start, size_t len,
size_t len,
struct ieee802_11_elems *elems, struct ieee802_11_elems *elems,
int show_errors); int show_errors);
void ieee802_11_print_ssid(char *buf, const u8 *ssid, u8 len); void ieee802_11_print_ssid(char *buf, const u8 *ssid, u8 len);

View file

@ -212,8 +212,7 @@ void hostapd_wme_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
} }
/* extract the tspec info element */ /* extract the tspec info element */
if (ieee802_11_parse_elems(hapd, pos, left, &elems, 1) == ParseFailed) if (ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed) {
{
hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211, hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_DEBUG, HOSTAPD_LEVEL_DEBUG,
"hostapd_wme_action - could not parse wme " "hostapd_wme_action - could not parse wme "