* [PATCH 1/4] rt2x00: Fix memleak in tx() path
[not found] <200805231811.38557.IvDoorn@gmail.com>
@ 2008-05-23 16:13 ` Ivo van Doorn
[not found] ` <200805231812.00201.IvDoorn@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Ivo van Doorn @ 2008-05-23 16:13 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, rt2400-devel
When the tx() handler runs while the device has disapeared,
we did return NETDEV_TX_OK but didn't free the skb.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2x00mac.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 2333b53..d068ea9 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -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;
}
--
1.5.5.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/4] rt2x00: Don't count retries as failure
[not found] ` <200805231812.00201.IvDoorn@gmail.com>
@ 2008-05-23 16:13 ` Ivo van Doorn
[not found] ` <200805231812.18092.IvDoorn@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Ivo van Doorn @ 2008-05-23 16:13 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, rt2400-devel
Link 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.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2x00dev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 6553a3d..5645140 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -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
--
1.5.5.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] rt2x00: Reset antenna RSSI after switch
[not found] ` <200805231812.18092.IvDoorn@gmail.com>
@ 2008-05-23 16:13 ` Ivo van Doorn
[not found] ` <200805231812.43582.IvDoorn@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Ivo van Doorn @ 2008-05-23 16:13 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, rt2400-devel
When 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.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2x00.h | 5 +++++
drivers/net/wireless/rt2x00/rt2x00config.c | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 41f352e..3b4944d 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -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)
{
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index a9930a0..48608e8 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -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;
--
1.5.5.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 4/4] rt2x00: Use atomic interface iteration in irq context
[not found] ` <200805231812.43582.IvDoorn@gmail.com>
@ 2008-05-23 16:14 ` Ivo van Doorn
0 siblings, 0 replies; 4+ messages in thread
From: Ivo van Doorn @ 2008-05-23 16:14 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, rt2400-devel
rt2x00lib_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.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2x00dev.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 5645140..669d942 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -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);
}
--
1.5.5.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-23 16:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200805231811.38557.IvDoorn@gmail.com>
2008-05-23 16:13 ` [PATCH 1/4] rt2x00: Fix memleak in tx() path Ivo van Doorn
[not found] ` <200805231812.00201.IvDoorn@gmail.com>
2008-05-23 16:13 ` [PATCH 2/4] rt2x00: Don't count retries as failure Ivo van Doorn
[not found] ` <200805231812.18092.IvDoorn@gmail.com>
2008-05-23 16:13 ` [PATCH 3/4] rt2x00: Reset antenna RSSI after switch Ivo van Doorn
[not found] ` <200805231812.43582.IvDoorn@gmail.com>
2008-05-23 16:14 ` [PATCH 4/4] rt2x00: Use atomic interface iteration in irq context Ivo van Doorn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).