Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267686
b: refs/heads/master
c: 1bd7bcf
h: refs/heads/master
v: v3
  • Loading branch information
Larry Finger authored and Larry Finger committed Aug 24, 2011
1 parent 517d619 commit 6982850
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 513 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc5de47c8182f92d61d237827d739b6c52cfcd90
refs/heads/master: 1bd7bcfc633eeb821b85a90067be2bea79510d39
13 changes: 0 additions & 13 deletions trunk/drivers/staging/rtl8192e/rtl_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1387,14 +1387,6 @@ short rtl8192_init(struct net_device *dev)
priv->ops->init_adapter_variable(dev);
rtl8192_get_channel_map(dev);

#ifdef CONFIG_CFG_80211
/* channel map setting for the cfg80211 style */
{
struct r8192_priv* priv = rtllib_priv(dev);
rtllib_set_geo(priv);
}
#endif

init_hal_dm(dev);

init_timer(&priv->watch_dog_timer);
Expand Down Expand Up @@ -3093,11 +3085,6 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev,
goto fail1;
}

#ifdef CONFIG_CFG_80211
if (!rtl8192_register_wiphy_dev(dev))
goto fail1;
#endif

netif_carrier_off(dev);
netif_stop_queue(dev);

Expand Down
13 changes: 0 additions & 13 deletions trunk/drivers/staging/rtl8192e/rtl_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
#include "r8190P_def.h"
#include "r8192E_dev.h"

#ifdef CONFIG_CFG_80211
#include "rtl_regd.h"
#endif

#ifdef CONFIG_RTL_RFKILL
#include "rtl_rfkill.h"
#endif
Expand Down Expand Up @@ -660,11 +656,6 @@ typedef struct r8192_priv
void (*rf_close)(struct net_device *dev);
void (*rf_init)(struct net_device *dev);

#ifdef CONFIG_CFG_80211
struct ieee80211_rate rates[IEEE80211_NUM_BANDS][RTL_RATE_MAX];
struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
#endif

rx_desc *rx_ring[MAX_RX_QUEUE];
struct sk_buff *rx_buf[MAX_RX_QUEUE][MAX_RX_COUNT];
dma_addr_t rx_ring_dma[MAX_RX_QUEUE];
Expand Down Expand Up @@ -1144,8 +1135,4 @@ ActUpdateChannelAccessSetting(
PCHANNEL_ACCESS_SETTING ChnlAccessSetting
);

#ifdef CONFIG_CFG_80211
struct net_device *wiphy_to_net_device(struct wiphy *wiphy);
#endif

#endif
149 changes: 0 additions & 149 deletions trunk/drivers/staging/rtl8192e/rtllib.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
#include <linux/delay.h>
#include <linux/wireless.h>

#ifdef CONFIG_CFG_80211
#include <net/cfg80211.h>
#endif

#include "rtl819x_HT.h"
#include "rtl819x_BA.h"
#include "rtl819x_TS.h"
Expand Down Expand Up @@ -854,7 +850,6 @@ enum _REG_PREAMBLE_MODE{
#define WLAN_GET_SEQ_FRAG(seq) ((seq) & RTLLIB_SCTL_FRAG)
#define WLAN_GET_SEQ_SEQ(seq) (((seq) & RTLLIB_SCTL_SEQ) >> 4)

#ifndef CONFIG_CFG_80211
/* Authentication algorithms */
#define WLAN_AUTH_OPEN 0
#define WLAN_AUTH_SHARED_KEY 1
Expand Down Expand Up @@ -942,7 +937,6 @@ enum rtllib_reasoncode {
WLAN_REASON_IEEE8021X_FAILED = 23,
WLAN_REASON_CIPHER_SUITE_REJECTED = 24,
};
#endif

#define RTLLIB_STATMASK_SIGNAL (1<<0)
#define RTLLIB_STATMASK_RSSI (1<<1)
Expand Down Expand Up @@ -2106,145 +2100,6 @@ typedef struct _RT_PMKID_LIST
u16 ssid_length;
} RT_PMKID_LIST, *PRT_PMKID_LIST;

