aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-11-27 15:47:56 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:05:05 -0500
commit49da2605e27935835861a118df0671b5f004bfac (patch)
treec90466b2d4585f9458d62d85191c553885182faf /drivers/net/wireless/rt2x00
parent2360157c413b06fe2958a051daeab7bac68f6588 (diff)
rt2x00: Extend PLCP descriptor definition for rt2400pci
Extend word field definitions for the PLCP words in the TX descriptor to contain the BBP fields as well. This will remove rt2400pci_write_tx_desc() from the checkstack script. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c40
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.h20
2 files changed, 27 insertions, 33 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 6d3cdaf5903e..c9a234fc3cd1 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1019,30 +1019,6 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1019 struct ieee80211_tx_control *control) 1019 struct ieee80211_tx_control *control)
1020{ 1020{
1021 u32 word; 1021 u32 word;
1022 u32 signal = 0;
1023 u32 service = 0;
1024 u32 length_high = 0;
1025 u32 length_low = 0;
1026
1027 /*
1028 * The PLCP values should be treated as if they
1029 * were BBP values.
1030 */
1031 rt2x00_set_field32(&signal, BBPCSR_VALUE, desc->signal);
1032 rt2x00_set_field32(&signal, BBPCSR_REGNUM, 5);
1033 rt2x00_set_field32(&signal, BBPCSR_BUSY, 1);
1034
1035 rt2x00_set_field32(&service, BBPCSR_VALUE, desc->service);
1036 rt2x00_set_field32(&service, BBPCSR_REGNUM, 6);
1037 rt2x00_set_field32(&service, BBPCSR_BUSY, 1);
1038
1039 rt2x00_set_field32(&length_high, BBPCSR_VALUE, desc->length_high);
1040 rt2x00_set_field32(&length_high, BBPCSR_REGNUM, 7);
1041 rt2x00_set_field32(&length_high, BBPCSR_BUSY, 1);
1042
1043 rt2x00_set_field32(&length_low, BBPCSR_VALUE, desc->length_low);
1044 rt2x00_set_field32(&length_low, BBPCSR_REGNUM, 8);
1045 rt2x00_set_field32(&length_low, BBPCSR_BUSY, 1);
1046 1022
1047 /* 1023 /*
1048 * Start writing the descriptor words. 1024 * Start writing the descriptor words.
@@ -1052,13 +1028,21 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1052 rt2x00_desc_write(txd, 2, word); 1028 rt2x00_desc_write(txd, 2, word);
1053 1029
1054 rt2x00_desc_read(txd, 3, &word); 1030 rt2x00_desc_read(txd, 3, &word);
1055 rt2x00_set_field32(&word, TXD_W3_PLCP_SIGNAL, signal); 1031 rt2x00_set_field32(&word, TXD_W3_PLCP_SIGNAL, desc->signal);
1056 rt2x00_set_field32(&word, TXD_W3_PLCP_SERVICE, service); 1032 rt2x00_set_field32(&word, TXD_W3_PLCP_SIGNAL_REGNUM, 5);
1033 rt2x00_set_field32(&word, TXD_W3_PLCP_SIGNAL_BUSY, 1);
1034 rt2x00_set_field32(&word, TXD_W3_PLCP_SERVICE, desc->service);
1035 rt2x00_set_field32(&word, TXD_W3_PLCP_SERVICE_REGNUM, 6);
1036 rt2x00_set_field32(&word, TXD_W3_PLCP_SERVICE_BUSY, 1);
1057 rt2x00_desc_write(txd, 3, word); 1037 rt2x00_desc_write(txd, 3, word);
1058 1038
1059 rt2x00_desc_read(txd, 4, &word); 1039 rt2x00_desc_read(txd, 4, &word);
1060 rt2x00_set_field32(&word, TXD_W4_PLCP_LENGTH_LOW, length_low); 1040 rt2x00_set_field32(&word, TXD_W4_PLCP_LENGTH_LOW, desc->length_low);
1061 rt2x00_set_field32(&word, TXD_W4_PLCP_LENGTH_HIGH, length_high); 1041 rt2x00_set_field32(&word, TXD_W3_PLCP_LENGTH_LOW_REGNUM, 8);
1042 rt2x00_set_field32(&word, TXD_W3_PLCP_LENGTH_LOW_BUSY, 1);
1043 rt2x00_set_field32(&word, TXD_W4_PLCP_LENGTH_HIGH, desc->length_high);
1044 rt2x00_set_field32(&word, TXD_W3_PLCP_LENGTH_HIGH_REGNUM, 7);
1045 rt2x00_set_field32(&word, TXD_W3_PLCP_LENGTH_HIGH_BUSY, 1);
1062 rt2x00_desc_write(txd, 4, word); 1046 rt2x00_desc_write(txd, 4, word);
1063 1047
1064 rt2x00_desc_read(txd, 0, &word); 1048 rt2x00_desc_read(txd, 0, &word);
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.h b/drivers/net/wireless/rt2x00/rt2400pci.h
index f5dbde7b2015..369aac6d0336 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.h
+++ b/drivers/net/wireless/rt2x00/rt2400pci.h
@@ -839,11 +839,21 @@
839 839
840/* 840/*
841 * Word3 & 4: PLCP information 841 * Word3 & 4: PLCP information
842 */ 842 * The PLCP values should be treated as if they were BBP values.
843#define TXD_W3_PLCP_SIGNAL FIELD32(0x0000ffff) 843 */
844#define TXD_W3_PLCP_SERVICE FIELD32(0xffff0000) 844#define TXD_W3_PLCP_SIGNAL FIELD32(0x000000ff)
845#define TXD_W4_PLCP_LENGTH_LOW FIELD32(0x0000ffff) 845#define TXD_W3_PLCP_SIGNAL_REGNUM FIELD32(0x00007f00)
846#define TXD_W4_PLCP_LENGTH_HIGH FIELD32(0xffff0000) 846#define TXD_W3_PLCP_SIGNAL_BUSY FIELD32(0x00008000)
847#define TXD_W3_PLCP_SERVICE FIELD32(0x00ff0000)
848#define TXD_W3_PLCP_SERVICE_REGNUM FIELD32(0x7f000000)
849#define TXD_W3_PLCP_SERVICE_BUSY FIELD32(0x80000000)
850
851#define TXD_W4_PLCP_LENGTH_LOW FIELD32(0x000000ff)
852#define TXD_W3_PLCP_LENGTH_LOW_REGNUM FIELD32(0x00007f00)
853#define TXD_W3_PLCP_LENGTH_LOW_BUSY FIELD32(0x00008000)
854#define TXD_W4_PLCP_LENGTH_HIGH FIELD32(0x00ff0000)
855#define TXD_W3_PLCP_LENGTH_HIGH_REGNUM FIELD32(0x7f000000)
856#define TXD_W3_PLCP_LENGTH_HIGH_BUSY FIELD32(0x80000000)
847 857
848/* 858/*
849 * Word5 859 * Word5