Browse Source

Removed the unused hapd argument to ieee802_11_parse_elems()

Jouni Malinen 16 years ago
parent
commit
3d536eb453
5 changed files with 10 additions and 15 deletions
  1. 1 2
      hostapd/beacon.c
  2. 1 1
      hostapd/driver_prism54.c
  3. 6 8
      hostapd/ieee802_11.c
  4. 1 2
      hostapd/ieee802_11.h
  5. 1 2
      hostapd/wme.c

+ 1 - 2
hostapd/beacon.c

@@ -189,8 +189,7 @@ void handle_probe_req(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
 	if (!hapd->iconf->send_probe_response)
 		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,
 			   MAC2STR(mgmt->sa));
 		return;

+ 1 - 1
hostapd/driver_prism54.c

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

+ 6 - 8
hostapd/ieee802_11.c

@@ -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)
 				* 00:50:F2 */
 
-static int ieee802_11_parse_vendor_specific(struct hostapd_data *hapd,
-					    u8 *pos, size_t elen,
+static int ieee802_11_parse_vendor_specific(u8 *pos, size_t elen,
 					    struct ieee802_11_elems *elems,
 					    int show_errors)
 {
@@ -390,8 +389,7 @@ static u8 * hostapd_eid_assoc_comeback_time(struct hostapd_data *hapd,
 #endif /* CONFIG_IEEE80211W */
 
 
-ParseRes ieee802_11_parse_elems(struct hostapd_data *hapd, u8 *start,
-				size_t len,
+ParseRes ieee802_11_parse_elems(u8 *start, size_t len,
 				struct ieee802_11_elems *elems,
 				int show_errors)
 {
@@ -461,7 +459,7 @@ ParseRes ieee802_11_parse_elems(struct hostapd_data *hapd, u8 *start,
 			elems->ext_supp_rates_len = elen;
 			break;
 		case WLAN_EID_VENDOR_SPECIFIC:
-			if (ieee802_11_parse_vendor_specific(hapd, pos, elen,
+			if (ieee802_11_parse_vendor_specific(pos, elen,
 							     elems,
 							     show_errors))
 				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
 	 * is used */
-	if (ieee802_11_parse_elems(hapd, pos, left, &elems, 1) == ParseFailed
-	    || !elems.ssid) {
+	if (ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed ||
+	    !elems.ssid) {
 		printf("STA " MACSTR " sent invalid association request\n",
 		       MAC2STR(sta->addr));
 		resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
@@ -1561,7 +1559,7 @@ static void handle_beacon(struct hostapd_data *hapd,
 		return;
 	}
 
-	(void) ieee802_11_parse_elems(hapd, mgmt->u.beacon.variable,
+	(void) ieee802_11_parse_elems(mgmt->u.beacon.variable,
 				      len - (IEEE80211_HDRLEN +
 					     sizeof(mgmt->u.beacon)), &elems,
 				      0);

+ 1 - 2
hostapd/ieee802_11.h

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

+ 1 - 2
hostapd/wme.c

@@ -212,8 +212,7 @@ void hostapd_wme_action(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
 	}
 
 	/* 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_LEVEL_DEBUG,
 			       "hostapd_wme_action - could not parse wme "