staging: rtl8712: remove duplicate struct
struct ndis_wlan_bssid_ex is a doppelganger of struct wlan_bssid_ex, and is used about a third as often. Switch all instances to wlan_bssid_ex, and remove ndis_wlan_bssid_ex This also gets rid of a use of typedef NDIS_802_11_RATES_EX Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ebe92393ca
commit
44367877c6
|
@ -456,9 +456,7 @@ u8 r8712_createbss_cmd(struct _adapter *padapter)
|
|||
INIT_LIST_HEAD(&pcmd->list);
|
||||
pcmd->cmdcode = _CreateBss_CMD_;
|
||||
pcmd->parmbuf = (unsigned char *)pdev_network;
|
||||
pcmd->cmdsz = r8712_get_ndis_wlan_bssid_ex_sz((
|
||||
struct ndis_wlan_bssid_ex *)
|
||||
pdev_network);
|
||||
pcmd->cmdsz = r8712_get_ndis_wlan_bssid_ex_sz(pdev_network);
|
||||
pcmd->rsp = NULL;
|
||||
pcmd->rspsz = 0;
|
||||
/* notes: translate IELength & Length after assign to cmdsz; */
|
||||
|
@ -471,7 +469,7 @@ u8 r8712_createbss_cmd(struct _adapter *padapter)
|
|||
|
||||
u8 r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork)
|
||||
{
|
||||
struct ndis_wlan_bssid_ex *psecnetwork;
|
||||
struct wlan_bssid_ex *psecnetwork;
|
||||
struct cmd_obj *pcmd;
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
@ -502,7 +500,7 @@ u8 r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork)
|
|||
break;
|
||||
}
|
||||
}
|
||||
psecnetwork = (struct ndis_wlan_bssid_ex *)&psecuritypriv->sec_bss;
|
||||
psecnetwork = &psecuritypriv->sec_bss;
|
||||
if (psecnetwork == NULL) {
|
||||
kfree(pcmd);
|
||||
return _FAIL;
|
||||
|
@ -894,8 +892,7 @@ void r8712_createbss_cmd_callback(struct _adapter *padapter,
|
|||
struct sta_info *psta = NULL;
|
||||
struct wlan_network *pwlan = NULL;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct ndis_wlan_bssid_ex *pnetwork = (struct ndis_wlan_bssid_ex *)
|
||||
pcmd->parmbuf;
|
||||
struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)pcmd->parmbuf;
|
||||
struct wlan_network *tgt_network = &(pmlmepriv->cur_network);
|
||||
|
||||
if (pcmd->res != H2C_SUCCESS)
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* Used to report a bss has been scanned
|
||||
*/
|
||||
struct survey_event {
|
||||
struct ndis_wlan_bssid_ex bss;
|
||||
struct wlan_bssid_ex bss;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -634,7 +634,7 @@ static int r8711_wx_get_name(struct net_device *dev,
|
|||
char *p;
|
||||
u8 ht_cap = false;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct ndis_wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
NDIS_802_11_RATES_EX *prates = NULL;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) ==
|
||||
|
@ -723,7 +723,7 @@ static int r8711_wx_get_freq(struct net_device *dev,
|
|||
{
|
||||
struct _adapter *padapter = netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct ndis_wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
wrqu->freq.m = ieee80211_wlan_frequencies[
|
||||
|
@ -1111,7 +1111,7 @@ static int r8711_wx_get_wap(struct net_device *dev,
|
|||
{
|
||||
struct _adapter *padapter = netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct ndis_wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
|
||||
wrqu->ap_addr.sa_family = ARPHRD_ETHER;
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE |
|
||||
|
@ -1327,7 +1327,7 @@ static int r8711_wx_get_essid(struct net_device *dev,
|
|||
{
|
||||
struct _adapter *padapter = netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct ndis_wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
u32 len, ret = 0;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE)) {
|
||||
|
@ -1419,7 +1419,7 @@ static int r8711_wx_get_rate(struct net_device *dev,
|
|||
{
|
||||
struct _adapter *padapter = netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct ndis_wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
struct ieee80211_ht_cap *pht_capie;
|
||||
unsigned char rf_type = padapter->registrypriv.rf_config;
|
||||
int i;
|
||||
|
|
|
@ -208,7 +208,7 @@ void r8712_generate_random_ibss(u8 *pibss)
|
|||
pibss[5] = (u8)((curtime>>16) & 0xff);
|
||||
}
|
||||
|
||||
uint r8712_get_ndis_wlan_bssid_ex_sz(struct ndis_wlan_bssid_ex *bss)
|
||||
uint r8712_get_ndis_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
|
||||
{
|
||||
return sizeof(*bss) + bss->IELength - MAX_IE_SZ;
|
||||
}
|
||||
|
@ -276,8 +276,8 @@ int r8712_is_same_ibss(struct _adapter *adapter, struct wlan_network *pnetwork)
|
|||
|
||||
}
|
||||
|
||||
static int is_same_network(struct ndis_wlan_bssid_ex *src,
|
||||
struct ndis_wlan_bssid_ex *dst)
|
||||
static int is_same_network(struct wlan_bssid_ex *src,
|
||||
struct wlan_bssid_ex *dst)
|
||||
{
|
||||
u16 s_cap, d_cap;
|
||||
|
||||
|
@ -322,8 +322,8 @@ struct wlan_network *r8712_get_oldest_wlan_network(
|
|||
return oldest;
|
||||
}
|
||||
|
||||
static void update_network(struct ndis_wlan_bssid_ex *dst,
|
||||
struct ndis_wlan_bssid_ex *src,
|
||||
static void update_network(struct wlan_bssid_ex *dst,
|
||||
struct wlan_bssid_ex *src,
|
||||
struct _adapter *padapter)
|
||||
{
|
||||
u32 last_evm = 0, tmpVal;
|
||||
|
@ -360,7 +360,7 @@ static void update_network(struct ndis_wlan_bssid_ex *dst,
|
|||
}
|
||||
|
||||
static void update_current_network(struct _adapter *adapter,
|
||||
struct ndis_wlan_bssid_ex *pnetwork)
|
||||
struct wlan_bssid_ex *pnetwork)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
|
||||
|
@ -378,7 +378,7 @@ static void update_current_network(struct _adapter *adapter,
|
|||
Caller must hold pmlmepriv->lock first.
|
||||
*/
|
||||
static void update_scanned_network(struct _adapter *adapter,
|
||||
struct ndis_wlan_bssid_ex *target)
|
||||
struct wlan_bssid_ex *target)
|
||||
{
|
||||
struct list_head *plist, *phead;
|
||||
|
||||
|
@ -441,7 +441,7 @@ static void update_scanned_network(struct _adapter *adapter,
|
|||
}
|
||||
|
||||
static void rtl8711_add_network(struct _adapter *adapter,
|
||||
struct ndis_wlan_bssid_ex *pnetwork)
|
||||
struct wlan_bssid_ex *pnetwork)
|
||||
{
|
||||
unsigned long irqL;
|
||||
struct mlme_priv *pmlmepriv = &(((struct _adapter *)adapter)->mlmepriv);
|
||||
|
@ -497,10 +497,10 @@ void r8712_survey_event_callback(struct _adapter *adapter, u8 *pbuf)
|
|||
{
|
||||
unsigned long flags;
|
||||
u32 len;
|
||||
struct ndis_wlan_bssid_ex *pnetwork;
|
||||
struct wlan_bssid_ex *pnetwork;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
|
||||
pnetwork = (struct ndis_wlan_bssid_ex *)pbuf;
|
||||
pnetwork = (struct wlan_bssid_ex *)pbuf;
|
||||
#ifdef __BIG_ENDIAN
|
||||
/* endian_convert */
|
||||
pnetwork->Length = le32_to_cpu(pnetwork->Length);
|
||||
|
@ -1658,8 +1658,7 @@ void r8712_update_registrypriv_dev_network(struct _adapter *adapter)
|
|||
*/
|
||||
sz = r8712_generate_ie(pregistrypriv);
|
||||
pdev_network->IELength = sz;
|
||||
pdev_network->Length = r8712_get_ndis_wlan_bssid_ex_sz(
|
||||
(struct ndis_wlan_bssid_ex *)pdev_network);
|
||||
pdev_network->Length = r8712_get_ndis_wlan_bssid_ex_sz(pdev_network);
|
||||
}
|
||||
|
||||
/*the function is at passive_level*/
|
||||
|
|
|
@ -202,7 +202,7 @@ sint r8712_set_key(struct _adapter *adapter,
|
|||
struct security_priv *psecuritypriv, sint keyid);
|
||||
sint r8712_set_auth(struct _adapter *adapter,
|
||||
struct security_priv *psecuritypriv);
|
||||
uint r8712_get_ndis_wlan_bssid_ex_sz(struct ndis_wlan_bssid_ex *bss);
|
||||
uint r8712_get_ndis_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss);
|
||||
void r8712_generate_random_ibss(u8 *pibss);
|
||||
u8 *r8712_get_capability_from_ie(u8 *ie);
|
||||
struct wlan_network *r8712_get_oldest_wlan_network(
|
||||
|
|
|
@ -160,13 +160,13 @@ static int mp_start_test(struct _adapter *padapter)
|
|||
struct mp_priv *pmppriv = &padapter->mppriv;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wlan_network *tgt_network = &pmlmepriv->cur_network;
|
||||
struct ndis_wlan_bssid_ex bssid;
|
||||
struct wlan_bssid_ex bssid;
|
||||
struct sta_info *psta;
|
||||
unsigned long length;
|
||||
unsigned long irqL;
|
||||
int res = _SUCCESS;
|
||||
|
||||
/* 3 1. initialize a new struct ndis_wlan_bssid_ex */
|
||||
/* 3 1. initialize a new struct wlan_bssid_ex */
|
||||
memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN);
|
||||
bssid.Ssid.SsidLength = 16;
|
||||
memcpy(bssid.Ssid.Ssid, (unsigned char *)"mp_pseudo_adhoc",
|
||||
|
|
|
@ -83,7 +83,7 @@ struct NDIS_802_11_FIXED_IEs {
|
|||
u16 Capabilities;
|
||||
};
|
||||
|
||||
struct ndis_wlan_bssid_ex {
|
||||
struct wlan_bssid_ex {
|
||||
u32 Length;
|
||||
unsigned char MacAddress[6];
|
||||
u8 Reserved[2];
|
||||
|
@ -203,7 +203,7 @@ struct wlan_network {
|
|||
unsigned int last_scanned; /*timestamp for the network */
|
||||
int aid; /*will only be valid when a BSS is joined. */
|
||||
int join_res;
|
||||
struct ndis_wlan_bssid_ex network; /*must be the last item */
|
||||
struct wlan_bssid_ex network; /*must be the last item */
|
||||
};
|
||||
|
||||
enum VRTL_CARRIER_SENSE {
|
||||
|
@ -234,24 +234,5 @@ enum UAPSD_MAX_SP {
|
|||
#define NUM_PRE_AUTH_KEY 16
|
||||
#define NUM_PMKID_CACHE NUM_PRE_AUTH_KEY
|
||||
|
||||
/*
|
||||
* WPA2
|
||||
*/
|
||||
struct wlan_bssid_ex {
|
||||
u32 Length;
|
||||
unsigned char MacAddress[6];
|
||||
u8 Reserved[2];
|
||||
struct ndis_802_11_ssid Ssid;
|
||||
u32 Privacy;
|
||||
s32 Rssi;
|
||||
enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
|
||||
struct NDIS_802_11_CONFIGURATION Configuration;
|
||||
enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
|
||||
NDIS_802_11_RATES_EX SupportedRates;
|
||||
u32 IELength;
|
||||
u8 IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability
|
||||
* information) */
|
||||
};
|
||||
|
||||
#endif /* #ifndef WLAN_BSSDEF_H_ */
|
||||
|
||||
|
|
Loading…
Reference in a new issue