* [PATCH 17/23] mac80211: fix RX aggregation timer
From: Johannes Berg @ 2010-06-10 8:21 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <20100610082128.641664439@sipsolutions.net>
From: Johannes Berg <johannes.berg@intel.com>
I noticed that when there was _no_ traffic at
all on a given aggregation session, it would
never time out. This won't happen unless you
forced creating a session, but fix it anyway.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/agg-rx.c | 4 ++++
1 file changed, 4 insertions(+)
--- wireless-testing.orig/net/mac80211/agg-rx.c 2010-06-09 17:21:15.000000000 +0200
+++ wireless-testing/net/mac80211/agg-rx.c 2010-06-09 17:21:15.000000000 +0200
@@ -274,6 +274,10 @@ void ieee80211_process_addba_request(str
/* activate it for RX */
rcu_assign_pointer(sta->ampdu_mlme.tid_rx[tid], tid_agg_rx);
+
+ if (timeout)
+ mod_timer(&tid_agg_rx->session_timer, TU_TO_EXP_TIME(timeout));
+
end:
spin_unlock_bh(&sta->lock);
^ permalink raw reply
* [PATCH 18/23] mac80211: change RX aggregation locking
From: Johannes Berg @ 2010-06-10 8:21 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <20100610082128.641664439@sipsolutions.net>
From: Johannes Berg <johannes.berg@intel.com>
To prepare for allowing drivers to sleep in
ampdu_action, change the locking in the RX
aggregation code to use a mutex, so that it
would already allow drivers to sleep. But
explicitly disable BHs around the callback
for now since the TX part cannot yet sleep,
and drivers' locking might require it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/agg-rx.c | 12 ++++++------
net/mac80211/driver-ops.h | 2 ++
net/mac80211/ht.c | 6 +++++-
net/mac80211/iface.c | 8 ++++----
net/mac80211/sta_info.c | 1 +
net/mac80211/sta_info.h | 3 +++
6 files changed, 21 insertions(+), 11 deletions(-)
--- wireless-testing.orig/net/mac80211/iface.c 2010-06-09 17:21:10.000000000 +0200
+++ wireless-testing/net/mac80211/iface.c 2010-06-09 17:21:16.000000000 +0200
@@ -740,7 +740,7 @@ static void ieee80211_iface_work(struct
mgmt->u.action.category == WLAN_CATEGORY_BACK) {
int len = skb->len;
- rcu_read_lock();
+ mutex_lock(&local->sta_mtx);
sta = sta_info_get(sdata, mgmt->sa);
if (sta) {
switch (mgmt->u.action.u.addba_req.action_code) {
@@ -761,7 +761,7 @@ static void ieee80211_iface_work(struct
break;
}
}
- rcu_read_unlock();
+ mutex_unlock(&local->sta_mtx);
} else if (ieee80211_is_data_qos(mgmt->frame_control)) {
struct ieee80211_hdr *hdr = (void *)mgmt;
/*
@@ -781,7 +781,7 @@ static void ieee80211_iface_work(struct
* a block-ack session was active. That cannot be
* right, so terminate the session.
*/
- rcu_read_lock();
+ mutex_lock(&local->sta_mtx);
sta = sta_info_get(sdata, mgmt->sa);
if (sta) {
u16 tid = *ieee80211_get_qos_ctl(hdr) &
@@ -791,7 +791,7 @@ static void ieee80211_iface_work(struct
sta, tid, WLAN_BACK_RECIPIENT,
WLAN_REASON_QSTA_REQUIRE_SETUP);
}
- rcu_read_unlock();
+ mutex_unlock(&local->sta_mtx);
} else switch (sdata->vif.type) {
case NL80211_IFTYPE_STATION:
ieee80211_sta_rx_queued_mgmt(sdata, skb);
--- wireless-testing.orig/net/mac80211/driver-ops.h 2010-06-09 17:20:46.000000000 +0200
+++ wireless-testing/net/mac80211/driver-ops.h 2010-06-09 17:21:16.000000000 +0200
@@ -349,9 +349,11 @@ static inline int drv_ampdu_action(struc
u16 *ssn)
{
int ret = -EOPNOTSUPP;
+ local_bh_disable();
if (local->ops->ampdu_action)
ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action,
sta, tid, ssn);
+ local_bh_enable();
trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn, ret);
return ret;
}
--- wireless-testing.orig/net/mac80211/sta_info.c 2010-06-09 17:21:14.000000000 +0200
+++ wireless-testing/net/mac80211/sta_info.c 2010-06-09 17:21:16.000000000 +0200
@@ -236,6 +236,7 @@ struct sta_info *sta_info_alloc(struct i
spin_lock_init(&sta->flaglock);
INIT_WORK(&sta->drv_unblock_wk, sta_unblock);
INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
+ mutex_init(&sta->ampdu_mlme.mtx);
memcpy(sta->sta.addr, addr, ETH_ALEN);
sta->local = local;
--- wireless-testing.orig/net/mac80211/sta_info.h 2010-06-09 17:21:15.000000000 +0200
+++ wireless-testing/net/mac80211/sta_info.h 2010-06-09 17:21:16.000000000 +0200
@@ -142,8 +142,11 @@ struct tid_ampdu_rx {
* @work: work struct for starting/stopping aggregation
* @tid_rx_timer_expired: bitmap indicating on which TIDs the
* RX timer expired until the work for it runs
+ * @mtx: mutex to protect all TX data (except non-NULL assignments
+ * to tid_tx[idx], which are protected by the sta spinlock)
*/
struct sta_ampdu_mlme {
+ struct mutex mtx;
/* rx */
struct tid_ampdu_rx *tid_rx[STA_TID_NUM];
unsigned long tid_rx_timer_expired[BITS_TO_LONGS(STA_TID_NUM)];
--- wireless-testing.orig/net/mac80211/agg-rx.c 2010-06-09 17:21:15.000000000 +0200
+++ wireless-testing/net/mac80211/agg-rx.c 2010-06-09 17:21:16.000000000 +0200
@@ -6,7 +6,7 @@
* Copyright 2005-2006, Devicescape Software, Inc.
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
* Copyright 2007, Michael Wu <flamingice@sourmilk.net>
- * Copyright 2007-2008, Intel Corporation
+ * Copyright 2007-2010, Intel Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -38,7 +38,7 @@ void ___ieee80211_stop_rx_ba_session(str
struct ieee80211_local *local = sta->local;
struct tid_ampdu_rx *tid_rx;
- lockdep_assert_held(&sta->lock);
+ lockdep_assert_held(&sta->ampdu_mlme.mtx);
tid_rx = sta->ampdu_mlme.tid_rx[tid];
@@ -70,9 +70,9 @@ void ___ieee80211_stop_rx_ba_session(str
void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
u16 initiator, u16 reason)
{
- spin_lock_bh(&sta->lock);
+ mutex_lock(&sta->ampdu_mlme.mtx);
___ieee80211_stop_rx_ba_session(sta, tid, initiator, reason);
- spin_unlock_bh(&sta->lock);
+ mutex_unlock(&sta->ampdu_mlme.mtx);
}
/*
@@ -205,7 +205,7 @@ void ieee80211_process_addba_request(str
/* examine state machine */
- spin_lock_bh(&sta->lock);
+ mutex_lock(&sta->ampdu_mlme.mtx);
if (sta->ampdu_mlme.tid_rx[tid]) {
#ifdef CONFIG_MAC80211_HT_DEBUG
@@ -279,7 +279,7 @@ void ieee80211_process_addba_request(str
mod_timer(&tid_agg_rx->session_timer, TU_TO_EXP_TIME(timeout));
end:
- spin_unlock_bh(&sta->lock);
+ mutex_unlock(&sta->ampdu_mlme.mtx);
end_no_lock:
ieee80211_send_addba_resp(sta->sdata, sta->sta.addr, tid,
--- wireless-testing.orig/net/mac80211/ht.c 2010-06-09 17:21:15.000000000 +0200
+++ wireless-testing/net/mac80211/ht.c 2010-06-09 17:21:16.000000000 +0200
@@ -130,13 +130,17 @@ void ieee80211_ba_session_work(struct wo
if (test_sta_flags(sta, WLAN_STA_BLOCK_BA))
return;
- spin_lock_bh(&sta->lock);
+ mutex_lock(&sta->ampdu_mlme.mtx);
for (tid = 0; tid < STA_TID_NUM; tid++) {
if (test_and_clear_bit(tid, sta->ampdu_mlme.tid_rx_timer_expired))
___ieee80211_stop_rx_ba_session(
sta, tid, WLAN_BACK_RECIPIENT,
WLAN_REASON_QSTA_TIMEOUT);
+ }
+ mutex_unlock(&sta->ampdu_mlme.mtx);
+ spin_lock_bh(&sta->lock);
+ for (tid = 0; tid < STA_TID_NUM; tid++) {
tid_tx = sta->ampdu_mlme.tid_tx[tid];
if (!tid_tx)
continue;
^ permalink raw reply
* [PATCH 19/23] mac80211: defer TX agg session teardown to work
From: Johannes Berg @ 2010-06-10 8:21 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <20100610082128.641664439@sipsolutions.net>
From: Johannes Berg <johannes.berg@intel.com>
Since we want the code to be able to sleep
in the future, it must not be called from
the timer directly. To achieve that, simply
call the function drivers would call, and
also use RCU in the timer to get the struct
so we don't need to rely on the spinlock in
the future.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/agg-tx.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- wireless-testing.orig/net/mac80211/agg-tx.c 2010-06-09 17:21:14.000000000 +0200
+++ wireless-testing/net/mac80211/agg-tx.c 2010-06-09 17:21:16.000000000 +0200
@@ -200,11 +200,11 @@ static void sta_addba_resp_timer_expired
struct tid_ampdu_tx *tid_tx;
/* check if the TID waits for addBA response */
- spin_lock_bh(&sta->lock);
- tid_tx = sta->ampdu_mlme.tid_tx[tid];
+ rcu_read_lock();
+ tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
if (!tid_tx ||
test_bit(HT_AGG_STATE_RESPONSE_RECEIVED, &tid_tx->state)) {
- spin_unlock_bh(&sta->lock);
+ rcu_read_unlock();
#ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "timer expired on tid %d but we are not "
"(or no longer) expecting addBA response there\n",
@@ -217,8 +217,8 @@ static void sta_addba_resp_timer_expired
printk(KERN_DEBUG "addBA response timer expired on tid %d\n", tid);
#endif
- ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR);
- spin_unlock_bh(&sta->lock);
+ ieee80211_stop_tx_ba_session(&sta->sta, tid);
+ rcu_read_unlock();
}
static inline int ieee80211_ac_from_tid(int tid)
^ permalink raw reply
* [PATCH 20/23] mac80211: change TX aggregation locking
From: Johannes Berg @ 2010-06-10 8:21 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <20100610082128.641664439@sipsolutions.net>
From: Johannes Berg <johannes.berg@intel.com>
To prepare for allowing drivers to sleep in
ampdu_action, change the locking in the TX
aggregation code to use the mutex the RX part
already uses. The spinlock is still necessary
around some code to avoid races with TX, but
now we can also synchronize_net() to avoid
getting an inconsistent sequence number.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/agg-tx.c | 94 +++++++++++++++++++++++++---------------------
net/mac80211/driver-ops.h | 3 +
net/mac80211/ht.c | 8 ---
3 files changed, 58 insertions(+), 47 deletions(-)
--- wireless-testing.orig/net/mac80211/agg-tx.c 2010-06-09 17:21:16.000000000 +0200
+++ wireless-testing/net/mac80211/agg-tx.c 2010-06-09 17:21:17.000000000 +0200
@@ -6,7 +6,7 @@
* Copyright 2005-2006, Devicescape Software, Inc.
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
* Copyright 2007, Michael Wu <flamingice@sourmilk.net>
- * Copyright 2007-2009, Intel Corporation
+ * Copyright 2007-2010, Intel Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -140,18 +140,23 @@ int ___ieee80211_stop_tx_ba_session(stru
struct tid_ampdu_tx *tid_tx = sta->ampdu_mlme.tid_tx[tid];
int ret;
- lockdep_assert_held(&sta->lock);
+ lockdep_assert_held(&sta->ampdu_mlme.mtx);
- if (WARN_ON(!tid_tx))
+ if (!tid_tx)
return -ENOENT;
+ spin_lock_bh(&sta->lock);
+
if (test_bit(HT_AGG_STATE_WANT_START, &tid_tx->state)) {
/* not even started yet! */
rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], NULL);
+ spin_unlock_bh(&sta->lock);
call_rcu(&tid_tx->rcu_head, kfree_tid_tx);
return 0;
}
+ spin_unlock_bh(&sta->lock);
+
#ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Tx BA session stop requested for %pM tid %u\n",
sta->sta.addr, tid);
@@ -269,6 +274,8 @@ void ieee80211_tx_ba_session_handle_star
u16 start_seq_num;
int ret;
+ lockdep_assert_held(&sta->ampdu_mlme.mtx);
+
/*
* While we're asking the driver about the aggregation,
* stop the AC queue so that we don't have to worry
@@ -281,10 +288,11 @@ void ieee80211_tx_ba_session_handle_star
clear_bit(HT_AGG_STATE_WANT_START, &tid_tx->state);
/*
- * This might be off by one due to a race that we can't
- * really prevent here without synchronize_net() which
- * can't be called now.
+ * make sure no packets are being processed to get
+ * valid starting sequence number
*/
+ synchronize_net();
+
start_seq_num = sta->tid_seq[tid] >> 4;
ret = drv_ampdu_action(local, sdata, IEEE80211_AMPDU_TX_START,
@@ -294,7 +302,10 @@ void ieee80211_tx_ba_session_handle_star
printk(KERN_DEBUG "BA request denied - HW unavailable for"
" tid %d\n", tid);
#endif
+ spin_lock_bh(&sta->lock);
rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], NULL);
+ spin_unlock_bh(&sta->lock);
+
ieee80211_wake_queue_agg(local, tid);
call_rcu(&tid_tx->rcu_head, kfree_tid_tx);
return;
@@ -309,7 +320,9 @@ void ieee80211_tx_ba_session_handle_star
printk(KERN_DEBUG "activated addBA response timer on tid %d\n", tid);
#endif
+ spin_lock_bh(&sta->lock);
sta->ampdu_mlme.addba_req_num[tid]++;
+ spin_unlock_bh(&sta->lock);
/* send AddBA request */
ieee80211_send_addba_request(sdata, sta->sta.addr, tid,
@@ -445,16 +458,25 @@ ieee80211_agg_splice_finish(struct ieee8
ieee80211_wake_queue_agg(local, tid);
}
-/* caller must hold sta->lock */
static void ieee80211_agg_tx_operational(struct ieee80211_local *local,
struct sta_info *sta, u16 tid)
{
- lockdep_assert_held(&sta->lock);
+ lockdep_assert_held(&sta->ampdu_mlme.mtx);
#ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Aggregation is on for tid %d\n", tid);
#endif
+ drv_ampdu_action(local, sta->sdata,
+ IEEE80211_AMPDU_TX_OPERATIONAL,
+ &sta->sta, tid, NULL);
+
+ /*
+ * synchronize with TX path, while splicing the TX path
+ * should block so it won't put more packets onto pending.
+ */
+ spin_lock_bh(&sta->lock);
+
ieee80211_agg_splice_packets(local, sta->ampdu_mlme.tid_tx[tid], tid);
/*
* Now mark as operational. This will be visible
@@ -464,9 +486,7 @@ static void ieee80211_agg_tx_operational
set_bit(HT_AGG_STATE_OPERATIONAL, &sta->ampdu_mlme.tid_tx[tid]->state);
ieee80211_agg_splice_finish(local, tid);
- drv_ampdu_action(local, sta->sdata,
- IEEE80211_AMPDU_TX_OPERATIONAL,
- &sta->sta, tid, NULL);
+ spin_unlock_bh(&sta->lock);
}
void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid)
@@ -486,37 +506,35 @@ void ieee80211_start_tx_ba_cb(struct iee
return;
}
- rcu_read_lock();
+ mutex_lock(&local->sta_mtx);
sta = sta_info_get(sdata, ra);
if (!sta) {
- rcu_read_unlock();
+ mutex_unlock(&local->sta_mtx);
#ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Could not find station: %pM\n", ra);
#endif
return;
}
- spin_lock_bh(&sta->lock);
+ mutex_lock(&sta->ampdu_mlme.mtx);
tid_tx = sta->ampdu_mlme.tid_tx[tid];
if (WARN_ON(!tid_tx)) {
#ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "addBA was not requested!\n");
#endif
- spin_unlock_bh(&sta->lock);
- rcu_read_unlock();
- return;
+ goto unlock;
}
if (WARN_ON(test_and_set_bit(HT_AGG_STATE_DRV_READY, &tid_tx->state)))
- goto out;
+ goto unlock;
if (test_bit(HT_AGG_STATE_RESPONSE_RECEIVED, &tid_tx->state))
ieee80211_agg_tx_operational(local, sta, tid);
- out:
- spin_unlock_bh(&sta->lock);
- rcu_read_unlock();
+ unlock:
+ mutex_unlock(&sta->ampdu_mlme.mtx);
+ mutex_unlock(&local->sta_mtx);
}
void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
@@ -548,21 +566,14 @@ EXPORT_SYMBOL(ieee80211_start_tx_ba_cb_i
int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
enum ieee80211_back_parties initiator)
{
- struct tid_ampdu_tx *tid_tx;
int ret;
- spin_lock_bh(&sta->lock);
- tid_tx = sta->ampdu_mlme.tid_tx[tid];
-
- if (!tid_tx) {
- ret = -ENOENT;
- goto unlock;
- }
+ mutex_lock(&sta->ampdu_mlme.mtx);
ret = ___ieee80211_stop_tx_ba_session(sta, tid, initiator);
- unlock:
- spin_unlock_bh(&sta->lock);
+ mutex_unlock(&sta->ampdu_mlme.mtx);
+
return ret;
}
@@ -627,16 +638,17 @@ void ieee80211_stop_tx_ba_cb(struct ieee
ra, tid);
#endif /* CONFIG_MAC80211_HT_DEBUG */
- rcu_read_lock();
+ mutex_lock(&local->sta_mtx);
+
sta = sta_info_get(sdata, ra);
if (!sta) {
#ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Could not find station: %pM\n", ra);
#endif
- rcu_read_unlock();
- return;
+ goto unlock;
}
+ mutex_lock(&sta->ampdu_mlme.mtx);
spin_lock_bh(&sta->lock);
tid_tx = sta->ampdu_mlme.tid_tx[tid];
@@ -644,9 +656,7 @@ void ieee80211_stop_tx_ba_cb(struct ieee
#ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "unexpected callback to A-MPDU stop\n");
#endif
- spin_unlock_bh(&sta->lock);
- rcu_read_unlock();
- return;
+ goto unlock_sta;
}
if (tid_tx->stop_initiator == WLAN_BACK_INITIATOR)
@@ -672,8 +682,11 @@ void ieee80211_stop_tx_ba_cb(struct ieee
call_rcu(&tid_tx->rcu_head, kfree_tid_tx);
+ unlock_sta:
spin_unlock_bh(&sta->lock);
- rcu_read_unlock();
+ mutex_unlock(&sta->ampdu_mlme.mtx);
+ unlock:
+ mutex_unlock(&local->sta_mtx);
}
void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
@@ -714,10 +727,9 @@ void ieee80211_process_addba_resp(struct
capab = le16_to_cpu(mgmt->u.action.u.addba_resp.capab);
tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;
- spin_lock_bh(&sta->lock);
+ mutex_lock(&sta->ampdu_mlme.mtx);
tid_tx = sta->ampdu_mlme.tid_tx[tid];
-
if (!tid_tx)
goto out;
@@ -751,5 +763,5 @@ void ieee80211_process_addba_resp(struct
}
out:
- spin_unlock_bh(&sta->lock);
+ mutex_unlock(&sta->ampdu_mlme.mtx);
}
--- wireless-testing.orig/net/mac80211/ht.c 2010-06-09 17:21:16.000000000 +0200
+++ wireless-testing/net/mac80211/ht.c 2010-06-09 17:21:17.000000000 +0200
@@ -6,7 +6,7 @@
* Copyright 2005-2006, Devicescape Software, Inc.
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
* Copyright 2007, Michael Wu <flamingice@sourmilk.net>
- * Copyright 2007-2008, Intel Corporation
+ * Copyright 2007-2010, Intel Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -136,11 +136,7 @@ void ieee80211_ba_session_work(struct wo
___ieee80211_stop_rx_ba_session(
sta, tid, WLAN_BACK_RECIPIENT,
WLAN_REASON_QSTA_TIMEOUT);
- }
- mutex_unlock(&sta->ampdu_mlme.mtx);
- spin_lock_bh(&sta->lock);
- for (tid = 0; tid < STA_TID_NUM; tid++) {
tid_tx = sta->ampdu_mlme.tid_tx[tid];
if (!tid_tx)
continue;
@@ -152,7 +148,7 @@ void ieee80211_ba_session_work(struct wo
___ieee80211_stop_tx_ba_session(sta, tid,
WLAN_BACK_INITIATOR);
}
- spin_unlock_bh(&sta->lock);
+ mutex_unlock(&sta->ampdu_mlme.mtx);
}
void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
--- wireless-testing.orig/net/mac80211/driver-ops.h 2010-06-09 17:21:16.000000000 +0200
+++ wireless-testing/net/mac80211/driver-ops.h 2010-06-09 17:21:17.000000000 +0200
@@ -349,6 +349,9 @@ static inline int drv_ampdu_action(struc
u16 *ssn)
{
int ret = -EOPNOTSUPP;
+
+ might_sleep();
+
local_bh_disable();
if (local->ops->ampdu_action)
ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action,
^ permalink raw reply
* [PATCH 21/23] mac80211: allow drivers to sleep in ampdu_action
From: Johannes Berg @ 2010-06-10 8:21 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <20100610082128.641664439@sipsolutions.net>
From: Johannes Berg <johannes.berg@intel.com>
Allow drivers to sleep, and indicate this in
the documentation. ath9k has some locking I
don't understand, so keep it safe and disable
BHs in it, all other drivers look fine with
the context change.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/ath/ath9k/main.c | 4 ++++
include/net/mac80211.h | 2 +-
net/mac80211/driver-ops.h | 3 +--
3 files changed, 6 insertions(+), 3 deletions(-)
--- wireless-testing.orig/include/net/mac80211.h 2010-06-09 17:21:12.000000000 +0200
+++ wireless-testing/include/net/mac80211.h 2010-06-09 17:21:17.000000000 +0200
@@ -1640,7 +1640,7 @@ enum ieee80211_ampdu_mlme_action {
* is the first frame we expect to perform the action on. Notice
* that TX/RX_STOP can pass NULL for this parameter.
* Returns a negative error code on failure.
- * The callback must be atomic.
+ * The callback can sleep.
*
* @get_survey: Return per-channel survey information
*
--- wireless-testing.orig/drivers/net/wireless/ath/ath9k/main.c 2010-06-09 17:20:45.000000000 +0200
+++ wireless-testing/drivers/net/wireless/ath/ath9k/main.c 2010-06-09 17:21:17.000000000 +0200
@@ -1769,6 +1769,8 @@ static int ath9k_ampdu_action(struct iee
struct ath_softc *sc = aphy->sc;
int ret = 0;
+ local_bh_disable();
+
switch (action) {
case IEEE80211_AMPDU_RX_START:
if (!(sc->sc_flags & SC_OP_RXAGGR))
@@ -1798,6 +1800,8 @@ static int ath9k_ampdu_action(struct iee
"Unknown AMPDU action\n");
}
+ local_bh_enable();
+
return ret;
}
--- wireless-testing.orig/net/mac80211/driver-ops.h 2010-06-09 17:21:17.000000000 +0200
+++ wireless-testing/net/mac80211/driver-ops.h 2010-06-09 17:21:17.000000000 +0200
@@ -352,11 +352,10 @@ static inline int drv_ampdu_action(struc
might_sleep();
- local_bh_disable();
if (local->ops->ampdu_action)
ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action,
sta, tid, ssn);
- local_bh_enable();
+
trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn, ret);
return ret;
}
^ permalink raw reply
* [PATCH 22/23] mac80211: update aggregation documentation
From: Johannes Berg @ 2010-06-10 8:21 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <20100610082128.641664439@sipsolutions.net>
From: Johannes Berg <johannes.berg@intel.com>
Even before the recent changes, the documentation
for TX aggregation was somewhat out of date. Update
it and also add documentation for the RX side.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/agg-rx.c | 23 +++++++++++++++++++++++
net/mac80211/agg-tx.c | 43 +++++++++++++++++++++++++++----------------
2 files changed, 50 insertions(+), 16 deletions(-)
--- wireless-testing.orig/net/mac80211/agg-tx.c 2010-06-09 17:21:17.000000000 +0200
+++ wireless-testing/net/mac80211/agg-tx.c 2010-06-09 17:21:18.000000000 +0200
@@ -21,28 +21,39 @@
#include "wme.h"
/**
- * DOC: TX aggregation
+ * DOC: TX A-MPDU aggregation
*
* Aggregation on the TX side requires setting the hardware flag
- * %IEEE80211_HW_AMPDU_AGGREGATION as well as, if present, the @ampdu_queues
- * hardware parameter to the number of hardware AMPDU queues. If there are no
- * hardware queues then the driver will (currently) have to do all frame
- * buffering.
+ * %IEEE80211_HW_AMPDU_AGGREGATION. The driver will then be handed
+ * packets with a flag indicating A-MPDU aggregation. The driver
+ * or device is responsible for actually aggregating the frames,
+ * as well as deciding how many and which to aggregate.
*
- * When TX aggregation is started by some subsystem (usually the rate control
- * algorithm would be appropriate) by calling the
- * ieee80211_start_tx_ba_session() function, the driver will be notified via
- * its @ampdu_action function, with the %IEEE80211_AMPDU_TX_START action.
+ * When TX aggregation is started by some subsystem (usually the rate
+ * control algorithm would be appropriate) by calling the
+ * ieee80211_start_tx_ba_session() function, the driver will be
+ * notified via its @ampdu_action function, with the
+ * %IEEE80211_AMPDU_TX_START action.
*
* In response to that, the driver is later required to call the
- * ieee80211_start_tx_ba_cb() (or ieee80211_start_tx_ba_cb_irqsafe())
- * function, which will start the aggregation session.
+ * ieee80211_start_tx_ba_cb_irqsafe() function, which will really
+ * start the aggregation session after the peer has also responded.
+ * If the peer responds negatively, the session will be stopped
+ * again right away. Note that it is possible for the aggregation
+ * session to be stopped before the driver has indicated that it
+ * is done setting it up, in which case it must not indicate the
+ * setup completion.
*
- * Similarly, when the aggregation session is stopped by
- * ieee80211_stop_tx_ba_session(), the driver's @ampdu_action function will
- * be called with the action %IEEE80211_AMPDU_TX_STOP. In this case, the
- * call must not fail, and the driver must later call ieee80211_stop_tx_ba_cb()
- * (or ieee80211_stop_tx_ba_cb_irqsafe()).
+ * Also note that, since we also need to wait for a response from
+ * the peer, the driver is notified of the completion of the
+ * handshake by the %IEEE80211_AMPDU_TX_OPERATIONAL action to the
+ * @ampdu_action callback.
+ *
+ * Similarly, when the aggregation session is stopped by the peer
+ * or something calling ieee80211_stop_tx_ba_session(), the driver's
+ * @ampdu_action function will be called with the action
+ * %IEEE80211_AMPDU_TX_STOP. In this case, the call must not fail,
+ * and the driver must later call ieee80211_stop_tx_ba_cb_irqsafe().
*/
static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
--- wireless-testing.orig/net/mac80211/agg-rx.c 2010-06-09 17:21:16.000000000 +0200
+++ wireless-testing/net/mac80211/agg-rx.c 2010-06-09 17:21:18.000000000 +0200
@@ -13,6 +13,29 @@
* published by the Free Software Foundation.
*/
+/**
+ * DOC: RX A-MPDU aggregation
+ *
+ * Aggregation on the RX side requires only implementing the
+ * @ampdu_action callback that is invoked to start/stop any
+ * block-ack sessions for RX aggregation.
+ *
+ * When RX aggregation is started by the peer, the driver is
+ * notified via @ampdu_action function, with the
+ * %IEEE80211_AMPDU_RX_START action, and may reject the request
+ * in which case a negative response is sent to the peer, if it
+ * accepts it a positive response is sent.
+ *
+ * While the session is active, the device/driver are required
+ * to de-aggregate frames and pass them up one by one to mac80211,
+ * which will handle the reorder buffer.
+ *
+ * When the aggregation session is stopped again by the peer or
+ * ourselves, the driver's @ampdu_action function will be called
+ * with the action %IEEE80211_AMPDU_RX_STOP. In this case, the
+ * call must not fail.
+ */
+
#include <linux/ieee80211.h>
#include <linux/slab.h>
#include <net/mac80211.h>
^ permalink raw reply
* [PATCH 23/23] mac80211: fix mgmt frame accounting
From: Johannes Berg @ 2010-06-10 8:21 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <20100610082128.641664439@sipsolutions.net>
From: Johannes Berg <johannes.berg@intel.com>
The recent change to processing action frames from
the management frame queue had already broken action
frame accounting, and my rework didn't help either.
So add back accounting and simplify the code with a
label rather than duplicating it, and also add
accounting for management frames.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/rx.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
--- wireless-testing.orig/net/mac80211/rx.c 2010-06-10 08:37:20.000000000 +0200
+++ wireless-testing/net/mac80211/rx.c 2010-06-10 08:41:02.000000000 +0200
@@ -1966,10 +1966,7 @@ ieee80211_rx_h_action(struct ieee80211_r
goto invalid;
}
- rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME;
- skb_queue_tail(&sdata->skb_queue, rx->skb);
- ieee80211_queue_work(&local->hw, &sdata->work);
- return RX_QUEUED;
+ goto queue;
case WLAN_CATEGORY_SPECTRUM_MGMT:
if (local->hw.conf.channel->band != IEEE80211_BAND_5GHZ)
break;
@@ -1999,10 +1996,7 @@ ieee80211_rx_h_action(struct ieee80211_r
if (memcmp(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN))
break;
- rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME;
- skb_queue_tail(&sdata->skb_queue, rx->skb);
- ieee80211_queue_work(&local->hw, &sdata->work);
- return RX_QUEUED;
+ goto queue;
}
break;
case WLAN_CATEGORY_SA_QUERY:
@@ -2022,10 +2016,7 @@ ieee80211_rx_h_action(struct ieee80211_r
case WLAN_CATEGORY_MESH_PATH_SEL:
if (!ieee80211_vif_is_mesh(&sdata->vif))
break;
- rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME;
- skb_queue_tail(&sdata->skb_queue, rx->skb);
- ieee80211_queue_work(&local->hw, &sdata->work);
- return RX_QUEUED;
+ goto queue;
}
invalid:
@@ -2076,6 +2067,14 @@ ieee80211_rx_h_action(struct ieee80211_r
rx->sta->rx_packets++;
dev_kfree_skb(rx->skb);
return RX_QUEUED;
+
+ queue:
+ rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME;
+ skb_queue_tail(&sdata->skb_queue, rx->skb);
+ ieee80211_queue_work(&local->hw, &sdata->work);
+ if (rx->sta)
+ rx->sta->rx_packets++;
+ return RX_QUEUED;
}
static ieee80211_rx_result debug_noinline
@@ -2131,6 +2130,8 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_
rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME;
skb_queue_tail(&sdata->skb_queue, rx->skb);
ieee80211_queue_work(&rx->local->hw, &sdata->work);
+ if (rx->sta)
+ rx->sta->rx_packets++;
return RX_QUEUED;
}
^ permalink raw reply
* [PATCH] mac80211: bracket driver tracing
From: Johannes Berg @ 2010-06-10 8:56 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
Currently, driver tracing is sometimes invoked
after and sometimes before the actual driver
callback. This is fine as long as the driver
has no tracing itself, but as soon as it does
it gets confusing.
To make traces containing such information
easier to read, introduce a return tracer in
mac80211 that essentially brackets any driver
tracing, and invoke the real trace before the
driver's callback, only showing the return
value, if any, afterwards.
Since tracing records the process, there's no
problem with overlapping calls if that should
happen.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/driver-ops.h | 89 +++++++++++++-------
net/mac80211/driver-trace.h | 189 ++++++++++++++++++++++----------------------
2 files changed, 156 insertions(+), 122 deletions(-)
--- wireless-testing.orig/net/mac80211/driver-ops.h 2010-06-09 21:07:00.000000000 +0200
+++ wireless-testing/net/mac80211/driver-ops.h 2010-06-10 10:42:07.000000000 +0200
@@ -16,10 +16,11 @@ static inline int drv_start(struct ieee8
might_sleep();
+ trace_drv_start(local);
local->started = true;
smp_mb();
ret = local->ops->start(&local->hw);
- trace_drv_start(local, ret);
+ trace_drv_return_int(local, ret);
return ret;
}
@@ -27,8 +28,9 @@ static inline void drv_stop(struct ieee8
{
might_sleep();
- local->ops->stop(&local->hw);
trace_drv_stop(local);
+ local->ops->stop(&local->hw);
+ trace_drv_return_void(local);
/* sync away all work on the tasklet before clearing started */
tasklet_disable(&local->tasklet);
@@ -46,8 +48,9 @@ static inline int drv_add_interface(stru
might_sleep();
+ trace_drv_add_interface(local, vif_to_sdata(vif));
ret = local->ops->add_interface(&local->hw, vif);
- trace_drv_add_interface(local, vif_to_sdata(vif), ret);
+ trace_drv_return_int(local, ret);
return ret;
}
@@ -56,8 +59,9 @@ static inline void drv_remove_interface(
{
might_sleep();
- local->ops->remove_interface(&local->hw, vif);
trace_drv_remove_interface(local, vif_to_sdata(vif));
+ local->ops->remove_interface(&local->hw, vif);
+ trace_drv_return_void(local);
}
static inline int drv_config(struct ieee80211_local *local, u32 changed)
@@ -66,8 +70,9 @@ static inline int drv_config(struct ieee
might_sleep();
+ trace_drv_config(local, changed);
ret = local->ops->config(&local->hw, changed);
- trace_drv_config(local, changed, ret);
+ trace_drv_return_int(local, ret);
return ret;
}
@@ -78,9 +83,10 @@ static inline void drv_bss_info_changed(
{
might_sleep();
+ trace_drv_bss_info_changed(local, sdata, info, changed);
if (local->ops->bss_info_changed)
local->ops->bss_info_changed(&local->hw, &sdata->vif, info, changed);
- trace_drv_bss_info_changed(local, sdata, info, changed);
+ trace_drv_return_void(local);
}
struct in_ifaddr;
@@ -92,11 +98,11 @@ static inline int drv_configure_arp_filt
might_sleep();
+ trace_drv_configure_arp_filter(local, vif_to_sdata(vif));
if (local->ops->configure_arp_filter)
ret = local->ops->configure_arp_filter(&local->hw, vif,
ifa_list);
-
- trace_drv_configure_arp_filter(local, vif_to_sdata(vif), ifa_list, ret);
+ trace_drv_return_int(local, ret);
return ret;
}
@@ -105,10 +111,12 @@ static inline u64 drv_prepare_multicast(
{
u64 ret = 0;
+ trace_drv_prepare_multicast(local, mc_list->count);
+
if (local->ops->prepare_multicast)
ret = local->ops->prepare_multicast(&local->hw, mc_list);
- trace_drv_prepare_multicast(local, mc_list->count, ret);
+ trace_drv_return_u64(local, ret);
return ret;
}
@@ -120,19 +128,21 @@ static inline void drv_configure_filter(
{
might_sleep();
- local->ops->configure_filter(&local->hw, changed_flags, total_flags,
- multicast);
trace_drv_configure_filter(local, changed_flags, total_flags,
multicast);
+ local->ops->configure_filter(&local->hw, changed_flags, total_flags,
+ multicast);
+ trace_drv_return_void(local);
}
static inline int drv_set_tim(struct ieee80211_local *local,
struct ieee80211_sta *sta, bool set)
{
int ret = 0;
+ trace_drv_set_tim(local, sta, set);
if (local->ops->set_tim)
ret = local->ops->set_tim(&local->hw, sta, set);
- trace_drv_set_tim(local, sta, set, ret);
+ trace_drv_return_int(local, ret);
return ret;
}
@@ -146,8 +156,9 @@ static inline int drv_set_key(struct iee
might_sleep();
+ trace_drv_set_key(local, cmd, sdata, sta, key);
ret = local->ops->set_key(&local->hw, cmd, &sdata->vif, sta, key);
- trace_drv_set_key(local, cmd, sdata, sta, key, ret);
+ trace_drv_return_int(local, ret);
return ret;
}
@@ -162,10 +173,11 @@ static inline void drv_update_tkip_key(s
if (sta)
ista = &sta->sta;
+ trace_drv_update_tkip_key(local, sdata, conf, ista, iv32);
if (local->ops->update_tkip_key)
local->ops->update_tkip_key(&local->hw, &sdata->vif, conf,
ista, iv32, phase1key);
- trace_drv_update_tkip_key(local, sdata, conf, ista, iv32);
+ trace_drv_return_void(local);
}
static inline int drv_hw_scan(struct ieee80211_local *local,
@@ -176,8 +188,9 @@ static inline int drv_hw_scan(struct iee
might_sleep();
+ trace_drv_hw_scan(local, sdata, req);
ret = local->ops->hw_scan(&local->hw, &sdata->vif, req);
- trace_drv_hw_scan(local, sdata, req, ret);
+ trace_drv_return_int(local, ret);
return ret;
}
@@ -185,18 +198,20 @@ static inline void drv_sw_scan_start(str
{
might_sleep();
+ trace_drv_sw_scan_start(local);
if (local->ops->sw_scan_start)
local->ops->sw_scan_start(&local->hw);
- trace_drv_sw_scan_start(local);
+ trace_drv_return_void(local);
}
static inline void drv_sw_scan_complete(struct ieee80211_local *local)
{
might_sleep();
+ trace_drv_sw_scan_complete(local);
if (local->ops->sw_scan_complete)
local->ops->sw_scan_complete(&local->hw);
- trace_drv_sw_scan_complete(local);
+ trace_drv_return_void(local);
}
static inline int drv_get_stats(struct ieee80211_local *local,
@@ -228,9 +243,10 @@ static inline int drv_set_rts_threshold(
might_sleep();
+ trace_drv_set_rts_threshold(local, value);
if (local->ops->set_rts_threshold)
ret = local->ops->set_rts_threshold(&local->hw, value);
- trace_drv_set_rts_threshold(local, value, ret);
+ trace_drv_return_int(local, ret);
return ret;
}
@@ -240,12 +256,13 @@ static inline int drv_set_coverage_class
int ret = 0;
might_sleep();
+ trace_drv_set_coverage_class(local, value);
if (local->ops->set_coverage_class)
local->ops->set_coverage_class(&local->hw, value);
else
ret = -EOPNOTSUPP;
- trace_drv_set_coverage_class(local, value, ret);
+ trace_drv_return_int(local, ret);
return ret;
}
@@ -254,9 +271,10 @@ static inline void drv_sta_notify(struct
enum sta_notify_cmd cmd,
struct ieee80211_sta *sta)
{
+ trace_drv_sta_notify(local, sdata, cmd, sta);
if (local->ops->sta_notify)
local->ops->sta_notify(&local->hw, &sdata->vif, cmd, sta);
- trace_drv_sta_notify(local, sdata, cmd, sta);
+ trace_drv_return_void(local);
}
static inline int drv_sta_add(struct ieee80211_local *local,
@@ -267,10 +285,11 @@ static inline int drv_sta_add(struct iee
might_sleep();
+ trace_drv_sta_add(local, sdata, sta);
if (local->ops->sta_add)
ret = local->ops->sta_add(&local->hw, &sdata->vif, sta);
- trace_drv_sta_add(local, sdata, sta, ret);
+ trace_drv_return_int(local, ret);
return ret;
}
@@ -281,10 +300,11 @@ static inline void drv_sta_remove(struct
{
might_sleep();
+ trace_drv_sta_remove(local, sdata, sta);
if (local->ops->sta_remove)
local->ops->sta_remove(&local->hw, &sdata->vif, sta);
- trace_drv_sta_remove(local, sdata, sta);
+ trace_drv_return_void(local);
}
static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue,
@@ -294,9 +314,10 @@ static inline int drv_conf_tx(struct iee
might_sleep();
+ trace_drv_conf_tx(local, queue, params);
if (local->ops->conf_tx)
ret = local->ops->conf_tx(&local->hw, queue, params);
- trace_drv_conf_tx(local, queue, params, ret);
+ trace_drv_return_int(local, ret);
return ret;
}
@@ -306,9 +327,10 @@ static inline u64 drv_get_tsf(struct iee
might_sleep();
+ trace_drv_get_tsf(local);
if (local->ops->get_tsf)
ret = local->ops->get_tsf(&local->hw);
- trace_drv_get_tsf(local, ret);
+ trace_drv_return_u64(local, ret);
return ret;
}
@@ -316,18 +338,20 @@ static inline void drv_set_tsf(struct ie
{
might_sleep();
+ trace_drv_set_tsf(local, tsf);
if (local->ops->set_tsf)
local->ops->set_tsf(&local->hw, tsf);
- trace_drv_set_tsf(local, tsf);
+ trace_drv_return_void(local);
}
static inline void drv_reset_tsf(struct ieee80211_local *local)
{
might_sleep();
+ trace_drv_reset_tsf(local);
if (local->ops->reset_tsf)
local->ops->reset_tsf(&local->hw);
- trace_drv_reset_tsf(local);
+ trace_drv_return_void(local);
}
static inline int drv_tx_last_beacon(struct ieee80211_local *local)
@@ -336,9 +360,10 @@ static inline int drv_tx_last_beacon(str
might_sleep();
+ trace_drv_tx_last_beacon(local);
if (local->ops->tx_last_beacon)
ret = local->ops->tx_last_beacon(&local->hw);
- trace_drv_tx_last_beacon(local, ret);
+ trace_drv_return_int(local, ret);
return ret;
}
@@ -352,11 +377,14 @@ static inline int drv_ampdu_action(struc
might_sleep();
+ trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn);
+
if (local->ops->ampdu_action)
ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action,
sta, tid, ssn);
- trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn, ret);
+ trace_drv_return_int(local, ret);
+
return ret;
}
@@ -385,6 +413,7 @@ static inline void drv_flush(struct ieee
trace_drv_flush(local, drop);
if (local->ops->flush)
local->ops->flush(&local->hw, drop);
+ trace_drv_return_void(local);
}
static inline void drv_channel_switch(struct ieee80211_local *local,
@@ -392,9 +421,9 @@ static inline void drv_channel_switch(st
{
might_sleep();
- local->ops->channel_switch(&local->hw, ch_switch);
-
trace_drv_channel_switch(local, ch_switch);
+ local->ops->channel_switch(&local->hw, ch_switch);
+ trace_drv_return_void(local);
}
#endif /* __MAC80211_DRIVER_OPS */
--- wireless-testing.orig/net/mac80211/driver-trace.h 2010-06-09 21:07:00.000000000 +0200
+++ wireless-testing/net/mac80211/driver-trace.h 2010-06-10 10:54:33.000000000 +0200
@@ -36,20 +36,58 @@ static inline void trace_ ## name(proto)
* Tracing for driver callbacks.
*/
-TRACE_EVENT(drv_start,
- TP_PROTO(struct ieee80211_local *local, int ret),
+TRACE_EVENT(drv_return_void,
+ TP_PROTO(struct ieee80211_local *local),
+ TP_ARGS(local),
+ TP_STRUCT__entry(
+ LOCAL_ENTRY
+ ),
+ TP_fast_assign(
+ LOCAL_ASSIGN;
+ ),
+ TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
+);
+TRACE_EVENT(drv_return_int,
+ TP_PROTO(struct ieee80211_local *local, int ret),
TP_ARGS(local, ret),
-
TP_STRUCT__entry(
LOCAL_ENTRY
__field(int, ret)
),
+ TP_fast_assign(
+ LOCAL_ASSIGN;
+ __entry->ret = ret;
+ ),
+ TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
+);
+TRACE_EVENT(drv_return_u64,
+ TP_PROTO(struct ieee80211_local *local, u64 ret),
+ TP_ARGS(local, ret),
+ TP_STRUCT__entry(
+ LOCAL_ENTRY
+ __field(u64, ret)
+ ),
TP_fast_assign(
LOCAL_ASSIGN;
__entry->ret = ret;
),
+ TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
+);
+
+TRACE_EVENT(drv_start,
+ TP_PROTO(struct ieee80211_local *local),
+
+ TP_ARGS(local),
+
+ TP_STRUCT__entry(
+ LOCAL_ENTRY
+ ),
+
+ TP_fast_assign(
+ LOCAL_ASSIGN;
+ ),
TP_printk(
LOCAL_PR_FMT, LOCAL_PR_ARG
@@ -76,28 +114,25 @@ TRACE_EVENT(drv_stop,
TRACE_EVENT(drv_add_interface,
TP_PROTO(struct ieee80211_local *local,
- struct ieee80211_sub_if_data *sdata,
- int ret),
+ struct ieee80211_sub_if_data *sdata),
- TP_ARGS(local, sdata, ret),
+ TP_ARGS(local, sdata),
TP_STRUCT__entry(
LOCAL_ENTRY
VIF_ENTRY
__array(char, addr, 6)
- __field(int, ret)
),
TP_fast_assign(
LOCAL_ASSIGN;
VIF_ASSIGN;
memcpy(__entry->addr, sdata->vif.addr, 6);
- __entry->ret = ret;
),
TP_printk(
- LOCAL_PR_FMT VIF_PR_FMT " addr:%pM ret:%d",
- LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr, __entry->ret
+ LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
+ LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
)
);
@@ -126,15 +161,13 @@ TRACE_EVENT(drv_remove_interface,
TRACE_EVENT(drv_config,
TP_PROTO(struct ieee80211_local *local,
- u32 changed,
- int ret),
+ u32 changed),
- TP_ARGS(local, changed, ret),
+ TP_ARGS(local, changed),
TP_STRUCT__entry(
LOCAL_ENTRY
__field(u32, changed)
- __field(int, ret)
__field(u32, flags)
__field(int, power_level)
__field(int, dynamic_ps_timeout)
@@ -150,7 +183,6 @@ TRACE_EVENT(drv_config,
TP_fast_assign(
LOCAL_ASSIGN;
__entry->changed = changed;
- __entry->ret = ret;
__entry->flags = local->hw.conf.flags;
__entry->power_level = local->hw.conf.power_level;
__entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
@@ -164,8 +196,8 @@ TRACE_EVENT(drv_config,
),
TP_printk(
- LOCAL_PR_FMT " ch:%#x freq:%d ret:%d",
- LOCAL_PR_ARG, __entry->changed, __entry->center_freq, __entry->ret
+ LOCAL_PR_FMT " ch:%#x freq:%d",
+ LOCAL_PR_ARG, __entry->changed, __entry->center_freq
)
);
@@ -221,50 +253,44 @@ TRACE_EVENT(drv_bss_info_changed,
TRACE_EVENT(drv_configure_arp_filter,
TP_PROTO(struct ieee80211_local *local,
- struct ieee80211_sub_if_data *sdata,
- struct in_ifaddr *ifa_list, int ret),
+ struct ieee80211_sub_if_data *sdata),
- TP_ARGS(local, sdata, ifa_list, ret),
+ TP_ARGS(local, sdata),
TP_STRUCT__entry(
LOCAL_ENTRY
VIF_ENTRY
- __field(int, ret)
),
TP_fast_assign(
LOCAL_ASSIGN;
VIF_ASSIGN;
- __entry->ret = ret;
),
TP_printk(
- VIF_PR_FMT LOCAL_PR_FMT " ret:%d",
- VIF_PR_ARG, LOCAL_PR_ARG, __entry->ret
+ VIF_PR_FMT LOCAL_PR_FMT,
+ VIF_PR_ARG, LOCAL_PR_ARG
)
);
TRACE_EVENT(drv_prepare_multicast,
- TP_PROTO(struct ieee80211_local *local, int mc_count, u64 ret),
+ TP_PROTO(struct ieee80211_local *local, int mc_count),
- TP_ARGS(local, mc_count, ret),
+ TP_ARGS(local, mc_count),
TP_STRUCT__entry(
LOCAL_ENTRY
__field(int, mc_count)
- __field(u64, ret)
),
TP_fast_assign(
LOCAL_ASSIGN;
__entry->mc_count = mc_count;
- __entry->ret = ret;
),
TP_printk(
- LOCAL_PR_FMT " prepare mc (%d): %llx",
- LOCAL_PR_ARG, __entry->mc_count,
- (unsigned long long) __entry->ret
+ LOCAL_PR_FMT " prepare mc (%d)",
+ LOCAL_PR_ARG, __entry->mc_count
)
);
@@ -298,27 +324,25 @@ TRACE_EVENT(drv_configure_filter,
TRACE_EVENT(drv_set_tim,
TP_PROTO(struct ieee80211_local *local,
- struct ieee80211_sta *sta, bool set, int ret),
+ struct ieee80211_sta *sta, bool set),
- TP_ARGS(local, sta, set, ret),
+ TP_ARGS(local, sta, set),
TP_STRUCT__entry(
LOCAL_ENTRY
STA_ENTRY
__field(bool, set)
- __field(int, ret)
),
TP_fast_assign(
LOCAL_ASSIGN;
STA_ASSIGN;
__entry->set = set;
- __entry->ret = ret;
),
TP_printk(
- LOCAL_PR_FMT STA_PR_FMT " set:%d ret:%d",
- LOCAL_PR_ARG, STA_PR_FMT, __entry->set, __entry->ret
+ LOCAL_PR_FMT STA_PR_FMT " set:%d",
+ LOCAL_PR_ARG, STA_PR_FMT, __entry->set
)
);
@@ -326,9 +350,9 @@ TRACE_EVENT(drv_set_key,
TP_PROTO(struct ieee80211_local *local,
enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta *sta,
- struct ieee80211_key_conf *key, int ret),
+ struct ieee80211_key_conf *key),
- TP_ARGS(local, cmd, sdata, sta, key, ret),
+ TP_ARGS(local, cmd, sdata, sta, key),
TP_STRUCT__entry(
LOCAL_ENTRY
@@ -338,7 +362,6 @@ TRACE_EVENT(drv_set_key,
__field(u8, hw_key_idx)
__field(u8, flags)
__field(s8, keyidx)
- __field(int, ret)
),
TP_fast_assign(
@@ -349,12 +372,11 @@ TRACE_EVENT(drv_set_key,
__entry->flags = key->flags;
__entry->keyidx = key->keyidx;
__entry->hw_key_idx = key->hw_key_idx;
- __entry->ret = ret;
),
TP_printk(
- LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ret:%d",
- LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ret
+ LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
+ LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
)
);
@@ -389,25 +411,23 @@ TRACE_EVENT(drv_update_tkip_key,
TRACE_EVENT(drv_hw_scan,
TP_PROTO(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata,
- struct cfg80211_scan_request *req, int ret),
+ struct cfg80211_scan_request *req),
- TP_ARGS(local, sdata, req, ret),
+ TP_ARGS(local, sdata, req),
TP_STRUCT__entry(
LOCAL_ENTRY
VIF_ENTRY
- __field(int, ret)
),
TP_fast_assign(
LOCAL_ASSIGN;
VIF_ASSIGN;
- __entry->ret = ret;
),
TP_printk(
- LOCAL_PR_FMT VIF_PR_FMT " ret:%d",
- LOCAL_PR_ARG,VIF_PR_ARG, __entry->ret
+ LOCAL_PR_FMT VIF_PR_FMT,
+ LOCAL_PR_ARG,VIF_PR_ARG
)
);
@@ -504,48 +524,44 @@ TRACE_EVENT(drv_get_tkip_seq,
);
TRACE_EVENT(drv_set_rts_threshold,
- TP_PROTO(struct ieee80211_local *local, u32 value, int ret),
+ TP_PROTO(struct ieee80211_local *local, u32 value),
- TP_ARGS(local, value, ret),
+ TP_ARGS(local, value),
TP_STRUCT__entry(
LOCAL_ENTRY
__field(u32, value)
- __field(int, ret)
),
TP_fast_assign(
LOCAL_ASSIGN;
- __entry->ret = ret;
__entry->value = value;
),
TP_printk(
- LOCAL_PR_FMT " value:%d ret:%d",
- LOCAL_PR_ARG, __entry->value, __entry->ret
+ LOCAL_PR_FMT " value:%d",
+ LOCAL_PR_ARG, __entry->value
)
);
TRACE_EVENT(drv_set_coverage_class,
- TP_PROTO(struct ieee80211_local *local, u8 value, int ret),
+ TP_PROTO(struct ieee80211_local *local, u8 value),
- TP_ARGS(local, value, ret),
+ TP_ARGS(local, value),
TP_STRUCT__entry(
LOCAL_ENTRY
__field(u8, value)
- __field(int, ret)
),
TP_fast_assign(
LOCAL_ASSIGN;
- __entry->ret = ret;
__entry->value = value;
),
TP_printk(
- LOCAL_PR_FMT " value:%d ret:%d",
- LOCAL_PR_ARG, __entry->value, __entry->ret
+ LOCAL_PR_FMT " value:%d",
+ LOCAL_PR_ARG, __entry->value
)
);
@@ -580,27 +596,25 @@ TRACE_EVENT(drv_sta_notify,
TRACE_EVENT(drv_sta_add,
TP_PROTO(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata,
- struct ieee80211_sta *sta, int ret),
+ struct ieee80211_sta *sta),
- TP_ARGS(local, sdata, sta, ret),
+ TP_ARGS(local, sdata, sta),
TP_STRUCT__entry(
LOCAL_ENTRY
VIF_ENTRY
STA_ENTRY
- __field(int, ret)
),
TP_fast_assign(
LOCAL_ASSIGN;
VIF_ASSIGN;
STA_ASSIGN;
- __entry->ret = ret;
),
TP_printk(
- LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ret:%d",
- LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ret
+ LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
+ LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
)
);
@@ -631,10 +645,9 @@ TRACE_EVENT(drv_sta_remove,
TRACE_EVENT(drv_conf_tx,
TP_PROTO(struct ieee80211_local *local, u16 queue,
- const struct ieee80211_tx_queue_params *params,
- int ret),
+ const struct ieee80211_tx_queue_params *params),
- TP_ARGS(local, queue, params, ret),
+ TP_ARGS(local, queue, params),
TP_STRUCT__entry(
LOCAL_ENTRY
@@ -643,13 +656,11 @@ TRACE_EVENT(drv_conf_tx,
__field(u16, cw_min)
__field(u16, cw_max)
__field(u8, aifs)
- __field(int, ret)
),
TP_fast_assign(
LOCAL_ASSIGN;
__entry->queue = queue;
- __entry->ret = ret;
__entry->txop = params->txop;
__entry->cw_max = params->cw_max;
__entry->cw_min = params->cw_min;
@@ -657,29 +668,27 @@ TRACE_EVENT(drv_conf_tx,
),
TP_printk(
- LOCAL_PR_FMT " queue:%d ret:%d",
- LOCAL_PR_ARG, __entry->queue, __entry->ret
+ LOCAL_PR_FMT " queue:%d",
+ LOCAL_PR_ARG, __entry->queue
)
);
TRACE_EVENT(drv_get_tsf,
- TP_PROTO(struct ieee80211_local *local, u64 ret),
+ TP_PROTO(struct ieee80211_local *local),
- TP_ARGS(local, ret),
+ TP_ARGS(local),
TP_STRUCT__entry(
LOCAL_ENTRY
- __field(u64, ret)
),
TP_fast_assign(
LOCAL_ASSIGN;
- __entry->ret = ret;
),
TP_printk(
- LOCAL_PR_FMT " ret:%llu",
- LOCAL_PR_ARG, (unsigned long long)__entry->ret
+ LOCAL_PR_FMT,
+ LOCAL_PR_ARG
)
);
@@ -723,23 +732,21 @@ TRACE_EVENT(drv_reset_tsf,
);
TRACE_EVENT(drv_tx_last_beacon,
- TP_PROTO(struct ieee80211_local *local, int ret),
+ TP_PROTO(struct ieee80211_local *local),
- TP_ARGS(local, ret),
+ TP_ARGS(local),
TP_STRUCT__entry(
LOCAL_ENTRY
- __field(int, ret)
),
TP_fast_assign(
LOCAL_ASSIGN;
- __entry->ret = ret;
),
TP_printk(
- LOCAL_PR_FMT " ret:%d",
- LOCAL_PR_ARG, __entry->ret
+ LOCAL_PR_FMT,
+ LOCAL_PR_ARG
)
);
@@ -748,9 +755,9 @@ TRACE_EVENT(drv_ampdu_action,
struct ieee80211_sub_if_data *sdata,
enum ieee80211_ampdu_mlme_action action,
struct ieee80211_sta *sta, u16 tid,
- u16 *ssn, int ret),
+ u16 *ssn),
- TP_ARGS(local, sdata, action, sta, tid, ssn, ret),
+ TP_ARGS(local, sdata, action, sta, tid, ssn),
TP_STRUCT__entry(
LOCAL_ENTRY
@@ -758,7 +765,6 @@ TRACE_EVENT(drv_ampdu_action,
__field(u32, action)
__field(u16, tid)
__field(u16, ssn)
- __field(int, ret)
VIF_ENTRY
),
@@ -766,15 +772,14 @@ TRACE_EVENT(drv_ampdu_action,
LOCAL_ASSIGN;
VIF_ASSIGN;
STA_ASSIGN;
- __entry->ret = ret;
__entry->action = action;
__entry->tid = tid;
__entry->ssn = ssn ? *ssn : 0;
),
TP_printk(
- LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d ret:%d",
- LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, __entry->tid, __entry->ret
+ LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d",
+ LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, __entry->tid
)
);
^ permalink raw reply
* Re: [RFC 3/3] mac80211: Store basic rates for bss when joining ibss network
From: Teemu Paasikivi @ 2010-06-10 11:37 UTC (permalink / raw)
To: ext Johannes Berg; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
In-Reply-To: <1276069016.3727.3.camel@jlt3.sipsolutions.net>
On Wed, 2010-06-09 at 09:36 +0200, ext Johannes Berg wrote:
> On Wed, 2010-06-09 at 07:45 +0300, Teemu Paasikivi wrote:
>
> > > However this kinda confuses me.
> > >
> > > We had a long-standing TODO item on our list at
> > > http://wireless.kernel.org/en/developers/todo-list
> > >
> > > "when leaving an IBSS and we were the only member, remove it from
> > > cfg80211's BSS list"
> > >
> > > Maybe that would help here too?
> > >
> >
> > Yes, I think that would propably solve that issue where IBSS was
> > recreated and requested basic rates are changed.
>
> Want to take a look at it? It shouldn't be too hard -- just call
> cfg80211_unlink_bss() somewhere where we still have the BSS pointer.
> Actually we don't keep it as you saw with the update, so need to find it
> first and then unlink it.
>
I'll take a look at this. I think BSS can be got by the same method as
in the ieee80211_sta_find_ibss function.
> > > However I don't understand the scenario anyway. If you create an IBSS,
> > > you start beaconing and tell cfg80211 about it with a frame that
> > > includes the supported and basic rates. Then you leave, but the BSS
> > > stays around in cfg80211 for 15 seconds. If you re-join within those 15
> > > seconds, the scan results will pick up the old IBSS that no longer
> > > exists, and we "join" it rather than creating it.
> > >
> > > However -- joining it will take the basic rates from it. So wouldn't you
> > > get the old basic rates which is fine? What do you mean by "left unset"?
> > >
> >
> > By "left unset" I mean that in the sniffer logs there's no rates marked
> > as basic rates in the beacons. No old ones or new ones.
>
> Ok that's what I thought. But ... are they marked in our TX beacons when
> we _first_ created the IBSS?
Yes those were marked. In any case, lets see if this is an issue after
implementing that removal of the BSS from the cfg80211's list.
>
> > > What happens if you join an IBSS that already exists?
> > >
> >
> > It works, but I haven't captured what's in the air. That's one reason
> > why I sent these patches as RFC.
>
> I don't really see how the two scenarios differ, so that's odd...
>
> johannes
>
Teemu
^ permalink raw reply
* [PATCH]: libertas_tf: Fix warning in lbtf_rx for stats struct
From: Prarit Bhargava @ 2010-06-10 12:08 UTC (permalink / raw)
To: linux-wireless, linville; +Cc: Prarit Bhargava
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 947 bytes --]
Fixes linux-2.6 warning:
drivers/net/wireless/libertas_tf/main.c: In function ‘lbtf_rx’:
drivers/net/wireless/libertas_tf/main.c:578: warning: ‘stats.antenna’ is used uninitialized in this function
drivers/net/wireless/libertas_tf/main.c:578: warning: ‘stats.mactime’ is used uninitialized in this function
stats struct needs to be set to 0 before use.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index 019431d..52d7c5c 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -488,7 +488,7 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
prxpd = (struct rxpd *) skb->data;
- stats.flag = 0;
+ memset(&stats, 0, sizeof(stats));
if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK)))
stats.flag |= RX_FLAG_FAILED_FCS_CRC;
stats.freq = priv->cur_freq;
^ permalink raw reply related
* Support for the Linksys WUSB300N?
From: Thomas Fjellstrom @ 2010-06-10 12:53 UTC (permalink / raw)
To: linux-wireless
I have recently acquired a WUSB300N, and was wondering what the status is on
linux support for this device.
It's chipset (Marvell 88w8362) seems to be supported, but over PCI/PCIe only
so far. Is anyone working on USB variants? I'm willing to help test anything
anyone might be working on.
Thanks
--
Thomas Fjellstrom
tfjellstrom@shaw.ca
^ permalink raw reply
* Re: kernel BUG in iwl-agn-rs.c:2076, WAS: iwlagn + some accesspoint == hardlock
From: Nils Radtke @ 2010-06-10 14:22 UTC (permalink / raw)
To: reinette chatre
Cc: linville@tuxdriver.com, linux-kernel@vger.kernel.org,
linux-wireless@vger.kernel.org
In-Reply-To: <1276019189.1835.11781.camel@rchatre-DESK>
Hi Reinette,
Thanks for your message.
Yes, you're right about the multiple bugs one thread thing.
Just today I got registered w/ the wireless ml because the
system just did not send me a registration message.
For the bug reports to be created it will take me some time.
I'll firstly report the main issue, the 2 other ones afterwards.
Would it be ok cross referencing i.e. to the log and such
between the reports?
Should I paste all the mail messages in separate report messages
(belonging to one bug report, of course) or should I paste some
links to the thread?
Cheers,
Nils
@John: Yes, you're right but the 2.6.33.4 tree which for me still
has the bug_on in.
On Tue 2010-06-08 @ 10-46-29AM -0700, reinette chatre wrote:
# On Fri, 2010-06-04 at 09:57 -0700, Nils Radtke wrote:
# > I haven't yet received a comment of yours regarding my many other questions in
# > my previous message. I am willing to help investigate more, assist in other ways
# > than testing only (always only doing testing isn't a way to keep up fun..)
#
# Your messages contain references to many issues and it is becoming
# increasingly hard to keep track of them all in a single email thread.
# Since the system crash is clearly the big issue I would like to focus on
# that and get that resolved. This is why I proposed that you create bug
# reports to help track your various issues better.
#
# Reinette
#
#
--
^ permalink raw reply
* Re: Support for the Linksys WUSB300N?
From: John W. Linville @ 2010-06-10 14:15 UTC (permalink / raw)
To: Thomas Fjellstrom; +Cc: linux-wireless
In-Reply-To: <201006100653.48734.tfjellstrom@shaw.ca>
On Thu, Jun 10, 2010 at 06:53:48AM -0600, Thomas Fjellstrom wrote:
> I have recently acquired a WUSB300N, and was wondering what the status is on
> linux support for this device.
>
> It's chipset (Marvell 88w8362) seems to be supported, but over PCI/PCIe only
> so far. Is anyone working on USB variants? I'm willing to help test anything
> anyone might be working on.
I'm not aware of anything in progress for this. :-( In fact, even the
PCI variant seems to mostly be getting random maintenance (e.g. API
changes) from the community rather than any support from Marvell.
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: [PATCH] wireless: orphan ipw2x00 drivers
From: reinette chatre @ 2010-06-10 16:10 UTC (permalink / raw)
To: Zhu Yi; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
In-Reply-To: <1276134269-2273-1-git-send-email-yi.zhu@intel.com>
On Wed, 2010-06-09 at 18:44 -0700, Zhu Yi wrote:
> Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Not sure if it is needed but the sourceforge pages will still have the
firmware available for download. We are in process of cleaning those
pages up.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Reinette
^ permalink raw reply
* Re: kernel BUG in iwl-agn-rs.c:2076, WAS: iwlagn + some accesspoint == hardlock
From: reinette chatre @ 2010-06-10 16:19 UTC (permalink / raw)
To: Nils Radtke
Cc: linville@tuxdriver.com, linux-kernel@vger.kernel.org,
linux-wireless@vger.kernel.org
In-Reply-To: <20100610142254.GD4452@localhost>
On Thu, 2010-06-10 at 07:22 -0700, Nils Radtke wrote:
> For the bug reports to be created it will take me some time.
> I'll firstly report the main issue, the 2 other ones afterwards.
Sounds great. Thanks
> Would it be ok cross referencing i.e. to the log and such
> between the reports?
> Should I paste all the mail messages in separate report messages
> (belonging to one bug report, of course) or should I paste some
> links to the thread?
I find it most convenient if all information related to the bug is
contained in the bug report. Links can be used.
Reinette
^ permalink raw reply
* Re: [PATCHv4] mac80211: Fix circular locking dependency in ARP filter handling
From: reinette chatre @ 2010-06-10 16:23 UTC (permalink / raw)
To: Juuso Oikarinen; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
In-Reply-To: <1276147838.5277.34297.camel@wimaxnb.nmp.nokia.com>
On Wed, 2010-06-09 at 22:30 -0700, Juuso Oikarinen wrote:
> On Thu, 2010-06-10 at 07:21 +0200, Juuso Oikarinen wrote:
> > On Thu, 2010-06-10 at 01:27 +0200, ext reinette chatre wrote:
> > > Even so, I tested your new patch and for some reason the BUG returned
> > > (even though I am now running with "mac80211: Add netif state checking
> > > to ieee80211_ifa_changed"
> >
> > This is curious. In your source (mine does not seem to fully match what
> > you are using) what is the BUG that is getting triggered, main.c:437 ?
>
> Oh, and did you remember to apply the fix patch for the bug too, as it
> seems not yet be integrated to wireless-testing:
>
> "mac80211: Add netif state checking to ieee80211_ifa_changed"
>
I am running with that patch .... see my comment above ;)
Reinette
^ permalink raw reply
* Re: [PATCHv4] mac80211: Fix circular locking dependency in ARP filter handling
From: reinette chatre @ 2010-06-10 17:28 UTC (permalink / raw)
To: Juuso Oikarinen; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
In-Reply-To: <1276147255.5277.34285.camel@wimaxnb.nmp.nokia.com>
Hi Juuso,
On Wed, 2010-06-09 at 22:20 -0700, Juuso Oikarinen wrote:
> This is curious. In your source (mine does not seem to fully match what
> you are using) what is the BUG that is getting triggered, main.c:437 ?
Strange ... in my source that is a weird line number also. I think I
know what happened ... after applying your patch my habits took over and
I only rebuilt the driver, not mac80211. I am very sorry for my previous
false report.
I rebuilt everything cleanly. After doing so I have not encountered any
issues.
Thank you very much
Tested-by: Reinette Chatre <reinette.chatre@intel.com>
Reinette
^ permalink raw reply
* compat-wireless: Enabled RT3[05]xx support in rt2800pci driver
From: Richard Farina @ 2010-06-10 17:52 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org, Luis R. Rodriguez
commit 3e5212c1d07909478c38c6b606ccc9d88b2a7297
Author: Rick Farina <sidhayn@gmail.com>
Date: Thu Jun 10 13:46:33 2010 -0400
Enable CONFIG_RT2800PCI_RT30XX and CONFIG_RT2800PCI_RT35XX. This
change has been
compile tested only as I do not personally own this hardware.
Added additional note about requirements to safely enable
CONFIG_RT2800PCI_SOC.
Signed-off-by: Rick Farina
diff --git a/config.mk b/config.mk
index 0001a7d..42ca58e 100644
--- a/config.mk
+++ b/config.mk
@@ -270,8 +270,11 @@ CONFIG_RT2500PCI=m
ifneq ($(CONFIG_CRC_CCITT),)
CONFIG_RT2800PCI=m
CONFIG_RT2800PCI_PCI=y
-# CONFIG_RT2800PCI_RT30XX=y
-# CONFIG_RT2800PCI_RT35XX=y
+CONFIG_RT2800PCI_RT30XX=y
+CONFIG_RT2800PCI_RT35XX=y
+# XXX: This config param needs to be activated only if
+# RALINK_RT288X || RALINK_RT305X but the Makefile doesn't
+# support this yet.
# CONFIG_RT2800PCI_SOC=y
endif
NEED_RT2X00=y
^ permalink raw reply related
* Re: Support for the Linksys WUSB300N?
From: Thomas Fjellstrom @ 2010-06-10 18:04 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
In-Reply-To: <20100610141526.GC28553@tuxdriver.com>
On June 10, 2010, John W. Linville wrote:
> On Thu, Jun 10, 2010 at 06:53:48AM -0600, Thomas Fjellstrom wrote:
> > I have recently acquired a WUSB300N, and was wondering what the status
> > is on linux support for this device.
> >
> > It's chipset (Marvell 88w8362) seems to be supported, but over PCI/PCIe
> > only so far. Is anyone working on USB variants? I'm willing to help
> > test anything anyone might be working on.
>
> I'm not aware of anything in progress for this. :-( In fact, even the
> PCI variant seems to mostly be getting random maintenance (e.g. API
> changes) from the community rather than any support from Marvell.
>
> John
Thats too bad. Well I did get the thing for free. So theres noone at all
working on this chipset specifically? Is there any information/documentation
available? It might be interesting to see if I can manage to hack something
together (total kernel programming n00b, but I do C relatively well).
--
Thomas Fjellstrom
tfjellstrom@shaw.ca
^ permalink raw reply
* Re: iwl3945 bug in 2.6.34
From: Satish Eerpini @ 2010-06-10 18:49 UTC (permalink / raw)
To: reinette chatre; +Cc: linux-kernel, linux-wireless@vger.kernel.org
In-Reply-To: <1275600737.2091.32332.camel@rchatre-DESK>
I have applied the patches to the 2.6.34 kernel, my machine has been
up for 20 hours now, there is nothing in the dmesg either, dmesg |
grep wlan0 just gives this :
ADDRCONF(NETDEV_UP): wlan0: link is not ready
wlan0: deauthenticating from 00:1b:da:2a:a1:53 by local choice (reason=3)
wlan0: authenticate with 00:1b:da:2a:a1:53 (try 1)
wlan0: authenticated
wlan0: associate with 00:1b:da:2a:a1:53 (try 1)
wlan0: RX AssocResp from 00:1b:da:2a:a1:53 (capab=0x411 status=0 aid=1)
wlan0: associated
ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
wlan0: no IPv6 routers present
wlan0: deauthenticating from 00:1b:da:2a:a1:53 by local choice (reason=3)
ADDRCONF(NETDEV_UP): wlan0: link is not ready
wlan0: deauthenticating from 00:1b:da:2a:a1:53 by local choice (reason=3)
wlan0: authenticate with 00:1b:da:2a:a1:53 (try 1)
wlan0: authenticated
wlan0: associate with 00:1b:da:2a:a1:53 (try 1)
wlan0: RX AssocResp from 00:1b:da:2a:a1:53 (capab=0x411 status=0 aid=1)
wlan0: associated
ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
wlan0: no IPv6 routers present
wlan0: authenticate with 00:1b:da:2a:a1:53 (try 1)
wlan0: authenticated
wlan0: associate with 00:1b:da:2a:a1:53 (try 1)
wlan0: RX AssocResp from 00:1b:da:2a:a1:53 (capab=0x411 status=0 aid=1)
wlan0: associated
wlan0: authenticate with 00:1b:da:2a:a1:53 (try 1)
wlan0: authenticated
wlan0: associate with 00:1b:da:2a:a1:53 (try 1)
wlan0: RX AssocResp from 00:1b:da:2a:a1:53 (capab=0x411 status=0 aid=1)
wlan0: associated
so I think after applying the patches, things have been working fine.
Cheers
Satish
--
http://satisheerpini.net
^ permalink raw reply
* [rt2800pci] indirect register access failed
From: Vladimir Botka @ 2010-06-10 22:13 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
Hallo,
with the wireless-testing kernel [1] and the ralink [1814:3090] I can
not load the firmware [2]. Any idea ?
[1] 2.6.35-rc2-wl-wt-ralink+
[2]
Jun 11 00:07:10 calpella kernel: [ 6828.735900] phy0 -> rt2800pci_load_firmware: Error - PBF system register not ready.
Jun 11 00:07:10 calpella kernel: [ 6828.736466] phy0 -> rt2x00pci_regbusy_read: Error - Indirect register access failed: offset=0x00007010, value=0x55555555
Thank you,
^ permalink raw reply
* [PATCH] p54usb: Remove duplicate Medion MD40900 device id
From: Leann Ogasawara @ 2010-06-10 22:28 UTC (permalink / raw)
To: John W. Linville, flamingice; +Cc: linux-wireless
The Medion MD40900 device id [0x0cde, 0x0006] is defined twice. Remove
the duplicate.
Originally-by: Ben Collins <ben.collins@ubuntu.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
---
drivers/net/wireless/p54/p54usb.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index 7307325..d6d8713 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -69,7 +69,6 @@ static struct usb_device_id p54u_table[] __devinitdata = {
{USB_DEVICE(0x0915, 0x2002)}, /* Cohiba Proto board */
{USB_DEVICE(0x0baf, 0x0118)}, /* U.S. Robotics U5 802.11g Adapter*/
{USB_DEVICE(0x0bf8, 0x1009)}, /* FUJITSU E-5400 USB D1700*/
- {USB_DEVICE(0x0cde, 0x0006)}, /* Medion MD40900 */
{USB_DEVICE(0x0cde, 0x0008)}, /* Sagem XG703A */
{USB_DEVICE(0x0cde, 0x0015)}, /* Zcomax XG-705A */
{USB_DEVICE(0x0d8e, 0x3762)}, /* DLink DWL-G120 Cohiba */
--
1.7.0.4
^ permalink raw reply related
* Re: [PATCH] p54usb: Remove duplicate Medion MD40900 device id
From: Larry Finger @ 2010-06-10 23:23 UTC (permalink / raw)
To: Leann Ogasawara; +Cc: John W. Linville, flamingice, linux-wireless
In-Reply-To: <1276208913.1221.3646.camel@emiko>
On 06/10/2010 05:28 PM, Leann Ogasawara wrote:
> The Medion MD40900 device id [0x0cde, 0x0006] is defined twice. Remove
> the duplicate.
>
> Originally-by: Ben Collins <ben.collins@ubuntu.com>
> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
> ---
> drivers/net/wireless/p54/p54usb.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
> index 7307325..d6d8713 100644
> --- a/drivers/net/wireless/p54/p54usb.c
> +++ b/drivers/net/wireless/p54/p54usb.c
> @@ -69,7 +69,6 @@ static struct usb_device_id p54u_table[] __devinitdata = {
> {USB_DEVICE(0x0915, 0x2002)}, /* Cohiba Proto board */
> {USB_DEVICE(0x0baf, 0x0118)}, /* U.S. Robotics U5 802.11g Adapter*/
> {USB_DEVICE(0x0bf8, 0x1009)}, /* FUJITSU E-5400 USB D1700*/
> - {USB_DEVICE(0x0cde, 0x0006)}, /* Medion MD40900 */
> {USB_DEVICE(0x0cde, 0x0008)}, /* Sagem XG703A */
> {USB_DEVICE(0x0cde, 0x0015)}, /* Zcomax XG-705A */
> {USB_DEVICE(0x0d8e, 0x3762)}, /* DLink DWL-G120 Cohiba */
Do you know for certain that this device is a Version 1 chip, and for
that reason, you are removing it from the version 2 list?
If not, NACK.
Larry
^ permalink raw reply
* [PATCH] mac80211: Protect Deauthentication frame when using MFP
From: Jouni Malinen @ 2010-06-11 2:44 UTC (permalink / raw)
To: John W. Linville, Johannes Berg; +Cc: linux-wireless
When management frame protection (IEEE 802.11w) is used,
Deauthentication frame needs to be protected when the pairwise key is
configured. mac80211 was removing the station entry (and its keys)
before actually sending out the Deauthentication frame. Fix this by
reordering the code to send the frame before the station entry gets
removed. This matches an earlier change that handled the Disassociation
frame processing, but missed Deauthentication frames.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
---
net/mac80211/mlme.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- wireless-testing.orig/net/mac80211/mlme.c 2010-06-10 18:09:38.000000000 -0700
+++ wireless-testing/net/mac80211/mlme.c 2010-06-10 18:35:20.000000000 -0700
@@ -2292,13 +2292,13 @@ int ieee80211_mgd_deauth(struct ieee8021
struct ieee80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
struct ieee80211_work *wk;
- const u8 *bssid = req->bss->bssid;
+ u8 bssid[ETH_ALEN];
mutex_lock(&ifmgd->mtx);
+ memcpy(bssid, req->bss->bssid, ETH_ALEN);
if (ifmgd->associated == req->bss) {
- bssid = req->bss->bssid;
- ieee80211_set_disassoc(sdata, true);
+ ieee80211_set_disassoc(sdata, false);
mutex_unlock(&ifmgd->mtx);
} else {
bool not_auth_yet = false;
@@ -2345,6 +2345,8 @@ int ieee80211_mgd_deauth(struct ieee8021
ieee80211_send_deauth_disassoc(sdata, bssid, IEEE80211_STYPE_DEAUTH,
req->reason_code, cookie,
!req->local_state_change);
+ if (ifmgd->associated == req->bss)
+ sta_info_destroy_addr(sdata, bssid);
ieee80211_recalc_idle(sdata->local);
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply
* [PATCH] mac80211: Use a separate CCMP PN receive counter for management frames
From: Jouni Malinen @ 2010-06-11 2:46 UTC (permalink / raw)
To: John W. Linville, Johannes Berg; +Cc: linux-wireless
When management frame protection (IEEE 802.11w) is used, we must use a
separate counter for tracking received CCMP packet number for the
management frames. The previously used NUM_RX_DATA_QUEUESth queue was
shared with data frames when QoS was not used and that can cause
problems in detecting replays incorrectly for robust management frames.
Add a new counter just for robust management frames to avoid this issue.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
---
net/mac80211/debugfs_key.c | 2 +-
net/mac80211/key.c | 2 +-
net/mac80211/key.h | 2 +-
net/mac80211/rx.c | 9 +++++++--
net/mac80211/wpa.c | 8 ++++++--
5 files changed, 16 insertions(+), 7 deletions(-)
--- wireless-testing.orig/net/mac80211/debugfs_key.c 2010-06-10 17:57:51.000000000 -0700
+++ wireless-testing/net/mac80211/debugfs_key.c 2010-06-10 18:35:33.000000000 -0700
@@ -143,7 +143,7 @@ static ssize_t key_rx_spec_read(struct f
len = p - buf;
break;
case ALG_CCMP:
- for (i = 0; i < NUM_RX_DATA_QUEUES; i++) {
+ for (i = 0; i < NUM_RX_DATA_QUEUES + 1; i++) {
rpn = key->u.ccmp.rx_pn[i];
p += scnprintf(p, sizeof(buf)+buf-p,
"%02x%02x%02x%02x%02x%02x\n",
--- wireless-testing.orig/net/mac80211/key.c 2010-06-10 18:09:38.000000000 -0700
+++ wireless-testing/net/mac80211/key.c 2010-06-10 18:35:33.000000000 -0700
@@ -273,7 +273,7 @@ struct ieee80211_key *ieee80211_key_allo
key->conf.iv_len = CCMP_HDR_LEN;
key->conf.icv_len = CCMP_MIC_LEN;
if (seq) {
- for (i = 0; i < NUM_RX_DATA_QUEUES; i++)
+ for (i = 0; i < NUM_RX_DATA_QUEUES + 1; i++)
for (j = 0; j < CCMP_PN_LEN; j++)
key->u.ccmp.rx_pn[i][j] =
seq[CCMP_PN_LEN - j - 1];
--- wireless-testing.orig/net/mac80211/key.h 2010-06-10 18:09:38.000000000 -0700
+++ wireless-testing/net/mac80211/key.h 2010-06-10 18:35:33.000000000 -0700
@@ -77,7 +77,7 @@ struct ieee80211_key {
} tkip;
struct {
u8 tx_pn[6];
- u8 rx_pn[NUM_RX_DATA_QUEUES][6];
+ u8 rx_pn[NUM_RX_DATA_QUEUES + 1][6];
struct crypto_cipher *tfm;
u32 replays; /* dot11RSNAStatsCCMPReplays */
/* scratch buffers for virt_to_page() (crypto API) */
--- wireless-testing.orig/net/mac80211/rx.c 2010-06-10 18:09:38.000000000 -0700
+++ wireless-testing/net/mac80211/rx.c 2010-06-10 18:35:33.000000000 -0700
@@ -1268,11 +1268,13 @@ ieee80211_rx_h_defragment(struct ieee802
rx->queue, &(rx->skb));
if (rx->key && rx->key->conf.alg == ALG_CCMP &&
ieee80211_has_protected(fc)) {
+ int queue = ieee80211_is_mgmt(fc) ?
+ NUM_RX_DATA_QUEUES : rx->queue;
/* Store CCMP PN so that we can verify that the next
* fragment has a sequential PN value. */
entry->ccmp = 1;
memcpy(entry->last_pn,
- rx->key->u.ccmp.rx_pn[rx->queue],
+ rx->key->u.ccmp.rx_pn[queue],
CCMP_PN_LEN);
}
return RX_QUEUED;
@@ -1292,6 +1294,7 @@ ieee80211_rx_h_defragment(struct ieee802
if (entry->ccmp) {
int i;
u8 pn[CCMP_PN_LEN], *rpn;
+ int queue;
if (!rx->key || rx->key->conf.alg != ALG_CCMP)
return RX_DROP_UNUSABLE;
memcpy(pn, entry->last_pn, CCMP_PN_LEN);
@@ -1300,7 +1303,9 @@ ieee80211_rx_h_defragment(struct ieee802
if (pn[i])
break;
}
- rpn = rx->key->u.ccmp.rx_pn[rx->queue];
+ queue = ieee80211_is_mgmt(fc) ?
+ NUM_RX_DATA_QUEUES : rx->queue;
+ rpn = rx->key->u.ccmp.rx_pn[queue];
if (memcmp(pn, rpn, CCMP_PN_LEN))
return RX_DROP_UNUSABLE;
memcpy(entry->last_pn, pn, CCMP_PN_LEN);
--- wireless-testing.orig/net/mac80211/wpa.c 2010-06-10 17:57:51.000000000 -0700
+++ wireless-testing/net/mac80211/wpa.c 2010-06-10 18:35:33.000000000 -0700
@@ -436,6 +436,7 @@ ieee80211_crypto_ccmp_decrypt(struct iee
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
u8 pn[CCMP_PN_LEN];
int data_len;
+ int queue;
hdrlen = ieee80211_hdrlen(hdr->frame_control);
@@ -453,7 +454,10 @@ ieee80211_crypto_ccmp_decrypt(struct iee
ccmp_hdr2pn(pn, skb->data + hdrlen);
- if (memcmp(pn, key->u.ccmp.rx_pn[rx->queue], CCMP_PN_LEN) <= 0) {
+ queue = ieee80211_is_mgmt(hdr->frame_control) ?
+ NUM_RX_DATA_QUEUES : rx->queue;
+
+ if (memcmp(pn, key->u.ccmp.rx_pn[queue], CCMP_PN_LEN) <= 0) {
key->u.ccmp.replays++;
return RX_DROP_UNUSABLE;
}
@@ -470,7 +474,7 @@ ieee80211_crypto_ccmp_decrypt(struct iee
return RX_DROP_UNUSABLE;
}
- memcpy(key->u.ccmp.rx_pn[rx->queue], pn, CCMP_PN_LEN);
+ memcpy(key->u.ccmp.rx_pn[queue], pn, CCMP_PN_LEN);
/* Remove CCMP header and MIC */
skb_trim(skb, skb->len - CCMP_MIC_LEN);
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox