rt2x00: Assorted fixes and cleanups.
cover rt2x00: Assorted fixes and cleanups.
Just a random set up fixes and cleanups for rt2x00. All patches are against wireless-next-2.6.
The 3rd patch doesn't actually fix our HT40 issue for rt2800, but should be a step in the right direction.
Gertjan van Wingerde (4):
rt2x00: Remove rt2x00pci.h include from rt2800lib.
rt2x00: Enable RT30xx by default.
rt2x00: Fix HT40+/HT40- setting in rt2800.
rt2x00: Register frame length in TX entry descriptor instead of L2PAD.
drivers/net/wireless/rt2x00/Kconfig | 4 ++-- drivers/net/wireless/rt2x00/rt2400pci.c | 4 ++-- drivers/net/wireless/rt2x00/rt2500pci.c | 2 +- drivers/net/wireless/rt2x00/rt2500usb.c | 2 +- drivers/net/wireless/rt2x00/rt2800.h | 4 ++-- drivers/net/wireless/rt2x00/rt2800lib.c | 7 ++----- drivers/net/wireless/rt2x00/rt2800pci.c | 2 +- drivers/net/wireless/rt2x00/rt2800usb.c | 2 +- drivers/net/wireless/rt2x00/rt2x00queue.c | 6 ++---- drivers/net/wireless/rt2x00/rt2x00queue.h | 4 ++-- drivers/net/wireless/rt2x00/rt61pci.c | 5 +++-- drivers/net/wireless/rt2x00/rt73usb.c | 2 +- 12 files changed, 20 insertions(+), 24 deletions(-)
PATCH 1/4 rt2x00: Remove rt2x00pci.h include from rt2800lib.
PCI specific code has been remove quite some time ago.
--- drivers/net/wireless/rt2x00/rt2800lib.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/net/wireless/rt2x00/rt2800lib.c +0 -3
@@ -40,9 +40,6 @@#if defined(CONFIG_RT2X00_LIB_USB ) || defined(CONFIG_RT2X00_LIB_USB_MODULE )#include "rt2x00usb.h" #endif -#if defined(CONFIG_RT2X00_LIB_PCI ) || defined(CONFIG_RT2X00_LIB_PCI_MODULE ) -#include "rt2x00pci.h" -#endif #include "rt2800lib.h" #include "rt2800.h" #include "rt2800usb.h"
Signature · 1 line
1.7.1
PATCH 2/4 rt2x00: Enable RT30xx by default.
In reply to Gertjan van WingerdeNow that RT30xx support is at the same level as RT28xx support we can enable these devices by default.
--- drivers/net/wireless/rt2x00/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/rt2x00/Kconfig +2 -2
@@ -87,7 +87,7 @@ if RT2800PCI config RT2800PCI_RT30XX bool "rt2800pci - Include support for rt30xx (PCI/PCIe/PCMCIA) devices" - default n + default y ---help--- This adds support for rt30xx wireless chipset family to the rt2800pci driver.
@@ -156,7 +156,7 @@ if RT2800USB config RT2800USB_RT30XX bool "rt2800usb - Include support for rt30xx (USB) devices" - default n + default y ---help--- This adds support for rt30xx wireless chipset family to the rt2800usb driver.
Signature · 1 line
1.7.1
Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
Quoted 13 lines · Gertjan van Wingerde
Now that RT30xx support is at the same level as RT28xx support we can enable these devices by default.
Signed-off-by Gertjan van Wingerde <[email protected]>--- drivers/net/wireless/rt2x00/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/net/wireless/rt2x00/Kconfig +0
-0
drivers/net/wireless/rt2x00/Kconfig if RT2800PCI · line 90
Quoted 5 lines
drivers/net/wireless/rt2x00/Kconfig +1
-1@@ -87,7 +87,7 @@ if RT2800PCI config RT2800PCI_RT30XX bool "rt2800pci - Include support for rt30xx (PCI/PCIe/PCMCIA) devices" - default n + default y
I believe defaulting booleans to "y" is discouraged, especially for drivers. Most users don't have any particular hardware device.
Signature · 2 lines
Regards, Pavel Roskin
Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
Hi
Quoted 3 lines · Pavel Roskin
Quoted 2 lines · Gertjan van Wingerde
Now that RT30xx support is at the same level as RT28xx support we can enable these devices by default.
[...]
Quoted 11 lines
drivers/net/wireless/rt2x00/Kconfig if RT2800PCI · line 90
Quoted 8 lines
drivers/net/wireless/rt2x00/Kconfig +1
-1@@ -87,7 +87,7 @@ if RT2800PCI config RT2800PCI_RT30XX bool "rt2800pci - Include support for rt30xx (PCI/PCIe/PCMCIA) devices" - default n + default yI believe defaulting booleans to "y" is discouraged, especially for drivers. Most users don't have any particular hardware device.
[disclaimer, I have no access to any rt30xx USB/ PCI devices, so I'm not proposing the attached patch, as I can't evaluate the stability of rt2800pci's rt30xx support myself but merely use it for demonstration purposes]
RT2800PCI_RT30XX is not a new/ separate module, its only function is to limit the PCI ID space (to not claim PCI IDs for chipset generations not yet debugged properly) of rt2800pci.ko; this symbol isn't even used anywhere else than within the PCI table. A 100% equivalent patch would be to just drop the config option completely. I doubt that doing that would meet resistance, as it merely adds previously 'unknown' (to be supported) PCI IDs.
[However if RT2800PCI_RT30XX is going to be kept, but changed to default to 'y', I'd propose to drop the 'Support for these devices is non-functional at the moment and is intended for testers and developers" paragraph at the same time.]
Regards
Stefan Lippers-Hollmann
rt2x00: claim RT30xx PCI IDs in rt2800pci
Now that RT30xx support is at the same level as RT28xx, it can be enabled unconditionally.
drivers/net/wireless/rt2x00/Kconfig +0 -11
@@ -85,17 +85,6 @@ config RT2800PCI if RT2800PCI -config RT2800PCI_RT30XX - bool "rt2800pci - Include support for rt30xx (PCI/PCIe/PCMCIA) devices" - default n - ---help--- - This adds support for rt30xx wireless chipset family to the - rt2800pci driver. - Supported chips: RT3090, RT3091 & RT3092 - - Support for these devices is non-functional at the moment and is - intended for testers and developers. - config RT2800PCI_RT35XX bool "rt2800pci - Include support for rt35xx (PCI/PCIe/PCMCIA) devices" default n
drivers/net/wireless/rt2x00/rt2800pci.c +0 -2
@@ -1225,12 +1225,10 @@ static DEFINE_PCI_DEVICE_TABLE(rt2800pci_device_table) = { { PCI_DEVICE(0x1432, 0x7758), PCI_DEVICE_DATA(&rt2800pci_ops) }, { PCI_DEVICE(0x1432, 0x7768), PCI_DEVICE_DATA(&rt2800pci_ops) }, { PCI_DEVICE(0x1a3b, 0x1059), PCI_DEVICE_DATA(&rt2800pci_ops) }, -#ifdef CONFIG_RT2800PCI_RT30XX { PCI_DEVICE(0x1814, 0x3090), PCI_DEVICE_DATA(&rt2800pci_ops) }, { PCI_DEVICE(0x1814, 0x3091), PCI_DEVICE_DATA(&rt2800pci_ops) }, { PCI_DEVICE(0x1814, 0x3092), PCI_DEVICE_DATA(&rt2800pci_ops) }, { PCI_DEVICE(0x1462, 0x891a), PCI_DEVICE_DATA(&rt2800pci_ops) }, -#endif #ifdef CONFIG_RT2800PCI_RT35XX { PCI_DEVICE(0x1814, 0x3060), PCI_DEVICE_DATA(&rt2800pci_ops) }, { PCI_DEVICE(0x1814, 0x3062), PCI_DEVICE_DATA(&rt2800pci_ops) },
Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
Quoted 4 lines · Stefan Lippers-Hollmann
RT2800PCI_RT30XXis not a new/ separate module, its only function is to limit the PCI ID space (to not claim PCI IDs for chipset generations not yet debugged properly) of rt2800pci.ko; this symbol isn't even used anywhere else than within the PCI table.
I realize that. Still, somebody upstream can object.
Quoted 4 lines
A 100% equivalent patch would be
to just drop the config option completely. I doubt that doing that would meet resistance, as it merely adds previously 'unknown' (to be supported) PCI IDs.
That's what I would do.
Signature · 2 lines
Regards, Pavel Roskin
Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
Quoted 7 lines · Pavel Roskin
Quoted 4 lines · Stefan Lippers-Hollmann
RT2800PCI_RT30XXis not a new/ separate module, its only function is to limit the PCI ID space (to not claim PCI IDs for chipset generations not yet debugged properly) of rt2800pci.ko; this symbol isn't even used anywhere else than within the PCI table.
Quoted 9 lines
I realize that. Still, somebody upstream can object.
Quoted 4 lines
A 100% equivalent patch would be
to just drop the config option completely. I doubt that doing that would meet resistance, as it merely adds previously 'unknown' (to be supported) PCI IDs.That's what I would do.
To be honest, at the moment I would just change the default from 'n' to 'y' for one kernel cycle, and then remove the entire option in the next kernel release.
This is just to make it easier to revert back if for some reasons problems arise with the rt30xx support.
The overall goal is to get rid of all these of the RT2800PCI_yyy and RT2800USB_zzz symbols, but that can only happen if the devices denoted by these symbols are properly supported.
John, I leave it up to you, but for me my original patch should be merged, and I'll send an equivalent patch for Stefan's one for the next kernel release.
---
Gertjan.
Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
Quoted 11 lines · Gertjan van Wingerde
To be honest, at the moment I would just change the default from 'n' to 'y' for one kernel cycle, and then remove the entire option in the next kernel release.
This is just to make it easier to revert back if for some reasons problems arise with the rt30xx support.
The overall goal is to get rid of all these of theRT2800PCI_yyyandRT2800USB_zzzsymbols, but that can only happen if the devices denoted by these symbols are properly supported.John, I leave it up to you, but for me my original patch should be merged, and I'll send an equivalent patch for Stefan's one for the next kernel release.
Since the options are already inside "if RT2800PCI" and "if RT2800USB" blocks, I don't see why anyone should object to the boolean defaulting to 'y'. It's not as if you are enabling a new driver.
I think Gertjan's proposal seems reasonable -- just don't forget! :-) I would suggest a feature-removal-schedlue.txt patch, but I don't know that it is worth the trouble.
John
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
Quoted 14 lines · John W. Linville
Quoted 11 lines · Gertjan van Wingerde
To be honest, at the moment I would just change the default from 'n' to 'y' for one kernel cycle, and then remove the entire option in the next kernel release.
This is just to make it easier to revert back if for some reasons problems arise with the rt30xx support.
The overall goal is to get rid of all these of theRT2800PCI_yyyandRT2800USB_zzzsymbols, but that can only happen if the devices denoted by these symbols are properly supported.John, I leave it up to you, but for me my original patch should be merged, and I'll send an equivalent patch for Stefan's one for the next kernel release.
Quoted 8 lines
Since the options are already inside "if RT2800PCI" and "if RT2800USB" blocks, I don't see why anyone should object to the boolean defaulting to 'y'. It's not as if you are enabling a new driver.
I think Gertjan's proposal seems reasonable -- just don't forget! :-) I would suggest a feature-removal-schedlue.txt patch, but I don't know that it is worth the trouble.
Don't worry. I won't forget. I introduced these configuration items simply to be able to disable non-functional devices from the driver. Once all devices are working properly I will remove all of these Kconfig variables.
Feature-removal-schedule.txt seems like a lot of overkill, as we are not actually removing features, we are simply unconditionally enabling code.
---
Gertjan.
Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
In reply to Gertjan van WingerdeQuoted 4 lines
Now that RT30xx support is at the
same level as RT28xx support we can enable
these devices by default.
Shouldn't support for RT30xx be enabled by default for compat-wireless as well?
Walter.
Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
Quoted 7 lines · Walter Goldens
Quoted 4 lines
Now that RT30xx support is at the
same level as RT28xx support we can enable
these devices by default.Shouldn't support for RT30xx be enabled by default for compat-wireless as well?
compat-wireless will be updated automatically once wireless-next-2.6 gets merged into linux-next. Just have a bit of patience.
---
Gertjan.
PATCH 3/4 rt2x00: Fix HT40+/HT40- setting in rt2800.
In reply to Gertjan van WingerdeInspection of the Ralink vendor driver shows that the TX_BAND_CFG register and BBP register 3 are about HT40- indication, not about HT40+ indication. Inverse the meaning of these fields in the code.
--- drivers/net/wireless/rt2x00/rt2800.h | 4 ++-- drivers/net/wireless/rt2x00/rt2800lib.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/rt2x00/rt2800.h +2 -2
@@ -845,7 +845,7 @@* TX_BAND_CFG: 0x1 use upper 20MHz, 0x0 use lower 20MHz */ #define TX_BAND_CFG 0x132c -#define TX_BAND_CFG_HT40_PLUS FIELD32(0x00000001) +#define TX_BAND_CFG_HT40_MINUS FIELD32(0x00000001)#define TX_BAND_CFG_A FIELD32(0x00000002)#define TX_BAND_CFG_BG FIELD32(0x00000004)
@@ -1519,7 +1519,7 @@ struct mac_iveiv_entry {* BBP 3: RX Antenna */ #define BBP3_RX_ANTENNA FIELD8(0x18) -#define BBP3_HT40_PLUS FIELD8(0x20) +#define BBP3_HT40_MINUS FIELD8(0x20)/* * BBP 4: Bandwidth
drivers/net/wireless/rt2x00/rt2800lib.c +2 -2
@@ -867,7 +867,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, }rt2800_register_read (rt2x00dev,TX_BAND_CFG , ®); -rt2x00_set_field32 (®,TX_BAND_CFG_HT40_PLUS ,conf_is_ht40_plus (conf)); +rt2x00_set_field32 (®,TX_BAND_CFG_HT40_MINUS ,conf_is_ht40_minus (conf));rt2x00_set_field32 (®,TX_BAND_CFG_A , rf->channel >14 );rt2x00_set_field32 (®,TX_BAND_CFG_BG , rf->channel <=14 );rt2800_register_write (rt2x00dev,TX_BAND_CFG , reg);
@@ -900,7 +900,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,rt2800_bbp_write (rt2x00dev,4 , bbp);rt2800_bbp_read (rt2x00dev,3 , &bbp); -rt2x00_set_field8 (&bbp,BBP3_HT40_PLUS ,conf_is_ht40_plus (conf)); +rt2x00_set_field8 (&bbp,BBP3_HT40_MINUS ,conf_is_ht40_minus (conf));rt2800_bbp_write (rt2x00dev,3 , bbp);if (rt2x00_rt_rev (rt2x00dev,RT2860 ,REV_RT2860C )) {
Signature · 1 line
1.7.1
Re: [rt2x00-users] [PATCH 3/4] rt2x00: Fix HT40+/HT40- setting in rt2800.
Quoted 5 lines · Gertjan van Wingerde
Inspection of the Ralink vendor driver shows that the
TX_BAND_CFGregister and BBP register 3 are about HT40- indication, not about HT40+ indication. Inverse the meaning of these fields in the code.Signed-off-by Gertjan van Wingerde<[email protected]>
Quoted 49 lines
--- drivers/net/wireless/rt2x00/rt2800.h | 4 ++-- drivers/net/wireless/rt2x00/rt2800lib.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)drivers/net/wireless/rt2x00/rt2800.h +2
-2@@ -845,7 +845,7 @@* TX_BAND_CFG: 0x1 use upper 20MHz, 0x0 use lower 20MHz */ #define TX_BAND_CFG 0x132c -#define TX_BAND_CFG_HT40_PLUS FIELD32(0x00000001) +#define TX_BAND_CFG_HT40_MINUS FIELD32(0x00000001)#define TX_BAND_CFG_A FIELD32(0x00000002)#define TX_BAND_CFG_BG FIELD32(0x00000004)@@ -1519,7 +1519,7 @@ struct mac_iveiv_entry {* BBP 3: RX Antenna */ #define BBP3_RX_ANTENNA FIELD8(0x18) -#define BBP3_HT40_PLUS FIELD8(0x20) +#define BBP3_HT40_MINUS FIELD8(0x20)/* * BBP 4: Bandwidth drivers/net/wireless/rt2x00/rt2800lib.c +2
-2@@ -867,7 +867,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, }rt2800_register_read (rt2x00dev,TX_BAND_CFG ,®); -rt2x00_set_field32 (®,TX_BAND_CFG_HT40_PLUS ,conf_is_ht40_plus (conf)); +rt2x00_set_field32 (®,TX_BAND_CFG_HT40_MINUS ,conf_is_ht40_minus (conf));rt2x00_set_field32 (®,TX_BAND_CFG_A , rf->channel>14 );rt2x00_set_field32 (®,TX_BAND_CFG_BG , rf->channel<=14 );rt2800_register_write (rt2x00dev,TX_BAND_CFG , reg);@@ -900,7 +900,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,rt2800_bbp_write (rt2x00dev,4 , bbp);rt2800_bbp_read (rt2x00dev,3 ,&bbp); -rt2x00_set_field8 (&bbp,BBP3_HT40_PLUS ,conf_is_ht40_plus (conf)); +rt2x00_set_field8 (&bbp,BBP3_HT40_MINUS ,conf_is_ht40_minus (conf));rt2800_bbp_write (rt2x00dev,3 , bbp);if (rt2x00_rt_rev (rt2x00dev,RT2860 ,REV_RT2860C )) {
PATCH 4/4 rt2x00: Register frame length in TX entry descriptor instead of L2PAD.
In reply to Gertjan van WingerdeAnd use it consistently in the chipset drivers.
Preparation for further clean ups.
--- drivers/net/wireless/rt2x00/rt2400pci.c | 4 ++-- drivers/net/wireless/rt2x00/rt2500pci.c | 2 +- drivers/net/wireless/rt2x00/rt2500usb.c | 2 +- drivers/net/wireless/rt2x00/rt2800pci.c | 2 +- drivers/net/wireless/rt2x00/rt2800usb.c | 2 +- drivers/net/wireless/rt2x00/rt2x00queue.c | 6 ++---- drivers/net/wireless/rt2x00/rt2x00queue.h | 4 ++-- drivers/net/wireless/rt2x00/rt61pci.c | 5 +++-- drivers/net/wireless/rt2x00/rt73usb.c | 2 +- 9 files changed, 14 insertions(+), 15 deletions(-)
drivers/net/wireless/rt2x00/rt2400pci.c +2 -2
@@ -1017,8 +1017,8 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,rt2x00_desc_write (entry_priv->desc,1 , word);rt2x00_desc_read (txd,2 , &word); -rt2x00_set_field32 (&word,TXD_W2_BUFFER_LENGTH , skb->len); -rt2x00_set_field32 (&word,TXD_W2_DATABYTE_COUNT , skb->len); +rt2x00_set_field32 (&word,TXD_W2_BUFFER_LENGTH , txdesc->length); +rt2x00_set_field32 (&word,TXD_W2_DATABYTE_COUNT , txdesc->length);rt2x00_desc_write (txd,2 , word);rt2x00_desc_read (txd,3 , &word);
drivers/net/wireless/rt2x00/rt2500pci.c +1 -1
@@ -1208,7 +1208,7 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,rt2x00_set_field32 (&word,TXD_W0_IFS , txdesc->ifs);rt2x00_set_field32 (&word,TXD_W0_RETRY_MODE ,test_bit (ENTRY_TXD_RETRY_MODE , &txdesc->flags)); -rt2x00_set_field32 (&word,TXD_W0_DATABYTE_COUNT , skb->len); +rt2x00_set_field32 (&word,TXD_W0_DATABYTE_COUNT , txdesc->length);rt2x00_set_field32 (&word,TXD_W0_CIPHER_ALG ,CIPHER_NONE );rt2x00_desc_write (txd,0 , word); }
drivers/net/wireless/rt2x00/rt2500usb.c +1 -1
@@ -1071,7 +1071,7 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,rt2x00_set_field32 (&word,TXD_W0_NEW_SEQ ,test_bit (ENTRY_TXD_FIRST_FRAGMENT , &txdesc->flags));rt2x00_set_field32 (&word,TXD_W0_IFS , txdesc->ifs); -rt2x00_set_field32 (&word,TXD_W0_DATABYTE_COUNT , skb->len); +rt2x00_set_field32 (&word,TXD_W0_DATABYTE_COUNT , txdesc->length);rt2x00_set_field32 (&word,TXD_W0_CIPHER , !!txdesc->cipher);rt2x00_set_field32 (&word,TXD_W0_KEY_ID , txdesc->key_idx);rt2x00_desc_write (txd,0 , word);
drivers/net/wireless/rt2x00/rt2800pci.c +1 -1
@@ -663,7 +663,7 @@ static int rt2800pci_write_tx_data(struct queue_entry* entry,test_bit (ENTRY_TXD_ENCRYPT , &txdesc->flags) ? txdesc->key_idx : 0xff);rt2x00_set_field32 (&word,TXWI_W1_MPDU_TOTAL_BYTE_COUNT , - skb->len - txdesc->l2pad); + txdesc->length);rt2x00_set_field32 (&word,TXWI_W1_PACKETID , skbdesc->entry->queue->qid +1 );rt2x00_desc_write (txwi,1 , word);
drivers/net/wireless/rt2x00/rt2800usb.c +1 -1
@@ -437,7 +437,7 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,test_bit (ENTRY_TXD_ENCRYPT , &txdesc->flags) ? txdesc->key_idx : 0xff);rt2x00_set_field32 (&word,TXWI_W1_MPDU_TOTAL_BYTE_COUNT , - skb->len - txdesc->l2pad); + txdesc->length);rt2x00_set_field32 (&word,TXWI_W1_PACKETID , skbdesc->entry->queue->qid +1 );rt2x00_desc_write (txwi,1 , word);
drivers/net/wireless/rt2x00/rt2x00queue.c +2 -4
@@ -333,12 +333,10 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, txdesc->aifs = entry->queue->aifs;/* -* Header and alignment information. +* Header and frame information. */ + txdesc->length = entry->skb->len; txdesc->header_length =ieee80211_get_hdrlen_from_skb (entry->skb); -if (test_bit (DRIVER_REQUIRE_L2PAD , &rt2x00dev->flags) && - (entry->skb->len > txdesc->header_length)) - txdesc->l2pad =L2PAD_SIZE (txdesc->header_length);/* * Check whether this frame is to be acked.
drivers/net/wireless/rt2x00/rt2x00queue.h +2 -2
@@ -285,8 +285,8 @@ enum txentry_desc_flags {* * @flags: Descriptor flags (See &enum queue_entry_flags). * @queue: Queue identification (See &enum data_queue_qid). +* @length: Length of the entire frame. * @header_length: Length of 802.11 header. -* @l2pad: Amount of padding to align 802.11 payload to 4-byte boundrary. * @length_high: PLCP length high word. * @length_low: PLCP length low word. * @signal: PLCP signal.
@@ -311,8 +311,8 @@ struct txentry_desc {enum data_queue_qid queue; +u16 length;u16 header_length; -u16 l2pad;u16 length_high;u16 length_low;
drivers/net/wireless/rt2x00/rt61pci.c +3 -2
@@ -1808,7 +1808,8 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,if (skbdesc->desc_len >TXINFO_SIZE ) {rt2x00_desc_read (txd,11 , &word); -rt2x00_set_field32 (&word,TXD_W11_BUFFER_LENGTH0 , skb->len); +rt2x00_set_field32 (&word,TXD_W11_BUFFER_LENGTH0 , + txdesc->length);rt2x00_desc_write (txd,11 , word); }
@@ -1831,7 +1832,7 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,rt2x00_set_field32 (&word,TXD_W0_KEY_TABLE ,test_bit (ENTRY_TXD_ENCRYPT_PAIRWISE , &txdesc->flags));rt2x00_set_field32 (&word,TXD_W0_KEY_INDEX , txdesc->key_idx); -rt2x00_set_field32 (&word,TXD_W0_DATABYTE_COUNT , skb->len); +rt2x00_set_field32 (&word,TXD_W0_DATABYTE_COUNT , txdesc->length);rt2x00_set_field32 (&word,TXD_W0_BURST ,test_bit (ENTRY_TXD_BURST , &txdesc->flags));rt2x00_set_field32 (&word,TXD_W0_CIPHER_ALG , txdesc->cipher);
drivers/net/wireless/rt2x00/rt73usb.c +1 -1
@@ -1494,7 +1494,7 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,rt2x00_set_field32 (&word,TXD_W0_KEY_TABLE ,test_bit (ENTRY_TXD_ENCRYPT_PAIRWISE , &txdesc->flags));rt2x00_set_field32 (&word,TXD_W0_KEY_INDEX , txdesc->key_idx); -rt2x00_set_field32 (&word,TXD_W0_DATABYTE_COUNT , skb->len); +rt2x00_set_field32 (&word,TXD_W0_DATABYTE_COUNT , txdesc->length);rt2x00_set_field32 (&word,TXD_W0_BURST2 ,test_bit (ENTRY_TXD_BURST , &txdesc->flags));rt2x00_set_field32 (&word,TXD_W0_CIPHER_ALG , txdesc->cipher);
Signature · 1 line
1.7.1