aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtllib.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib.h')
-rw-r--r--drivers/staging/rtl8192e/rtllib.h87
1 files changed, 15 insertions, 72 deletions
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 6e665e866f1f..e3ce4431d460 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -38,6 +38,7 @@
#include <linux/netdevice.h>
#include <linux/if_arp.h> /* ARPHRD_ETHER */
+#include <net/cfg80211.h>
#include <net/lib80211.h>
#define MAX_PRECMD_CNT 16
@@ -139,7 +140,7 @@ struct cb_desc {
u8 rata_index;
u8 queue_index;
u16 txbuf_size;
- u8 RATRIndex;
+ u8 ratr_index;
u8 bAMSDU:1;
u8 bFromAggrQ:1;
u8 reserved6:6;
@@ -308,9 +309,7 @@ enum rt_op_mode {
};
#define aSifsTime \
- (((priv->rtllib->current_network.mode == IEEE_A) \
- || (priv->rtllib->current_network.mode == IEEE_N_24G) \
- || (priv->rtllib->current_network.mode == IEEE_N_5G)) ? 16 : 10)
+ ((priv->rtllib->current_network.mode == WIRELESS_MODE_N_24G) ? 16 : 10)
#define MGMT_QUEUE_NUM 5
@@ -421,17 +420,6 @@ enum init_gain_op_type {
IG_Max
};
-enum led_ctl_mode {
- LED_CTL_POWER_ON = 1,
- LED_CTL_LINK = 2,
- LED_CTL_NO_LINK = 3,
- LED_CTL_TX = 4,
- LED_CTL_RX = 5,
- LED_CTL_SITE_SURVEY = 6,
- LED_CTL_POWER_OFF = 7,
- LED_CTL_START_TO_LINK = 8,
-};
-
enum wireless_mode {
WIRELESS_MODE_UNKNOWN = 0x00,
WIRELESS_MODE_A = 0x01,
@@ -439,7 +427,6 @@ enum wireless_mode {
WIRELESS_MODE_G = 0x04,
WIRELESS_MODE_AUTO = 0x08,
WIRELESS_MODE_N_24G = 0x10,
- WIRELESS_MODE_N_5G = 0x20
};
#ifndef ETH_P_PAE
@@ -499,9 +486,6 @@ enum _REG_PREAMBLE_MODE {
#define RTLLIB_CCK_MODULATION (1<<0)
#define RTLLIB_OFDM_MODULATION (1<<1)
-#define RTLLIB_24GHZ_BAND (1<<0)
-#define RTLLIB_52GHZ_BAND (1<<1)
-
#define RTLLIB_CCK_RATE_LEN 4
#define RTLLIB_CCK_RATE_1MB 0x02
#define RTLLIB_CCK_RATE_2MB 0x04
@@ -548,10 +532,8 @@ struct rtllib_rx_stats {
u8 signal;
u8 noise;
u16 rate; /* in 100 kbps */
- u8 received_channel;
u8 control;
u8 mask;
- u8 freq;
u16 len;
u64 tsf;
u32 beacon_time;
@@ -1136,10 +1118,9 @@ struct rtllib_network {
struct list_head list;
};
-enum rtllib_state {
-
+enum rtl_link_state {
/* the card is not linked at all */
- RTLLIB_NOLINK = 0,
+ MAC80211_NOLINK = 0,
/* RTLLIB_ASSOCIATING* are for BSS client mode
* the driver shall not perform RX filtering unless
@@ -1164,14 +1145,14 @@ enum rtllib_state {
/* the link is ok. the card associated to a BSS or linked
* to a ibss cell or acting as an AP and creating the bss
*/
- RTLLIB_LINKED,
+ MAC80211_LINKED,
/* same as LINKED, but the driver shall apply RX filter
* rules as we are in NO_LINK mode. As the card is still
* logically linked, but it is doing a syncro site survey
* then it will be back to LINKED state.
*/
- RTLLIB_LINKED_SCANNING,
+ MAC80211_LINKED_SCANNING,
};
#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
@@ -1298,7 +1279,6 @@ enum fw_cmd_io_type {
#define RT_MAX_LD_SLOT_NUM 10
struct rt_link_detect {
-
u32 NumRecvBcnInPeriod;
u32 NumRecvDataInPeriod;
@@ -1316,7 +1296,6 @@ struct rt_link_detect {
};
struct sw_cam_table {
-
u8 macaddr[ETH_ALEN];
bool bused;
u8 key_buf[16];
@@ -1509,7 +1488,7 @@ struct rtllib_device {
*/
struct rtllib_network current_network;
- enum rtllib_state state;
+ enum rtl_link_state link_state;
int short_slot;
int mode; /* A, B, G */
@@ -1651,17 +1630,6 @@ struct rtllib_device {
};
/* Callback functions */
- void (*set_security)(struct net_device *dev,
- struct rtllib_security *sec);
-
- /* Used to TX data frame by using txb structs.
- * this is not used if in the softmac_features
- * is set the flag IEEE_SOFTMAC_TX_QUEUE
- */
- int (*hard_start_xmit)(struct rtllib_txb *txb,
- struct net_device *dev);
-
- int (*reset_port)(struct net_device *dev);
/* Softmac-generated frames (management) are TXed via this
* callback if the flag IEEE_SOFTMAC_SINGLE_QUEUE is
@@ -1682,24 +1650,12 @@ struct rtllib_device {
void (*softmac_data_hard_start_xmit)(struct sk_buff *skb,
struct net_device *dev, int rate);
- /* stops the HW queue for DATA frames. Useful to avoid
- * waste time to TX data frame when we are reassociating
- * This function can sleep.
- */
- void (*data_hard_stop)(struct net_device *dev);
-
- /* OK this is complementing to data_poll_hard_stop */
- void (*data_hard_resume)(struct net_device *dev);
-
/* ask to the driver to retune the radio.
* This function can sleep. the driver should ensure
* the radio has been switched before return.
*/
void (*set_chan)(struct net_device *dev, short ch);
- void (*rtllib_start_hw_scan)(struct net_device *dev);
- void (*rtllib_stop_hw_scan)(struct net_device *dev);
-
/* indicate the driver that the link state is changed
* for example it may indicate the card is associated now.
* Driver might be interested in this to apply RX filter
@@ -1729,22 +1685,16 @@ struct rtllib_device {
/* check whether Tx hw resource available */
short (*check_nic_enough_desc)(struct net_device *dev, int queue_index);
- void (*SetBWModeHandler)(struct net_device *dev,
- enum ht_channel_width bandwidth,
- enum ht_extchnl_offset Offset);
+ void (*set_bw_mode_handler)(struct net_device *dev,
+ enum ht_channel_width bandwidth,
+ enum ht_extchnl_offset Offset);
bool (*GetNmodeSupportBySecCfg)(struct net_device *dev);
- void (*SetWirelessMode)(struct net_device *dev, u8 wireless_mode);
+ void (*set_wireless_mode)(struct net_device *dev, u8 wireless_mode);
bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device *dev);
u8 (*rtllib_ap_sec_type)(struct rtllib_device *ieee);
- void (*InitialGainHandler)(struct net_device *dev, u8 Operation);
- bool (*SetFwCmdHandler)(struct net_device *dev,
- enum fw_cmd_io_type FwCmdIO);
- void (*UpdateBeaconInterruptHandler)(struct net_device *dev,
- bool start);
+ void (*init_gain_handler)(struct net_device *dev, u8 Operation);
void (*ScanOperationBackupHandler)(struct net_device *dev,
u8 Operation);
- void (*LedControlHandler)(struct net_device *dev,
- enum led_ctl_mode LedAction);
void (*SetHwRegHandler)(struct net_device *dev, u8 variable, u8 *val);
void (*AllowAllDestAddrHandler)(struct net_device *dev,
@@ -1752,7 +1702,7 @@ struct rtllib_device {
void (*rtllib_ips_leave_wq)(struct net_device *dev);
void (*rtllib_ips_leave)(struct net_device *dev);
- void (*LeisurePSLeave)(struct net_device *dev);
+ void (*leisure_ps_leave)(struct net_device *dev);
/* This must be the last item so that it points to the data
* allocated beyond this structure by alloc_rtllib
@@ -1760,12 +1710,7 @@ struct rtllib_device {
u8 priv[];
};
-#define IEEE_A (1<<0)
-#define IEEE_B (1<<1)
-#define IEEE_G (1<<2)
-#define IEEE_N_24G (1<<4)
-#define IEEE_N_5G (1<<5)
-#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G)
+#define IEEE_MODE_MASK (WIRELESS_MODE_B | WIRELESS_MODE_G)
/* Generate a 802.11 header */
@@ -2080,8 +2025,6 @@ void TsStartAddBaProcess(struct rtllib_device *ieee,
void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr);
void RemoveAllTS(struct rtllib_device *ieee);
-extern const long rtllib_wlan_frequencies[];
-
static inline const char *escape_essid(const char *essid, u8 essid_len)
{
static char escaped[IW_ESSID_MAX_SIZE * 2 + 1];