Age | Commit message (Collapse) | Author | Files | Lines |
|
Add a basic state machine for switch channel context
for beacon transmission.
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Group and set hw state (opmode, primary_sta, beacon conf) per
channel context instead of whole list of vifs. This would allow
each channel context to run in different mode (STA/AP).
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Save TSF in channel context for multiple operating channels.
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Retrieve appropriate operating channel context while switching
between operating and off channels.
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Add channel context operations (add, remove, change, assign and
unassign) to enable support for multiple channels.
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Add remain on channel support in order to enable multi-channel
concurrency.
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Implement hw_scan support for enabling multi-channel cuncurrency.
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
While leaving from or entering to active channel context, send out
nullfunc frame to inform to the AP about the presence of station.
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Force queueing of all frames that belong to a virtual interface on
a different channel context, to ensure that they are sent on the
correct channel.
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
The channel context worker is used to switch to next requested
channel context.
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Add support to maintain per-channel ACs list.
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
The channel context structure is defined to enable
multi-channel concurrency support.
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Since CL_PRINTF only ever takes a single argument, make sure a format
string cannot leak into printk.
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Fix rsi_module_init() to propagate sdio_register_driver() errors.
Signed-off-by: Alexey Khoroshilov <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
module_usb_driver eliminates the boilerplate and makes the code simpler,
in addition to the fact currently rsi_module_init() ignores usb_deregister() error.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
For users who do not need wowlan, load mwifiex.ko with
disconnect_on_suspend = 1; or iw phy0 wowlan disable.
Signed-off-by: Bing Zhao <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
When magic-packet is generated as a UDP packet the offset should
be 20+8 more bytes to cover IPv4 header and UDP header. So the
total offset become 56.
Add a new MEF entry to support both magic-packet patterns
generated by different tools.
Cc: Andreas Fenkart <[email protected]>
Signed-off-by: Zhiyuan Yang <[email protected]>
Signed-off-by: Amitkumar Karwar <[email protected]>
Signed-off-by: Bing Zhao <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
We setup BCN_OFFSET{0,1} registers dynamically, don't have to
initialize them.
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
When no beaconing is needed, first stop beacon queue (disable beaconing
globally) to avoid possible sending of not prepared beacon on short
period after clearing beacon and before stop of BCN queue.
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
We setup MAC_BSSID_DW1_BSS_BCN_NUM dynamically when numbers of active
beacons increase. Change default to 0 to tell hardware that we want to
send only one beacon as default.
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
As reported by Matthias, on 5572 chip, even if we clear up TXWI
of corresponding beacon, hardware still try to send it or do other
action that increase power consumption peak up to 1A.
To avoid the issue, setup beaconing dynamically by configuring offsets
of currently active beacons and MAC_BSSID_DW1_BSS_BCN_NUM variable,
which limit number of beacons that hardware will try to send.
Reported-by: Matthias Fend <[email protected]>
Signed-off-by: Stanislaw Gruszka <[email protected]>
Acked-by: Helmut Schaa <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
This patch is needed for further changes to keep global variables
consistent when changing beaconing on diffrent vif's.
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
A custom regulatory domain was introduced in this commit:
cc0ba0d mwifiex: support custom world regulatory domain
The commit description says that it was introduced because the world
regulatory domain does not include channels 52-64 and 100-140. These
channels are described in the world regulatory domain now, so we can
drop this custom regulatory domain.
Signed-off-by: Markus Pargmann <[email protected]>
Acked-by: Bing Zhao <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
There is a risk that the variables will be used without being initialized.
Have also moved variable to the part of the code where it is used.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Band switching code needs to know what channel we switch to.
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
PHY may need to be re-initialized during runtime (e.g. on band switch).
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
This is tiny optimization and grouping band/channel ops.
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
There aren't devices with multiple 802.11 cores supported by b43.
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
It was never used, b43_switch_channel is always called with hw_value
(from mac80211) or whatever get_default_chan returns.
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
RX descriptor data must be read only if the descriptor has been fully
updated by HW.
There is a "ownership" flag in the descriptor itself to test this.
The driver code contains a read for the "ownership" flag and, after
it, other read access for descriptor data.
This is in DMA coherent memory, that is _not_ guaranteed to be immune
to instruction reordering, thus it is possible that the descriptor
data is read _before_ the "ownership" flag.
This can theoretically lead to a DMA/CPU race that may end up with the
driver reading the data when it is still not valid, and the "ownership"
bit just after enough time that the HW make the whole descriptor valid.
The driver will in this case believe the data is valid, but it will use
the invalid data read earlier.
In order to avoid this, this patch adds a rmb() to force the "ownership"
bit read to be issued before other descriptor data reads are attempted.
Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
This patch makes the driver report signal information for rtl8185
boards using dBm instead of unspecified unit.
Rtl8180 remains untouched.
I did some tests to confirm the correctness of the measure performed
by the board and it seems reasonably correct.
The test setup has been made by connecting an AP with coax and
RF attenuators to the card antenna port.
In order to get a reference measure I tried with several cards with
different chipset I own. I found that many gave different results, and
I finally selected two cards that gave me consistent results to use
as reference: AR9271 and Prism54-usb (isl3887 with Frisbee radio).
Using this references I compared the RSSI information with my rtl8185
and I repeated tests with three different attenuation values, increasing
attenuation by 10dB each step.
I made only relative measures, making NO assumption about source power.
CCK measures seem very close to my references, OFDM are a little bit
less precise but, considering that these cards are not measuring
instrumentation, IMHO this is still fairly good.
CCK measures (1Mbps beacons)
ATTENUATOR 1
p54usb: -58dBm
ath9k_htc: -59dBm
rtl8185: -59dBm
ATTENUATOR 2
p54usb: -67dBm
ath9k_htc: -68dBm
rtl8185: -70dBm
ATTENUATOR 3
p54usb: -78dBm
ath9k_htc: -79dBm
rtl8185: -79dBm
OFDM measures (54Mbps ping)
ATTENUATOR 1
p54usb: -58dBm
ath9k_htc: -57dBm
rtl8185: -62dBm
ATTENUATOR 2
p54usb: -68dBm
rtl8185: -71dBm
Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
remove the if-else chains and use switch-case to make code more
readable and avoiding long lines that broke in several lines
Signed-off-by: Andrea Merello <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.
Verified by compilation only.
The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
when strict
return
- ret
+ C
;
// </smpl>
Signed-off-by: Peter Senna Tschudin <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.
wl_cfg80211.c verified by compilation only.
phy/phy_cmn.c unverified.
The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
when strict
return
- ret
+ C
;
// </smpl>
Signed-off-by: Peter Senna Tschudin <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
As reported by Niels, starting rfkill polling during device probe
(commit e2bc7c5, generally sane change) broke rfkill on rt2500pci
device. I considered that bug as some initalization issue, which
should be fixed on rt2500pci specific code. But after several
attempts (see bug report for details) we fail to find working solution.
Hence I decided to revert to old behaviour on rt2500pci to fix
regression.
Additionally patch also unregister rfkill on device remove instead
of ifconfig down, what was another issue introduced by bad commit.
Bug report:
https://bugzilla.kernel.org/show_bug.cgi?id=73821
Fixes: e2bc7c5f3cb8 ("rt2x00: Fix rfkill_polling register function.")
Cc: [email protected]
Bisected-by: Niels <[email protected]>
Reported-and-tested-by: Niels <[email protected]>
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Support for firmware rev 508+ was added years ago, but we never noticed
it reports channel in a different way for G-PHY devices. Instead of
offset from 2400 MHz it simply passes channel id (AKA hw_value).
So far it was (most probably) affecting monitor mode users only, but
the following recent commit made it noticeable for quite everybody:
commit 3afc2167f60a327a2c1e1e2600ef209a3c2b75b7
Author: Emmanuel Grumbach <[email protected]>
Date: Tue Mar 4 16:50:13 2014 +0200
cfg80211/mac80211: ignore signal if the frame was heard on wrong channel
Reported-by: Aaro Koskinen <[email protected]>
Signed-off-by: Rafał Miłecki <[email protected]>
Cc: [email protected]
Tested-by: Aaro Koskinen <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
The device 057c:8501 (AVM Fritz! WLAN v2 rev. B) boots into a state that does
not actually require loading a firmware file. The vendors driver finds out
about this by checking a firmware state register, so this patch adds this here.
Finally, with this patch applied, my wifi dongle actually becomes
useful (scan + connect to wpa network works).
Signed-off-by: Michael Braun <[email protected]>
Acked-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
The device 057c:8501 (AVM Fritz! WLAN v2 rev. B) currently does not
load. One thing observed is that the vendors driver detects EFUSE mode
for this device, but rt2800usb does not. This is due to rt2800usb
lacking a check for the firmware mode present in the vendors driver,
that this patch adopts for rt2800usb.
With this patch applied, the 'RF chipset' detection does no longer fail.
Signed-off-by: Michael Braun <[email protected]>
Acked-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Reported-by: Paul Bolle <[email protected]>
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
On USB we can not get atomically TKIP key. We have to disable support
for TKIP acceleration on USB hardware to avoid bug as showed bellow.
[ 860.827243] BUG: scheduling while atomic: hostapd/3397/0x00000002
<snip>
[ 860.827280] Call Trace:
[ 860.827282] [<ffffffff81682ea6>] dump_stack+0x4d/0x66
[ 860.827284] [<ffffffff8167eb9b>] __schedule_bug+0x47/0x55
[ 860.827285] [<ffffffff81685bb3>] __schedule+0x733/0x7b0
[ 860.827287] [<ffffffff81685c59>] schedule+0x29/0x70
[ 860.827289] [<ffffffff81684f8a>] schedule_timeout+0x15a/0x2b0
[ 860.827291] [<ffffffff8105ac50>] ? ftrace_raw_event_tick_stop+0xc0/0xc0
[ 860.827294] [<ffffffff810c13c2>] ? __module_text_address+0x12/0x70
[ 860.827296] [<ffffffff81686823>] wait_for_completion_timeout+0xb3/0x140
[ 860.827298] [<ffffffff81080fc0>] ? wake_up_state+0x20/0x20
[ 860.827301] [<ffffffff814d5b3d>] usb_start_wait_urb+0x7d/0x150
[ 860.827303] [<ffffffff814d5cd5>] usb_control_msg+0xc5/0x110
[ 860.827305] [<ffffffffa02fb0c6>] rt2x00usb_vendor_request+0xc6/0x160 [rt2x00usb]
[ 860.827307] [<ffffffffa02fb215>] rt2x00usb_vendor_req_buff_lock+0x75/0x150 [rt2x00usb]
[ 860.827309] [<ffffffffa02fb393>] rt2x00usb_vendor_request_buff+0xa3/0xe0 [rt2x00usb]
[ 860.827311] [<ffffffffa023d1a3>] rt2x00usb_register_multiread+0x33/0x40 [rt2800usb]
[ 860.827314] [<ffffffffa05805f9>] rt2800_get_tkip_seq+0x39/0x50 [rt2800lib]
[ 860.827321] [<ffffffffa0480f88>] ieee80211_get_key+0x218/0x2a0 [mac80211]
[ 860.827322] [<ffffffff815cc68c>] ? __nlmsg_put+0x6c/0x80
[ 860.827329] [<ffffffffa051b02e>] nl80211_get_key+0x22e/0x360 [cfg80211]
Cc: [email protected]
Reported-and-tested-by: Peter Wu <[email protected]>
Reported-and-tested-by: Pontus Fuchs <[email protected]>
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|