Commit 35af8764 authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: removed usage of proto/wpa.h file

Definitions used either had linux equivalent or were only used in
one source file. Changes were made accordingly and proto/wpa.h
has been removed from the driver sources.
Reviewed-by: default avatarBrett Rudley <brudley@broadcom.com>
Reviewed-by: default avatarHenry Ptasinski <henryp@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarDowan Kim <dowan@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7925465b
......@@ -2004,8 +2004,8 @@ wl_update_pmklist(struct net_device *dev, struct wl_pmk_list *pmk_list,
WL_DBG("No of elements %d\n", pmk_list->pmkids.npmkid);
for (i = 0; i < pmk_list->pmkids.npmkid; i++) {
WL_DBG("PMKID[%d]: %pM =\n", i,
&pmk_list->pmkids.pmkid[i].BSSID);
for (j = 0; j < WPA2_PMKID_LEN; j++) {
&pmk_list->pmkids.pmkid[i].BSSID);
for (j = 0; j < WLAN_PMKID_LEN; j++) {
WL_DBG("%02x\n", pmk_list->pmkids.pmkid[i].PMKID[j]);
}
}
......@@ -2034,7 +2034,7 @@ wl_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *dev,
memcpy(&wl->pmk_list->pmkids.pmkid[i].BSSID, pmksa->bssid,
ETH_ALEN);
memcpy(&wl->pmk_list->pmkids.pmkid[i].PMKID, pmksa->pmkid,
WPA2_PMKID_LEN);
WLAN_PMKID_LEN);
if (i == wl->pmk_list->pmkids.npmkid)
wl->pmk_list->pmkids.npmkid++;
} else {
......@@ -2042,7 +2042,7 @@ wl_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *dev,
}
WL_DBG("set_pmksa,IW_PMKSA_ADD - PMKID: %pM =\n",
&wl->pmk_list->pmkids.pmkid[wl->pmk_list->pmkids.npmkid].BSSID);
for (i = 0; i < WPA2_PMKID_LEN; i++) {
for (i = 0; i < WLAN_PMKID_LEN; i++) {
WL_DBG("%02x\n",
wl->pmk_list->pmkids.pmkid[wl->pmk_list->pmkids.npmkid].
PMKID[i]);
......@@ -2064,11 +2064,11 @@ wl_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *dev,
CHECK_SYS_UP();
memcpy(&pmkid.pmkid[0].BSSID, pmksa->bssid, ETH_ALEN);
memcpy(&pmkid.pmkid[0].PMKID, pmksa->pmkid, WPA2_PMKID_LEN);
memcpy(&pmkid.pmkid[0].PMKID, pmksa->pmkid, WLAN_PMKID_LEN);
WL_DBG("del_pmksa,IW_PMKSA_REMOVE - PMKID: %pM =\n",
&pmkid.pmkid[0].BSSID);
for (i = 0; i < WPA2_PMKID_LEN; i++) {
for (i = 0; i < WLAN_PMKID_LEN; i++) {
WL_DBG("%02x\n", pmkid.pmkid[0].PMKID[i]);
}
......@@ -2087,7 +2087,7 @@ wl_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *dev,
ETH_ALEN);
memcpy(&wl->pmk_list->pmkids.pmkid[i].PMKID,
&wl->pmk_list->pmkids.pmkid[i + 1].PMKID,
WPA2_PMKID_LEN);
WLAN_PMKID_LEN);
}
wl->pmk_list->pmkids.npmkid--;
} else {
......
......@@ -2652,11 +2652,11 @@ wl_iw_set_pmksa(struct net_device *dev,
bcopy(&iwpmksa->bssid.sa_data[0],
&pmkidptr->pmkid[0].BSSID, ETH_ALEN);
bcopy(&iwpmksa->pmkid[0], &pmkidptr->pmkid[0].PMKID,
WPA2_PMKID_LEN);
WLAN_PMKID_LEN);
WL_WSEC("wl_iw_set_pmksa:IW_PMKSA_REMOVE:PMKID: %pM = ",
&pmkidptr->pmkid[0].BSSID);
for (j = 0; j < WPA2_PMKID_LEN; j++)
WL_WSEC("wl_iw_set_pmksa:IW_PMKSA_REMOVE:PMKID: "
"%pM = ", &pmkidptr->pmkid[0].BSSID);
for (j = 0; j < WLAN_PMKID_LEN; j++)
WL_WSEC("%02x ", pmkidptr->pmkid[0].PMKID[j]);
WL_WSEC("\n");
}
......@@ -2676,7 +2676,7 @@ wl_iw_set_pmksa(struct net_device *dev,
ETH_ALEN);
bcopy(&pmkid_list.pmkids.pmkid[i + 1].PMKID,
&pmkid_list.pmkids.pmkid[i].PMKID,
WPA2_PMKID_LEN);
WLAN_PMKID_LEN);
}
pmkid_list.pmkids.npmkid--;
} else
......@@ -2695,7 +2695,7 @@ wl_iw_set_pmksa(struct net_device *dev,
ETH_ALEN);
bcopy(&iwpmksa->pmkid[0],
&pmkid_list.pmkids.pmkid[i].PMKID,
WPA2_PMKID_LEN);
WLAN_PMKID_LEN);
if (i == pmkid_list.pmkids.npmkid)
pmkid_list.pmkids.npmkid++;
} else
......@@ -2706,7 +2706,7 @@ wl_iw_set_pmksa(struct net_device *dev,
k = pmkid_list.pmkids.npmkid;
WL_WSEC("wl_iw_set_pmksa,IW_PMKSA_ADD - PMKID: %pM = ",
&pmkid_list.pmkids.pmkid[k].BSSID);
for (j = 0; j < WPA2_PMKID_LEN; j++)
for (j = 0; j < WLAN_PMKID_LEN; j++)
WL_WSEC("%02x ",
pmkid_list.pmkids.pmkid[k].PMKID[j]);
WL_WSEC("\n");
......@@ -2718,7 +2718,7 @@ wl_iw_set_pmksa(struct net_device *dev,
uint j;
WL_WSEC("PMKID[%d]: %pM = ",
i, &pmkid_list.pmkids.pmkid[i].BSSID);
for (j = 0; j < WPA2_PMKID_LEN; j++)
for (j = 0; j < WLAN_PMKID_LEN; j++)
WL_WSEC("%02x ", pmkid_list.pmkids.pmkid[i].PMKID[j]);
WL_WSEC("\n");
}
......
......@@ -17,7 +17,7 @@
#ifndef _802_11_H_
#define _802_11_H_
#include <proto/wpa.h>
#include <proto/ethernet.h>
#include <packed_section_start.h>
#define DOT11_A3_HDR_LEN 24
......
/*
* Copyright (c) 2010 Broadcom Corporation
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _proto_wpa_h_
#define _proto_wpa_h_
#include <proto/ethernet.h>
#define WPA2_PMKID_LEN 16
#define RSN_CAP_1_REPLAY_CNTR 0
#define RSN_CAP_2_REPLAY_CNTRS 1
#define RSN_CAP_4_REPLAY_CNTRS 2
#define RSN_CAP_16_REPLAY_CNTRS 3
#define WPA_CAP_4_REPLAY_CNTRS RSN_CAP_4_REPLAY_CNTRS
#define WPA_CAP_16_REPLAY_CNTRS RSN_CAP_16_REPLAY_CNTRS
#define WPA_CAP_REPLAY_CNTR_SHIFT RSN_CAP_PTK_REPLAY_CNTR_SHIFT
#define WPA_CAP_REPLAY_CNTR_MASK RSN_CAP_PTK_REPLAY_CNTR_MASK
#endif /* _proto_wpa_h_ */
......@@ -17,6 +17,7 @@
#ifndef _wlioctl_h_
#define _wlioctl_h_
#include <linux/ieee80211.h>
#include <proto/ethernet.h>
#ifdef BRCM_FULLMAC
#include <proto/bcmeth.h>
......@@ -535,7 +536,7 @@ typedef struct {
typedef struct _pmkid {
struct ether_addr BSSID;
u8 PMKID[WPA2_PMKID_LEN];
u8 PMKID[WLAN_PMKID_LEN];
} pmkid_t;
typedef struct _pmkid_list {
......
......@@ -24,7 +24,6 @@
#include <bcmwifi.h>
#include <siutils.h>
#include <bcmendian.h>
#include <proto/wpa.h>
#include <pcicfg.h>
#include <bcmsrom.h>
#include <wlioctl.h>
......@@ -55,6 +54,15 @@
#include <wl_dbg.h>
/*
* WPA(2) definitions
*/
#define RSN_CAP_4_REPLAY_CNTRS 2
#define RSN_CAP_16_REPLAY_CNTRS 3
#define WPA_CAP_4_REPLAY_CNTRS RSN_CAP_4_REPLAY_CNTRS
#define WPA_CAP_16_REPLAY_CNTRS RSN_CAP_16_REPLAY_CNTRS
/*
* buffer length needed for wlc_format_ssid
* 32 SSID chars, max of 4 chars for each SSID char "\xFF", plus NULL.
......
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