rt2x00: Don't count retries as failure
PATCH 2/4 rt2x00: Don't count retries as failure
In reply to a message not in the archiveLink quality estimation became quite low for all rt2x00 drivers because the number of retries it took to send the frame were counted as failure.
This does not correspond to the legacy driver link quality calculation, by not counting it we will send somewhat more optimistic values to mac80211.
--- drivers/net/wireless/rt2x00/rt2x00dev.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/rt2x00/rt2x00dev.c +1 -1
@@ -507,7 +507,7 @@ void rt2x00lib_txdone(struct queue_entry *entry, rt2x00dev->link.qual.tx_success +=test_bit (TXDONE_SUCCESS , &txdesc->flags); rt2x00dev->link.qual.tx_failed += - txdesc->retry + !!test_bit (TXDONE_FAILURE , &txdesc->flags); +test_bit (TXDONE_FAILURE , &txdesc->flags);/* * Initialize TX status
Signature · 1 line
1.5.5.1
PATCH 4/4 rt2x00: Use atomic interface iteration in irq context
In reply to a message not in the archivert2x00lib_beacondone() is called from interrupt context, this means we cannot use the mac80211 interface iterator that uses the rtnl lock (since that uses a mutex which can sleep). Instead we should use the atomic mac80211 interface iterator.
--- drivers/net/wireless/rt2x00/rt2x00dev.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/rt2x00/rt2x00dev.c +3 -3
@@ -481,9 +481,9 @@ void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev)if (!test_bit (DEVICE_ENABLED_RADIO , &rt2x00dev->flags))return ; -ieee80211_iterate_active_interfaces (rt2x00dev->hw, - rt2x00lib_beacondone_iter, - rt2x00dev); +ieee80211_iterate_active_interfaces_atomic (rt2x00dev->hw, + rt2x00lib_beacondone_iter, + rt2x00dev);queue_work (rt2x00dev->hw->workqueue, &rt2x00dev->intf_work); }
Signature · 1 line
1.5.5.1
PATCH 3/4 rt2x00: Reset antenna RSSI after switch
In reply to a message not in the archiveWhen the antenna configuration has changed we should reset the antenna RSSI value. Otherwise the value will be influenced by the previous configuration quality which in turn will affect the antenna diversity.
--- drivers/net/wireless/rt2x00/rt2x00.h | 5 +++++ drivers/net/wireless/rt2x00/rt2x00config.c | 1 + 2 files changed, 6 insertions(+), 0 deletions(-)
drivers/net/wireless/rt2x00/rt2x00.h +5 -0
@@ -328,6 +328,11 @@ static inline int rt2x00_get_link_ant_rssi(struct link *link)return DEFAULT_RSSI ; } +static inline void rt2x00_reset_link_ant_rssi (struct link *link) +{ + link->ant.rssi_ant =0 ; +} +static inline int rt2x00_get_link_ant_rssi_history (struct link *link,enum antenna ant) {
drivers/net/wireless/rt2x00/rt2x00config.c +1 -0
@@ -129,6 +129,7 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,*/ rt2x00dev->ops->lib->config (rt2x00dev, &libconf,CONFIG_UPDATE_ANTENNA );rt2x00lib_reset_link_tuner (rt2x00dev); +rt2x00_reset_link_ant_rssi (&rt2x00dev->link); rt2x00dev->link.ant.active.rx = libconf.ant.rx; rt2x00dev->link.ant.active.tx = libconf.ant.tx;
Signature · 1 line
1.5.5.1
PATCH 1/4 rt2x00: Fix memleak in tx() path
In reply to a message not in the archiveWhen the tx() handler runs while the device has disapeared, we did return NETDEV_TX_OK but didn't free the skb.
--- drivers/net/wireless/rt2x00/rt2x00mac.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/wireless/rt2x00/rt2x00mac.c +1 -0
@@ -114,6 +114,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)*/ if (!test_bit (DEVICE_PRESENT , &rt2x00dev->flags)) {ieee80211_stop_queues (hw); +dev_kfree_skb_any (skb);return NETDEV_TX_OK ; }
Signature · 1 line
1.5.5.1