aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c15
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h3
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c3
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c10
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c10
6 files changed, 27 insertions, 20 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 41d4a8167dc3..c17fcf272728 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1005,10 +1005,9 @@ void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc)
1005 entry->skb->len + padding_len); 1005 entry->skb->len + padding_len);
1006 1006
1007 /* 1007 /*
1008 * Enable beaconing again. 1008 * Restore beaconing state.
1009 */ 1009 */
1010 rt2x00_set_field32(&reg, BCN_TIME_CFG_BEACON_GEN, 1); 1010 rt2800_register_write(rt2x00dev, BCN_TIME_CFG, orig_reg);
1011 rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
1012 1011
1013 /* 1012 /*
1014 * Clean up beacon skb. 1013 * Clean up beacon skb.
@@ -1039,13 +1038,14 @@ static inline void rt2800_clear_beacon_register(struct rt2x00_dev *rt2x00dev,
1039void rt2800_clear_beacon(struct queue_entry *entry) 1038void rt2800_clear_beacon(struct queue_entry *entry)
1040{ 1039{
1041 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 1040 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
1042 u32 reg; 1041 u32 orig_reg, reg;
1043 1042
1044 /* 1043 /*
1045 * Disable beaconing while we are reloading the beacon data, 1044 * Disable beaconing while we are reloading the beacon data,
1046 * otherwise we might be sending out invalid data. 1045 * otherwise we might be sending out invalid data.
1047 */ 1046 */
1048 rt2800_register_read(rt2x00dev, BCN_TIME_CFG, &reg); 1047 rt2800_register_read(rt2x00dev, BCN_TIME_CFG, &orig_reg);
1048 reg = orig_reg;
1049 rt2x00_set_field32(&reg, BCN_TIME_CFG_BEACON_GEN, 0); 1049 rt2x00_set_field32(&reg, BCN_TIME_CFG_BEACON_GEN, 0);
1050 rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg); 1050 rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
1051 1051
@@ -1055,10 +1055,9 @@ void rt2800_clear_beacon(struct queue_entry *entry)
1055 rt2800_clear_beacon_register(rt2x00dev, entry->entry_idx); 1055 rt2800_clear_beacon_register(rt2x00dev, entry->entry_idx);
1056 1056
1057 /* 1057 /*
1058 * Enabled beaconing again. 1058 * Restore beaconing state.
1059 */ 1059 */
1060 rt2x00_set_field32(&reg, BCN_TIME_CFG_BEACON_GEN, 1); 1060 rt2800_register_write(rt2x00dev, BCN_TIME_CFG, orig_reg);
1061 rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
1062} 1061}
1063EXPORT_SYMBOL_GPL(rt2800_clear_beacon); 1062EXPORT_SYMBOL_GPL(rt2800_clear_beacon);
1064 1063
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index e3b885d8f7db..010b76505243 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -1448,7 +1448,8 @@ int rt2x00mac_conf_tx(struct ieee80211_hw *hw,
1448 struct ieee80211_vif *vif, u16 queue, 1448 struct ieee80211_vif *vif, u16 queue,
1449 const struct ieee80211_tx_queue_params *params); 1449 const struct ieee80211_tx_queue_params *params);
1450void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw); 1450void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw);
1451void rt2x00mac_flush(struct ieee80211_hw *hw, u32 queues, bool drop); 1451void rt2x00mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1452 u32 queues, bool drop);
1452int rt2x00mac_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant); 1453int rt2x00mac_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant);
1453int rt2x00mac_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant); 1454int rt2x00mac_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant);
1454void rt2x00mac_get_ringparam(struct ieee80211_hw *hw, 1455void rt2x00mac_get_ringparam(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index a87ee9b6585a..212ac4842c16 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -749,7 +749,8 @@ void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw)
749} 749}
750EXPORT_SYMBOL_GPL(rt2x00mac_rfkill_poll); 750EXPORT_SYMBOL_GPL(rt2x00mac_rfkill_poll);
751 751
752void rt2x00mac_flush(struct ieee80211_hw *hw, u32 queues, bool drop) 752void rt2x00mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
753 u32 queues, bool drop)
753{ 754{
754 struct rt2x00_dev *rt2x00dev = hw->priv; 755 struct rt2x00_dev *rt2x00dev = hw->priv;
755 struct data_queue *queue; 756 struct data_queue *queue;
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index 10572452cc21..86c43d112a4b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -68,6 +68,12 @@ int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev,
68 } 68 }
69 } 69 }
70 70
71 /* If the port is powered down, we get a -EPROTO error, and this
72 * leads to a endless loop. So just say that the device is gone.
73 */
74 if (status == -EPROTO)
75 clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
76
71 rt2x00_err(rt2x00dev, 77 rt2x00_err(rt2x00dev,
72 "Vendor Request 0x%02x failed for offset 0x%04x with error %d\n", 78 "Vendor Request 0x%02x failed for offset 0x%04x with error %d\n",
73 request, offset, status); 79 request, offset, status);
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 24402984ee57..9048a9cbe52c 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -2031,13 +2031,14 @@ static void rt61pci_write_beacon(struct queue_entry *entry,
2031static void rt61pci_clear_beacon(struct queue_entry *entry) 2031static void rt61pci_clear_beacon(struct queue_entry *entry)
2032{ 2032{
2033 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 2033 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
2034 u32 reg; 2034 u32 orig_reg, reg;
2035 2035
2036 /* 2036 /*
2037 * Disable beaconing while we are reloading the beacon data, 2037 * Disable beaconing while we are reloading the beacon data,
2038 * otherwise we might be sending out invalid data. 2038 * otherwise we might be sending out invalid data.
2039 */ 2039 */
2040 rt2x00mmio_register_read(rt2x00dev, TXRX_CSR9, &reg); 2040 rt2x00mmio_register_read(rt2x00dev, TXRX_CSR9, &orig_reg);
2041 reg = orig_reg;
2041 rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_GEN, 0); 2042 rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_GEN, 0);
2042 rt2x00mmio_register_write(rt2x00dev, TXRX_CSR9, reg); 2043 rt2x00mmio_register_write(rt2x00dev, TXRX_CSR9, reg);
2043 2044
@@ -2048,10 +2049,9 @@ static void rt61pci_clear_beacon(struct queue_entry *entry)
2048 HW_BEACON_OFFSET(entry->entry_idx), 0); 2049 HW_BEACON_OFFSET(entry->entry_idx), 0);
2049 2050
2050 /* 2051 /*
2051 * Enable beaconing again. 2052 * Restore global beaconing state.
2052 */ 2053 */
2053 rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_GEN, 1); 2054 rt2x00mmio_register_write(rt2x00dev, TXRX_CSR9, orig_reg);
2054 rt2x00mmio_register_write(rt2x00dev, TXRX_CSR9, reg);
2055} 2055}
2056 2056
2057/* 2057/*
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index a140170b1eb3..95724ff9c726 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1597,13 +1597,14 @@ static void rt73usb_clear_beacon(struct queue_entry *entry)
1597{ 1597{
1598 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 1598 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
1599 unsigned int beacon_base; 1599 unsigned int beacon_base;
1600 u32 reg; 1600 u32 orig_reg, reg;
1601 1601
1602 /* 1602 /*
1603 * Disable beaconing while we are reloading the beacon data, 1603 * Disable beaconing while we are reloading the beacon data,
1604 * otherwise we might be sending out invalid data. 1604 * otherwise we might be sending out invalid data.
1605 */ 1605 */
1606 rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, &reg); 1606 rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, &orig_reg);
1607 reg = orig_reg;
1607 rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_GEN, 0); 1608 rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_GEN, 0);
1608 rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg); 1609 rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
1609 1610
@@ -1614,10 +1615,9 @@ static void rt73usb_clear_beacon(struct queue_entry *entry)
1614 rt2x00usb_register_write(rt2x00dev, beacon_base, 0); 1615 rt2x00usb_register_write(rt2x00dev, beacon_base, 0);
1615 1616
1616 /* 1617 /*
1617 * Enable beaconing again. 1618 * Restore beaconing state.
1618 */ 1619 */
1619 rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_GEN, 1); 1620 rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, orig_reg);
1620 rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
1621} 1621}
1622 1622
1623static int rt73usb_get_tx_data_len(struct queue_entry *entry) 1623static int rt73usb_get_tx_data_len(struct queue_entry *entry)