#ifdef CONFIG_CFG_80211
enum {
LIBIPW_CH_PASSIVE_ONLY = (1 << 0),
LIBIPW_CH_80211H_RULES = (1 << 1),
LIBIPW_CH_B_ONLY = (1 << 2),
LIBIPW_CH_NO_IBSS = (1 << 3),
LIBIPW_CH_UNIFORM_SPREADING = (1 << 4),
LIBIPW_CH_RADAR_DETECT = (1 << 5),
LIBIPW_CH_INVALID = (1 << 6),
};
struct rtllib_channel {
u32 freq;
u8 channel;
u8 flags;
u8 max_power;
};

#define RTLLIB_24GHZ_MIN_CHANNEL 1
#define RTLLIB_24GHZ_MAX_CHANNEL 14
#define RTLLIB_24GHZ_CHANNELS (RTLLIB_24GHZ_MAX_CHANNEL - \
RTLLIB_24GHZ_MIN_CHANNEL + 1)

struct reg_dmn_pair_mapping {
u16 regDmnEnum;
u16 reg_5ghz_ctl;
u16 reg_2ghz_ctl;
};

struct rtl_regulatory {
char alpha2[2];
u16 country_code;
u16 max_power_level;
u32 tp_scale;
u16 current_rd;
u16 current_rd_ext;
int16_t power_limit;
struct reg_dmn_pair_mapping *regpair;
};

struct ieee80211_bss {
/* Yes, this is a hack */
struct cfg80211_bss cbss;

/* don't want to look up all the time */
size_t ssid_len;
u8 ssid[IEEE80211_MAX_SSID_LEN];

u8 dtim_period;

bool wmm_used;

unsigned long last_probe_resp;

#ifdef CONFIG_MAC80211_MESH
u8 *mesh_id;
size_t mesh_id_len;
u8 *mesh_cfg;
#endif

#define IEEE80211_MAX_SUPP_RATES 32
u8 supp_rates[IEEE80211_MAX_SUPP_RATES];
size_t supp_rates_len;

/*
* During assocation, we save an ERP value from a probe response so
* that we can feed ERP info to the driver when handling the
* association completes. these fields probably won't be up-to-date
* otherwise, you probably don't want to use them.
*/
bool has_erp_value;
u8 erp_value;
};

/* Parsed Information Elements */
struct ieee802_11_elems {
u8 *ie_start;
size_t total_len;

/* pointers to IEs */
u8 *ssid;
u8 *supp_rates;
u8 *fh_params;
u8 *ds_params;
u8 *cf_params;
struct ieee80211_tim_ie *tim;
u8 *ibss_params;
u8 *challenge;
u8 *wpa;
u8 *rsn;
u8 *erp_info;
u8 *ext_supp_rates;
u8 *wmm_info;
u8 *wmm_param;
struct ieee80211_ht_cap *ht_cap_elem;
struct ieee80211_ht_info *ht_info_elem;
u8 *mesh_config;
u8 *mesh_id;
u8 *peer_link;
u8 *preq;
u8 *prep;
u8 *perr;
u8 *ch_switch_elem;
u8 *country_elem;
u8 *pwr_constr_elem;
u8 *quiet_elem; /* first quite element */
u8 *timeout_int;

/* length of them, respectively */
u8 ssid_len;
u8 supp_rates_len;
u8 fh_params_len;
u8 ds_params_len;
u8 cf_params_len;
u8 tim_len;
u8 ibss_params_len;
u8 challenge_len;
u8 wpa_len;
u8 rsn_len;
u8 erp_info_len;
u8 ext_supp_rates_len;
u8 wmm_info_len;
u8 wmm_param_len;
u8 mesh_config_len;
u8 mesh_id_len;
u8 peer_link_len;
u8 preq_len;
u8 prep_len;
u8 perr_len;
u8 ch_switch_elem_len;
u8 country_elem_len;
u8 pwr_constr_elem_len;
u8 quiet_elem_len;
u8 num_of_quiet_elem; /* can be more the one */
u8 timeout_int_len;
};

#endif


typedef struct _RT_INTEL_PROMISCUOUS_MODE_INFO {
bool bPromiscuousOn;
bool bFilterSourceStationFrame;
Expand Down Expand Up @@ -2283,10 +2138,6 @@ struct rtllib_device {
HT_EXTCHNL_OFFSET chan_offset_bk;
HT_CHANNEL_WIDTH bandwidth_bk;
u8 hwscan_sem_up;
#ifdef CONFIG_CFG_80211
struct wireless_dev wdev;
struct rtl_regulatory regulatory;
#endif
u8 CntAfterLink;

RT_OP_MODE OpMode;
Expand Down
65 changes: 0 additions & 65 deletions trunk/drivers/staging/rtl8192e/rtllib_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,6 @@

#define DRV_NAME "rtllib_92e"

#ifdef CONFIG_CFG_80211
#ifdef CONFIG_RTL_RFKILL
static inline void rtllib_rfkill_poll(struct wiphy *wiphy)
{
struct rtllib_device *rtllib = NULL;

rtllib = (struct rtllib_device *)wiphy_priv(wiphy);

rtllib = (struct rtllib_device *)netdev_priv_rsl(rtllib->dev);

if (rtllib->rtllib_rfkill_poll)
rtllib->rtllib_rfkill_poll(rtllib->dev);
}
#else
static inline void rtllib_rfkill_poll(struct wiphy *wiphy) {}
#endif
struct cfg80211_ops rtllib_config_ops = {.rfkill_poll = rtllib_rfkill_poll };
void *rtllib_wiphy_privid = &rtllib_wiphy_privid;
#endif

void _setup_timer( struct timer_list* ptimer, void* fun, unsigned long data )
{
ptimer->function = fun;
Expand Down Expand Up @@ -121,43 +101,6 @@ static inline void rtllib_networks_initialize(struct rtllib_device *ieee)
list_add_tail(&ieee->networks[i].list, &ieee->network_free_list);
}

#if defined CONFIG_CFG_80211
static bool rtllib_wdev_alloc(struct rtllib_device *ieee, int sizeof_priv)
{
int priv_size;
struct rtllib_device *rtllib = NULL;

priv_size = ALIGN(sizeof(struct rtllib_device),NETDEV_ALIGN) + sizeof_priv;

ieee->wdev.wiphy = wiphy_new(&rtllib_config_ops, priv_size);
if (!ieee->wdev.wiphy) {
RTLLIB_ERROR("Unable to allocate wiphy.\n");
goto out_err_new;
}

rtllib = (struct rtllib_device *)wiphy_priv(ieee->wdev.wiphy);
rtllib->dev = ieee->dev;

ieee->dev->ieee80211_ptr = &ieee->wdev;
ieee->wdev.iftype = NL80211_IFTYPE_STATION;

/* Fill-out wiphy structure bits we know... Not enough info
* here to call set_wiphy_dev or set MAC address or channel info
* -- have to do that in ->ndo_init... */
ieee->wdev.wiphy->privid = rtllib_wiphy_privid;

ieee->wdev.wiphy->max_scan_ssids = 1;
ieee->wdev.wiphy->max_scan_ie_len = 0;
ieee->wdev.wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);

return true;

out_err_new:
wiphy_free(ieee->wdev.wiphy);
return false;
}
#endif

struct net_device *alloc_rtllib(int sizeof_priv)
{
struct rtllib_device *ieee = NULL;
Expand All @@ -175,10 +118,6 @@ struct net_device *alloc_rtllib(int sizeof_priv)
memset(ieee, 0, sizeof(struct rtllib_device)+sizeof_priv);
ieee->dev = dev;

#ifdef CONFIG_CFG_80211
if (!rtllib_wdev_alloc(ieee, sizeof_priv))
goto failed;
#endif
err = rtllib_networks_allocate(ieee);
if (err) {
RTLLIB_ERROR("Unable to allocate beacon storage: %d\n",
Expand Down Expand Up @@ -277,10 +216,6 @@ void free_rtllib(struct net_device *dev)
}

rtllib_networks_free(ieee);
#ifdef CONFIG_CFG_80211
wiphy_unregister(ieee->wdev.wiphy);
wiphy_free(ieee->wdev.wiphy);
#endif
free_netdev(dev);
}

Expand Down
Loading

0 comments on commit 6982850

Please sign in to comment.