mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 09:41:44 +00:00
rtlwifi: Change base routines for addition of rtl8192se and rtl8192de
Change base routines for addition of RTL8192SE and RTL8192DE code. Additional files are modified to allow compilation. Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
3dad618b7b
commit
acd48572c3
File diff suppressed because it is too large
Load Diff
@ -24,13 +24,26 @@
|
||||
* Hsinchu 300, Taiwan.
|
||||
*
|
||||
* Larry Finger <Larry.Finger@lwfinger.net>
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __RTL_BASE_H__
|
||||
#define __RTL_BASE_H__
|
||||
|
||||
enum ap_peer {
|
||||
PEER_UNKNOWN = 0,
|
||||
PEER_RTL = 1,
|
||||
PEER_RTL_92SE = 2,
|
||||
PEER_BROAD = 3,
|
||||
PEER_RAL = 4,
|
||||
PEER_ATH = 5,
|
||||
PEER_CISCO = 6,
|
||||
PEER_MARV = 7,
|
||||
PEER_AIRGO = 9,
|
||||
PEER_MAX = 10,
|
||||
} ;
|
||||
|
||||
#define RTL_DUMMY_OFFSET 0
|
||||
#define RTL_RX_DESC_SIZE 24
|
||||
#define RTL_DUMMY_UNIT 8
|
||||
#define RTL_TX_DUMMY_SIZE (RTL_DUMMY_OFFSET * RTL_DUMMY_UNIT)
|
||||
#define RTL_TX_DESC_SIZE 32
|
||||
@ -53,6 +66,14 @@
|
||||
#define FRAME_OFFSET_SEQUENCE 22
|
||||
#define FRAME_OFFSET_ADDRESS4 24
|
||||
|
||||
#define SET_80211_HDR_FRAME_CONTROL(_hdr, _val) \
|
||||
WRITEEF2BYTE(_hdr, _val)
|
||||
#define SET_80211_HDR_TYPE_AND_SUBTYPE(_hdr, _val) \
|
||||
WRITEEF1BYTE(_hdr, _val)
|
||||
#define SET_80211_HDR_PWR_MGNT(_hdr, _val) \
|
||||
SET_BITS_TO_LE_2BYTE(_hdr, 12, 1, _val)
|
||||
#define SET_80211_HDR_TO_DS(_hdr, _val) \
|
||||
SET_BITS_TO_LE_2BYTE(_hdr, 8, 1, _val)
|
||||
|
||||
#define SET_80211_PS_POLL_AID(_hdr, _val) \
|
||||
(*(u16 *)((u8 *)(_hdr) + 2) = le16_to_cpu(_val))
|
||||
@ -64,11 +85,27 @@
|
||||
#define SET_80211_HDR_DURATION(_hdr, _val) \
|
||||
(*(u16 *)((u8 *)(_hdr) + FRAME_OFFSET_DURATION) = le16_to_cpu(_val))
|
||||
#define SET_80211_HDR_ADDRESS1(_hdr, _val) \
|
||||
memcpy((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS1, (u8*)(_val), ETH_ALEN)
|
||||
CP_MACADDR((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS1, (u8 *)(_val))
|
||||
#define SET_80211_HDR_ADDRESS2(_hdr, _val) \
|
||||
memcpy((u8 *)(_hdr) + FRAME_OFFSET_ADDRESS2, (u8 *)(_val), ETH_ALEN)
|
||||
CP_MACADDR((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS2, (u8 *)(_val))
|
||||
#define SET_80211_HDR_ADDRESS3(_hdr, _val) \
|
||||
memcpy((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS3, (u8 *)(_val), ETH_ALEN)
|
||||
CP_MACADDR((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS3, (u8 *)(_val))
|
||||
#define SET_80211_HDR_FRAGMENT_SEQUENCE(_hdr, _val) \
|
||||
WRITEEF2BYTE((u8 *)(_hdr)+FRAME_OFFSET_SEQUENCE, _val)
|
||||
|
||||
#define SET_BEACON_PROBE_RSP_TIME_STAMP_LOW(__phdr, __val) \
|
||||
WRITEEF4BYTE(((u8 *)(__phdr)) + 24, __val)
|
||||
#define SET_BEACON_PROBE_RSP_TIME_STAMP_HIGH(__phdr, __val) \
|
||||
WRITEEF4BYTE(((u8 *)(__phdr)) + 28, __val)
|
||||
#define SET_BEACON_PROBE_RSP_BEACON_INTERVAL(__phdr, __val) \
|
||||
WRITEEF2BYTE(((u8 *)(__phdr)) + 32, __val)
|
||||
#define GET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr) \
|
||||
READEF2BYTE(((u8 *)(__phdr)) + 34)
|
||||
#define SET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr, __val) \
|
||||
WRITEEF2BYTE(((u8 *)(__phdr)) + 34, __val)
|
||||
#define MASK_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr, __val) \
|
||||
SET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr, \
|
||||
(GET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr) & (~(__val))))
|
||||
|
||||
int rtl_init_core(struct ieee80211_hw *hw);
|
||||
void rtl_deinit_core(struct ieee80211_hw *hw);
|
||||
@ -80,18 +117,27 @@ void rtl_watch_dog_timer_callback(unsigned long data);
|
||||
void rtl_deinit_deferred_work(struct ieee80211_hw *hw);
|
||||
|
||||
bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx);
|
||||
bool rtl_tx_mgmt_proc(struct ieee80211_hw *hw, struct sk_buff *skb);
|
||||
u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx);
|
||||
|
||||
void rtl_watch_dog_timer_callback(unsigned long data);
|
||||
int rtl_tx_agg_start(struct ieee80211_hw *hw, const u8 *ra,
|
||||
int rtl_tx_agg_start(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
|
||||
u16 tid, u16 *ssn);
|
||||
int rtl_tx_agg_stop(struct ieee80211_hw *hw, const u8 *ra, u16 tid);
|
||||
int rtl_tx_agg_stop(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
|
||||
u16 tid);
|
||||
int rtl_tx_agg_oper(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
|
||||
u16 tid);
|
||||
void rtl_watchdog_wq_callback(void *data);
|
||||
|
||||
void rtl_get_tcb_desc(struct ieee80211_hw *hw,
|
||||
struct ieee80211_tx_info *info,
|
||||
struct ieee80211_sta *sta,
|
||||
struct sk_buff *skb, struct rtl_tcb_desc *tcb_desc);
|
||||
|
||||
int rtl_send_smps_action(struct ieee80211_hw *hw,
|
||||
struct ieee80211_sta *sta, u8 *da, u8 *bssid,
|
||||
enum ieee80211_smps_mode smps);
|
||||
u8 *rtl_find_ie(u8 *data, unsigned int len, u8 ie);
|
||||
void rtl_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len);
|
||||
u8 rtl_tid_to_ac(struct ieee80211_hw *hw, u8 tid);
|
||||
extern struct attribute_group rtl_attribute_group;
|
||||
#endif
|
||||
|
@ -1242,8 +1242,6 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
u8 own;
|
||||
u8 temp_one = 1;
|
||||
|
||||
if (ieee80211_is_mgmt(fc))
|
||||
rtl_tx_mgmt_proc(hw, skb);
|
||||
rtl_action_proc(hw, skb, true);
|
||||
|
||||
queue_index = skb_get_queue_mapping(skb);
|
||||
|
@ -416,6 +416,14 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode)
|
||||
}
|
||||
}
|
||||
|
||||
void rtl_swlps_rfon_wq_callback(void *data)
|
||||
{
|
||||
}
|
||||
|
||||
void rtl_swlps_wq_callback(void *data)
|
||||
{
|
||||
}
|
||||
|
||||
/*Enter the leisure power save mode.*/
|
||||
void rtl_lps_enter(struct ieee80211_hw *hw)
|
||||
{
|
||||
|
@ -40,4 +40,11 @@ void rtl_ips_nic_on(struct ieee80211_hw *hw);
|
||||
void rtl_ips_nic_off_wq_callback(void *data);
|
||||
void rtl_lps_enter(struct ieee80211_hw *hw);
|
||||
void rtl_lps_leave(struct ieee80211_hw *hw);
|
||||
|
||||
void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len);
|
||||
void rtl_swlps_wq_callback(void *data);
|
||||
void rtl_swlps_rfon_wq_callback(void *data);
|
||||
void rtl_swlps_rf_awake(struct ieee80211_hw *hw);
|
||||
void rtl_swlps_rf_sleep(struct ieee80211_hw *hw);
|
||||
|
||||
#endif
|
||||
|
@ -754,7 +754,7 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
|
||||
|
||||
seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
|
||||
|
||||
rtl_get_tcb_desc(hw, info, skb, &tcb_desc);
|
||||
rtl_get_tcb_desc(hw, info, sta, skb, &tcb_desc);
|
||||
|
||||
CLEAR_PCI_TX_DESC_CONTENT(pdesc, sizeof(struct tx_desc_92c));
|
||||
|
||||
|
@ -517,7 +517,7 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
|
||||
u8 *txdesc;
|
||||
|
||||
seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
|
||||
rtl_get_tcb_desc(hw, info, skb, &tcb_desc);
|
||||
rtl_get_tcb_desc(hw, info, sta, skb, &tcb_desc);
|
||||
txdesc = (u8 *)skb_push(skb, RTL_TX_HEADER_SIZE);
|
||||
memset(txdesc, 0, RTL_TX_HEADER_SIZE);
|
||||
SET_TX_DESC_PKT_SIZE(txdesc, pktlen);
|
||||
|
@ -860,8 +860,6 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
|
||||
u8 tid = 0;
|
||||
u16 seq_number = 0;
|
||||
|
||||
if (ieee80211_is_mgmt(fc))
|
||||
rtl_tx_mgmt_proc(hw, skb);
|
||||
rtl_action_proc(hw, skb, true);
|
||||
if (is_multicast_ether_addr(pda_addr))
|
||||
rtlpriv->stats.txbytesmulticast += skb->len;
|
||||
|
@ -31,6 +31,8 @@
|
||||
#include <linux/usb.h>
|
||||
#include <linux/skbuff.h>
|
||||
|
||||
#define RTL_RX_DESC_SIZE 24
|
||||
|
||||
#define RTL_USB_DEVICE(vend, prod, cfg) \
|
||||
.match_flags = USB_DEVICE_ID_MATCH_DEVICE, \
|
||||
.idVendor = (vend), \
|
||||
|
@ -1370,10 +1370,11 @@ struct rtl_hal_ops {
|
||||
u32 add_msr, u32 rm_msr);
|
||||
void (*get_hw_reg) (struct ieee80211_hw *hw, u8 variable, u8 *val);
|
||||
void (*set_hw_reg) (struct ieee80211_hw *hw, u8 variable, u8 *val);
|
||||
#if 0 /* temporary */
|
||||
#if 1 /* temporary */
|
||||
void (*update_rate_tbl) (struct ieee80211_hw *hw,
|
||||
struct ieee80211_sta *sta, u8 rssi_level);
|
||||
#else
|
||||
#endif
|
||||
#if 1 /* temporary */
|
||||
void (*update_rate_table) (struct ieee80211_hw *hw);
|
||||
#endif
|
||||
void (*update_rate_mask) (struct ieee80211_hw *hw, u8 rssi_level);
|
||||
|
Loading…
Reference in New Issue
Block a user