aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/pci.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-10-05 21:34:39 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-05 21:34:39 -0400
commita4b4a2b7f98a45c71a906b1126cabea6446a9905 (patch)
tree0d501e78aeb9df90172a9435d673f31bf89290eb /drivers/net/wireless/rtlwifi/pci.h
parent61b37d2f54961b336a47a501e797a05df20c3b30 (diff)
parent3f08e47291879fb047d7d4464d2beaedfea4eb63 (diff)
Merge tag 'master-2014-10-02' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says: ==================== pull request: wireless-next 2014-10-03 Please pull tihs batch of updates intended for the 3.18 stream! For the iwlwifi bits, Emmanuel says: "I have here a few things that depend on the latest mac80211's changes: RRM, TPC, Quiet Period etc... Eyal keeps improving our rate control and we have a new device ID. This last patch should probably have gone to wireless.git, but at that stage, I preferred to send it to -next and CC stable." For (most of) the Atheros bits, Kalle says: "The only new feature is testmode support from me. Ben added a new method to crash the firmware with an assert for debug purposes. As usual, we have lots of smaller fixes from Michal. Matteo fixed a Kconfig dependency with debugfs. I fixed some warnings recently added to checkpatch." For the NFC bits, Samuel says: "We've had major updates for TI and ST Microelectronics drivers, and a few NCI related changes. For TI's trf7970a driver: - Target mode support for trf7970a - Suspend/resume support for trf7970a - DT properties additions to handle different quirks - A bunch of fixes for smartphone IOP related issues For ST Microelectronics' ST21NFCA and ST21NFCB drivers: - ISO15693 support for st21nfcb - checkpatch and sparse related warning fixes - Code cleanups and a few minor fixes Finally, Marvell added ISO15693 support to the NCI stack, together with a couple of NCI fixes." For the Bluetooth bits, Johan says: "This 3.18 pull request replaces the one I did on Monday ("bluetooth-next 2014-09-22", which hasn't been pulled yet). The additions since the last request are: - SCO connection fix for devices not supporting eSCO - Cleanups regarding the SCO establishment logic - Remove unnecessary return value from logging functions - Header compression fix for 6lowpan - Cleanups to the ieee802154/mrf24j40 driver Here's a copy from previous request that this one replaces: ' Here are some more patches for 3.18. They include various fixes to the btusb HCI driver, a fix for LE SMP, as well as adding Jukka to the MAINTAINERS file for generic 6LoWPAN (as requested by Alexander Aring). I've held on to this pull request a bit since we were waiting for a SCO related fix to get sorted out first. However, since the merge window is getting closer I decided not to wait for it. If we do get the fix sorted out there'll probably be a second small pull request later this week. '" And, "Unless 3.17 gets delayed this will probably be our last -next pull request for 3.18. We've got: - New Marvell hardware supportr - Multicast support for 6lowpan - Several of 6lowpan fixes & cleanups - Fix for a (false-positive) lockdep warning in L2CAP - Minor btusb cleanup" On top of all that comes the usual sort of updates to ath5k, ath9k, ath10k, brcmfmac, mwifiex, and wil6210. This time around there are also a number of rtlwifi updates to enable some new hardware and to reconcile the in-kernel drivers with some newer releases of the Realtek vendor drivers. Also of note is some device tree work for the bcma bus. Please let me know if there are problems! ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/pci.h')
-rw-r--r--drivers/net/wireless/rtlwifi/pci.h56
1 files changed, 45 insertions, 11 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.h b/drivers/net/wireless/rtlwifi/pci.h
index 90174a814a6d..5e832306dba9 100644
--- a/drivers/net/wireless/rtlwifi/pci.h
+++ b/drivers/net/wireless/rtlwifi/pci.h
@@ -39,10 +39,11 @@
39#define RTL_PCI_RX_CMD_QUEUE 1 39#define RTL_PCI_RX_CMD_QUEUE 1
40#define RTL_PCI_MAX_RX_QUEUE 2 40#define RTL_PCI_MAX_RX_QUEUE 2
41 41
42#define RTL_PCI_MAX_RX_COUNT 64 42#define RTL_PCI_MAX_RX_COUNT 512/*64*/
43#define RTL_PCI_MAX_TX_QUEUE_COUNT 9 43#define RTL_PCI_MAX_TX_QUEUE_COUNT 9
44 44
45#define RT_TXDESC_NUM 128 45#define RT_TXDESC_NUM 128
46#define TX_DESC_NUM_92E 512
46#define RT_TXDESC_NUM_BE_QUEUE 256 47#define RT_TXDESC_NUM_BE_QUEUE 256
47 48
48#define BK_QUEUE 0 49#define BK_QUEUE 0
@@ -62,6 +63,12 @@
62 .subdevice = PCI_ANY_ID,\ 63 .subdevice = PCI_ANY_ID,\
63 .driver_data = (kernel_ulong_t)&(cfg) 64 .driver_data = (kernel_ulong_t)&(cfg)
64 65
66#define INTEL_VENDOR_ID 0x8086
67#define SIS_VENDOR_ID 0x1039
68#define ATI_VENDOR_ID 0x1002
69#define ATI_DEVICE_ID 0x7914
70#define AMD_VENDOR_ID 0x1022
71
65#define PCI_MAX_BRIDGE_NUMBER 255 72#define PCI_MAX_BRIDGE_NUMBER 255
66#define PCI_MAX_DEVICES 32 73#define PCI_MAX_DEVICES 32
67#define PCI_MAX_FUNCTION 8 74#define PCI_MAX_FUNCTION 8
@@ -69,6 +76,11 @@
69#define PCI_CONF_ADDRESS 0x0CF8 /*PCI Configuration Space Address */ 76#define PCI_CONF_ADDRESS 0x0CF8 /*PCI Configuration Space Address */
70#define PCI_CONF_DATA 0x0CFC /*PCI Configuration Space Data */ 77#define PCI_CONF_DATA 0x0CFC /*PCI Configuration Space Data */
71 78
79#define PCI_CLASS_BRIDGE_DEV 0x06
80#define PCI_SUBCLASS_BR_PCI_TO_PCI 0x04
81#define PCI_CAPABILITY_ID_PCI_EXPRESS 0x10
82#define PCI_CAP_ID_EXP 0x10
83
72#define U1DONTCARE 0xFF 84#define U1DONTCARE 0xFF
73#define U2DONTCARE 0xFFFF 85#define U2DONTCARE 0xFFFF
74#define U4DONTCARE 0xFFFFFFFF 86#define U4DONTCARE 0xFFFFFFFF
@@ -87,6 +99,7 @@
87#define RTL_PCI_700F_DID 0x700F 99#define RTL_PCI_700F_DID 0x700F
88#define RTL_PCI_701F_DID 0x701F 100#define RTL_PCI_701F_DID 0x701F
89#define RTL_PCI_DLINK_DID 0x3304 101#define RTL_PCI_DLINK_DID 0x3304
102#define RTL_PCI_8723AE_DID 0x8723 /*8723e */
90#define RTL_PCI_8192CET_DID 0x8191 /*8192ce */ 103#define RTL_PCI_8192CET_DID 0x8191 /*8192ce */
91#define RTL_PCI_8192CE_DID 0x8178 /*8192ce */ 104#define RTL_PCI_8192CE_DID 0x8178 /*8192ce */
92#define RTL_PCI_8191CE_DID 0x8177 /*8192ce */ 105#define RTL_PCI_8191CE_DID 0x8177 /*8192ce */
@@ -95,6 +108,10 @@
95#define RTL_PCI_8192DE_DID 0x8193 /*8192de */ 108#define RTL_PCI_8192DE_DID 0x8193 /*8192de */
96#define RTL_PCI_8192DE_DID2 0x002B /*92DE*/ 109#define RTL_PCI_8192DE_DID2 0x002B /*92DE*/
97#define RTL_PCI_8188EE_DID 0x8179 /*8188ee*/ 110#define RTL_PCI_8188EE_DID 0x8179 /*8188ee*/
111#define RTL_PCI_8723BE_DID 0xB723 /*8723be*/
112#define RTL_PCI_8192EE_DID 0x818B /*8192ee*/
113#define RTL_PCI_8821AE_DID 0x8821 /*8821ae*/
114#define RTL_PCI_8812AE_DID 0x8812 /*8812ae*/
98 115
99/*8192 support 16 pages of IO registers*/ 116/*8192 support 16 pages of IO registers*/
100#define RTL_MEM_MAPPED_IO_RANGE_8190PCI 0x1000 117#define RTL_MEM_MAPPED_IO_RANGE_8190PCI 0x1000
@@ -125,24 +142,34 @@ struct rtl_pci_capabilities_header {
125 u8 next; 142 u8 next;
126}; 143};
127 144
128struct rtl_rx_desc { 145/* In new TRX flow, Buffer_desc is new concept
129 u32 dword[8]; 146 * But TX wifi info == TX descriptor in old flow
147 * RX wifi info == RX descriptor in old flow
148 */
149struct rtl_tx_buffer_desc {
150#if (RTL8192EE_SEG_NUM == 2)
151 u32 dword[2*(DMA_IS_64BIT + 1)*8]; /*seg = 8*/
152#elif (RTL8192EE_SEG_NUM == 1)
153 u32 dword[2*(DMA_IS_64BIT + 1)*4]; /*seg = 4*/
154#elif (RTL8192EE_SEG_NUM == 0)
155 u32 dword[2*(DMA_IS_64BIT + 1)*2]; /*seg = 2*/
156#endif
130} __packed; 157} __packed;
131 158
132struct rtl_tx_desc { 159struct rtl_tx_desc {
133 u32 dword[16]; 160 u32 dword[16];
134} __packed; 161} __packed;
135 162
136struct rtl_tx_cmd_desc { 163struct rtl_rx_buffer_desc { /*rx buffer desc*/
137 u32 dword[16]; 164 u32 dword[2];
138} __packed; 165} __packed;
139 166
140/* In new TRX flow, Buffer_desc is new concept 167struct rtl_rx_desc { /*old: rx desc new: rx wifi info*/
141 * But TX wifi info == TX descriptor in old flow 168 u32 dword[8];
142 * RX wifi info == RX descriptor in old flow 169} __packed;
143 */ 170
144struct rtl_tx_buffer_desc { 171struct rtl_tx_cmd_desc {
145 u32 dword[8]; /*seg = 4*/ 172 u32 dword[16];
146} __packed; 173} __packed;
147 174
148struct rtl8192_tx_ring { 175struct rtl8192_tx_ring {
@@ -153,6 +180,10 @@ struct rtl8192_tx_ring {
153 struct sk_buff_head queue; 180 struct sk_buff_head queue;
154 /*add for new trx flow*/ 181 /*add for new trx flow*/
155 struct rtl_tx_buffer_desc *buffer_desc; /*tx buffer descriptor*/ 182 struct rtl_tx_buffer_desc *buffer_desc; /*tx buffer descriptor*/
183 dma_addr_t buffer_desc_dma; /*tx bufferd desc dma memory*/
184 u16 avl_desc; /* available_desc_to_write */
185 u16 cur_tx_wp; /* current_tx_write_point */
186 u16 cur_tx_rp; /* current_tx_read_point */
156}; 187};
157 188
158struct rtl8192_rx_ring { 189struct rtl8192_rx_ring {
@@ -160,6 +191,9 @@ struct rtl8192_rx_ring {
160 dma_addr_t dma; 191 dma_addr_t dma;
161 unsigned int idx; 192 unsigned int idx;
162 struct sk_buff *rx_buf[RTL_PCI_MAX_RX_COUNT]; 193 struct sk_buff *rx_buf[RTL_PCI_MAX_RX_COUNT];
194 /*add for new trx flow*/
195 struct rtl_rx_buffer_desc *buffer_desc; /*rx buffer descriptor*/
196 u16 next_rx_rp; /* next_rx_read_point */
163}; 197};
164 198
165struct rtl_pci { 199struct rtl_pci {