Commit a137e202 authored by Ivo van Doorn's avatar Ivo van Doorn Committed by David S. Miller
Browse files

[PATCH] rt2x00: get_duration expects values in 100kbs



get_duration expects all speeds to be passed in 100kbs,
this means that passing 2 is incorrect and should be raised to 20
Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent feb24691
...@@ -277,7 +277,7 @@ static void rt2400pci_config_type(struct rt2x00_dev *rt2x00dev, const int type, ...@@ -277,7 +277,7 @@ static void rt2400pci_config_type(struct rt2x00_dev *rt2x00dev, const int type,
*/ */
rt2x00pci_register_read(rt2x00dev, BCNCSR1, &reg); rt2x00pci_register_read(rt2x00dev, BCNCSR1, &reg);
rt2x00_set_field32(&reg, BCNCSR1_PRELOAD, rt2x00_set_field32(&reg, BCNCSR1_PRELOAD,
PREAMBLE + get_duration(IEEE80211_HEADER, 2)); PREAMBLE + get_duration(IEEE80211_HEADER, 20));
rt2x00pci_register_write(rt2x00dev, BCNCSR1, reg); rt2x00pci_register_write(rt2x00dev, BCNCSR1, reg);
/* /*
......
...@@ -277,7 +277,7 @@ static void rt2500pci_config_type(struct rt2x00_dev *rt2x00dev, const int type, ...@@ -277,7 +277,7 @@ static void rt2500pci_config_type(struct rt2x00_dev *rt2x00dev, const int type,
*/ */
rt2x00pci_register_read(rt2x00dev, BCNCSR1, &reg); rt2x00pci_register_read(rt2x00dev, BCNCSR1, &reg);
rt2x00_set_field32(&reg, BCNCSR1_PRELOAD, rt2x00_set_field32(&reg, BCNCSR1_PRELOAD,
PREAMBLE + get_duration(IEEE80211_HEADER, 2)); PREAMBLE + get_duration(IEEE80211_HEADER, 20));
rt2x00_set_field32(&reg, BCNCSR1_BEACON_CWMIN, rt2x00_set_field32(&reg, BCNCSR1_BEACON_CWMIN,
rt2x00lib_get_ring(rt2x00dev, rt2x00lib_get_ring(rt2x00dev,
IEEE80211_TX_QUEUE_BEACON) IEEE80211_TX_QUEUE_BEACON)
......
...@@ -280,7 +280,7 @@ static void rt2500usb_config_type(struct rt2x00_dev *rt2x00dev, const int type, ...@@ -280,7 +280,7 @@ static void rt2500usb_config_type(struct rt2x00_dev *rt2x00dev, const int type,
*/ */
rt2500usb_register_read(rt2x00dev, TXRX_CSR20, &reg); rt2500usb_register_read(rt2x00dev, TXRX_CSR20, &reg);
rt2x00_set_field16(&reg, TXRX_CSR20_OFFSET, rt2x00_set_field16(&reg, TXRX_CSR20_OFFSET,
(PREAMBLE + get_duration(IEEE80211_HEADER, 2)) >> 6); (PREAMBLE + get_duration(IEEE80211_HEADER, 20)) >> 6);
if (type == IEEE80211_IF_TYPE_STA) if (type == IEEE80211_IF_TYPE_STA)
rt2x00_set_field16(&reg, TXRX_CSR20_BCN_EXPECT_WINDOW, 0); rt2x00_set_field16(&reg, TXRX_CSR20_BCN_EXPECT_WINDOW, 0);
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment