17 May, 2011
2 commits
-
This adds sparse RCU annotations to most of
mac80211, only the mesh code remains to be
done.Due the the previous patches, the annotations
are pretty simple. The only thing that this
actually changes is removing the RCU usage of
key->sta in debugfs since this pointer isn't
actually an RCU-managed pointer (it only has
a single assignment done before the key even
goes live). As that is otherwise harmless, I
decided to make it part of this patch.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
During my quest to make mac80211 not have any RCU
warnings from sparse, I came across the a-MPDU code
again and it wasn't quite clear why it isn't racy.
So instead of assigning the tid_tx array with just
the spinlock held in ieee80211_start_tx_ba_session
use a separate temporary array protected only by
the spinlock and protect all assignments to the
"live" array by both the spinlock and the mutex so
that other code is easily verified to be correct.Due to pointer assignment atomicity I don't think
this is a real issue, but I'm not sure, especially
on Alpha the current code might be problematic.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
26 Feb, 2011
1 commit
-
We need to copy this to allow drivers to look
at the information where needed.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
14 Oct, 2010
1 commit
-
It looks like I submitted a different patch
than I tested, because clearly the code in
mac80211 is missing actually propagating the
requested SMPS mode. Fix that!Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
07 Oct, 2010
1 commit
-
When roaming while we have active BA session,
we can end up transmitting delBA frames to
the old AP while we're already on the new AP's
channel, which can cause warnings.Simply avoid sending those frames, but still
tear down the internal session state, since
they are not really necessary anyway as we
will implicitly disassociate when sending the
association to the new AP.Signed-off-by: Johannes Berg
Acked-by: Luis R. Rodriguez
Signed-off-by: John W. Linville
17 Aug, 2010
1 commit
-
Sometimes drivers have more information than the
stack about how their antennas/chains are used,
and may require that the SM PS mode be changed.
This could happen, for example, when detecting
that the user disconnected an antenna. Thus this
patch introduces API to allow drivers to request
SM PS mode changes.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
17 Jul, 2010
1 commit
-
This patch will also fix the odd freeze which occurred
when minstrel_ht connects to an 802.11n network with
legacy hardware.Signed-off-by: Christian Lamparter
Signed-off-by: John W. Linville
15 Jun, 2010
6 commits
-
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
Signed-off-by: John W. Linville -
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
Signed-off-by: John W. Linville -
Since we want the code to be able to sleep
in the future, it must not be called from
the timer directly. To prepare, move it out
into the aggregation work.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
Move the block-ack session works into common
code, since it will be needed for RX agg too
in the next patches.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
When the driver or rate control requests starting
or stopping an aggregation session, that currently
causes a direct callback into the driver, which
could potentially cause locking problems. Also,
the functions need to be callable from contexts
that cannot sleep, and thus will interfere with
making the ampdu_action callback sleeping.To address these issues, add a new work item for
each station that will process any start or stop
requests out of line.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
Currently we allocate some memory for each TX
aggregation session and additionally keep a
state bitmap indicating the state it is in.
By using RCU to protect the pointer, moving
the state into the structure and some locking
trickery we can avoid locking when the TX agg
session is fully operational.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
08 Apr, 2010
1 commit
-
All callers of ieee80211_sta_stop_rx_ba_session can
just call __ieee80211_stop_rx_ba_session instead
because they already have the station struct, so do
that and remove ieee80211_sta_stop_rx_ba_session.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
26 Dec, 2009
1 commit
23 Dec, 2009
1 commit
-
Enable spatial multiplexing in mac80211 by telling the
driver what to do and, where necessary, sending action
frames to the AP to update the requested SMPS mode.Also includes a trivial implementation for hwsim that
just logs the requested mode.For now, the userspace interface is in debugfs only,
and let you toggle the requested mode at any time.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
22 Dec, 2009
2 commits
-
For bluetooth 3, we will most likely not have
a netdev for a virtual interface (sdata), so
prepare for that by reducing the reliance on
having a netdev. This patch moves the name
and address fields into the sdata struct and
uses them from there all over. Some work is
needed to keep them sync'ed, but that's not
a lot of work and in slow paths anyway.In doing so, this also reduces the number of
pointer dereferences in many places, because
of things like sdata->dev->dev_addr becoming
sdata->vif.addr.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
I noticed yesterday, because Jeff had noticed
a speed regression, cf. bug
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2138
that the SM PS settings for peers were wrong.
Instead of overwriting the SM PS settings with
the local bits, we need to keep the remote bits.The bug was part of the original HT code from
over two years ago, but unfortunately nobody
noticed that it makes no sense -- we shouldn't
be overwriting the peer's setting with our own
but rather keep it intact when masking the peer
capabilities with our own.While fixing that, I noticed that the masking of
capabilities is completely useless for most of
the bits, so also fix those other bits.Finally, I also noticed that PSMP_SUPPORT no
longer exists in the final 802.11n version, so
also remove that.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
02 Dec, 2009
1 commit
-
Conflicts:
net/mac80211/ht.c
01 Dec, 2009
1 commit
-
Lennert Buytenhek noticed that delBA handling in mac80211
was broken and has remotely triggerable problems, some of
which are due to some code shuffling I did that ended up
changing the order in which things were done -- this wascommit d75636ef9c1af224f1097941879d5a8db7cd04e5
Author: Johannes Berg
Date: Tue Feb 10 21:25:53 2009 +0100mac80211: RX aggregation: clean up stop session
and other parts were already present in the original
commit d92684e66091c0f0101819619b315b4bb8b5bcc5
Author: Ron Rindjunsky
Date: Mon Jan 28 14:07:22 2008 +0200mac80211: A-MPDU Tx add delBA from recipient support
The first problem is that I moved a BUG_ON before various
checks -- thereby making it possible to hit. As the comment
indicates, the BUG_ON can be removed since the ampdu_action
callback must already exist when the state is != IDLE.The second problem isn't easily exploitable but there's a
race condition due to unconditionally setting the state to
OPERATIONAL when a delBA frame is received, even when no
aggregation session was ever initiated. All the drivers
accept stopping the session even then, but that opens a
race window where crashes could happen before the driver
accepts it. Right now, a WARN_ON may happen with non-HT
drivers, while the race opens only for HT drivers.For this case, there are two things necessary to fix it:
1) don't process spurious delBA frames, and be more careful
about the session state; don't drop the lock2) HT drivers need to be prepared to handle a session stop
even before the session was really started -- this is
true for all drivers (that support aggregation) but
iwlwifi which can be fixed easily. The other HT drivers
(ath9k and ar9170) are behaving properly already.Reported-by: Lennert Buytenhek
Cc: stable@kernel.org
Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
19 Nov, 2009
2 commits
-
Since the flags moved into skb->cb, there's no
longer a need to have the encrypt bool passed
into the function, anyone who requires it set
to 0 (false) can just set the flag directly.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
The entire aggregation code currently operates on the
hw pointer and station addresses, but that needs to
change to make stations purely per-vif; As one step
preparing for that make the aggregation code callable
with the station, or by the combination of virtual
interface and station address.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
31 Oct, 2009
1 commit
-
When HT debugging is enabled and we receive a DelBA
frame we print out the reason code in the wrong byte
order. Fix that so we don't get weird values printed.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
23 Apr, 2009
2 commits
-
Trying to separate header files into net/wireless.h and
net/cfg80211.h has been a source of confusion. Remove
net/wireless.h (because there also is the linux/wireless.h)
and subsume everything into net/cfg80211.h -- except the
definitions for regulatory structures which get moved to
a new header net/regulatory.h.The "new" net/cfg80211.h is now divided into sections.
There are no real changes in this patch but code shuffling
and some very minor documentation fixes.I have also, to make things reflect reality, put in a
copyright line for Luis to net/regulatory.h since that
is probably exclusively written by him but was formerly
in a file that only had my copyright line.Signed-off-by: Johannes Berg
Cc: Luis R. Rodriguez
Signed-off-by: John W. Linville -
It really belongs into that file since it is only relevant
for managed mode. Move 1:1, not even whitespace changes,
but make it static and remove from header file.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
28 Feb, 2009
2 commits
-
The AP can switch dynamically between 20/40 Mhz channel width,
in which case we switch the local operating channel, but the
rate control algorithm is not notified. This patch adds a new callback
to indicate such changes to the RC algorithm.Currently, HT channel width change is notified, but this callback
can be used to indicate any new requirements that might come up later on.Signed-off-by: Sujith
Acked-by: Johannes Berg
Signed-off-by: John W. Linville -
This patch splits out the ibss code and data from managed (station) mode.
The reason to do this is to better separate the state machines, and have
the code be contained better so it gets easier to determine what exactly
a given change will affect, that in turn makes it easier to understand.This is quite some churn, especially because I split sdata->u.sta into
sdata->u.mgd and sdata->u.ibss, but I think it's easier to maintain that
way. I've also shuffled around some code -- null function sending is only
applicable to managed interfaces so put that into that file, some other
functions are needed from various places so put them into util, and also
rearranged the prototypes in ieee80211_i.h accordingly.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
14 Feb, 2009
4 commits
-
Essentially consisting of passing the sta_info pointer around,
instead of repeatedly doing hash lookups.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
The sta_info pointer can very well be passed to
ieee80211_sta_tear_down_BA_sessions, this will
later allow us to pass it through even further.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
We can only support aggregation on AP/STA right now. HT isn't defined
for IBSS, WDS or MESH. In the WDS/MESH cases it's not clear what to
put into the IBSS field, and we don't handle that in the code at all.
Also fix the code to handle VLAN correctly.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
Create two new files, agg-tx.c and agg-rx.c to make it clearer
which code is common (ht.c) and which is specific (agg-*.c).Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
30 Jan, 2009
4 commits
-
Transform calls kmalloc/memset to a single kcalloc.
Signed-off-by: Wei Yongjun
Signed-off-by: John W. Linville -
When sending out Action frames, allow ieee80211_tx_skb() to send them
without enforcing do_not_encrypt. These frames will be encrypted if
MFP has been negotiated.Signed-off-by: Jouni Malinen
Acked-by: Johannes Berg
Signed-off-by: John W. Linville -
The channel_type really doesn't need to be the only member in
a new structure, so remove the struct. Additionally, remove
the _CONF_CHANGE_HT flag and use _CONF_CHANGE_CHANNEL when the
channel type changes, since that's enough of a change to require
reprogramming the hardware anyway.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
We can simply use conf_is_ht() check where needed.
Signed-off-by: Luis R. Rodriguez
Acked-by: Johannes Berg
Signed-off-by: John W. Linville
13 Jan, 2009
1 commit
-
net/mac80211/ht.c: In function ‘ieee80211_start_tx_ba_session’:
net/mac80211/ht.c:472: warning: ‘ret’ may be used uninitialized in this functionSigned-off-by: John W. Linville
20 Dec, 2008
1 commit
-
HT management is done differently for AP and STA modes, unify
to just the ->config() callback since HT is fundamentally a
PHY property and cannot be per-BSS.Rename enum nl80211_sec_chan_offset as nl80211_channel_type to denote
the channel type ( NO_HT, HT20, HT40+, HT40- ).Signed-off-by: Johannes Berg
Signed-off-by: Sujith
Signed-off-by: John W. Linville
26 Nov, 2008
1 commit
-
Signed-off-by: Sujith
Acked-by: Johannes Berg
Signed-off-by: John W. Linville
11 Nov, 2008
1 commit
-
Send a notification to the driver on succesful
reception of an ADDBA response, add IEEE80211_AMPDU_TX_RESUME
for this purpose.Signed-off-by: Sujith
Signed-off-by: John W. Linville
01 Nov, 2008
1 commit
-
Wireless HW without any dedicated queues for aggregation
do not need the ampdu_queues mechanism present right now
in mac80211. Since mac80211 is still incomplete wrt TX MQ
changes, do not allow aggregation sessions for drivers that
set ampdu_queues.This is only an interim hack until Intel fixes the requeue issue.
Signed-off-by: Sujith
Signed-off-by: Luis Rodriguez
Signed-off-by: John W. Linville