wlcore/wl12xx: calibrator fem detect implementation
this completes the calibrator based fem detect logic in driver:
driver starts (by calibrator) in plt_mode PLT_FEM_DETECT
wlcore inits and starts plt on wl12xx
wl12xx fetches fem number from firmware and stores it in wl->fem_manuf
wl12xx immediatly returns (doesn't start radio, etc...)
wlcore returns the fem_manuf to calibrator using WL1271_TM_ATTR_DATA
plt_mode is stopped
add wl->plt_mode that is used to indicate different plt
working modes: this will be used to implement calibrator side
auto fem detection where driver asks firmware to detect
the wlan fem radio type and returns it to calibrator.
this is not implemented yet and plt_modes: PLT_ON and
PLT_FEM_DETECT currently behave the same.
wl18xx: fix bogus compile warning on cc config option
Initialize val to 0, to remove the following warning with
CONFIG_CC_OPTIMIZE_FOR_SIZE. The compiler used was gcc 4.4.1
(Sourcery G++ Lite 2010q1-202).
drivers/net/wireless/ti/wl18xx/io.c: In function 'wl18xx_top_reg_read':
drivers/net/wireless/ti/wl18xx/io.c:57: warning: 'val' may be used uninitialized in this function
wlcore: send EAPOLs using minimum basic rate for all roles
Send EAPOLs using minimum basic rate for AP, STA, p2p GO and Client.
The patch fixes p2p connection issue with Realtek device in p2p
certification test 5.1.13 (DEVUT reinvokes Persistent Group).
Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
ht_mode added to wl18xx conf struct in order to support different modes
from the configuration file, as well as module params, and by default
(working without a conf file and/or no module params).
the hack regarding conf.phy.low_band_component_type for each board
is now explicitly handled after parsing module params.
missing default values to wl18xx config added.
fix string module params not to have defaults (so if empty, param
can be taken from conf file).
update conf version to 3.
wlcore: don't re-configure wakeup conditions if not needed
suspend and resume callbacks configure wakeup conditions to the FW
which may be different between suspend and resume.
This feature is currently not utilized as both in suspend and resume
FW wakeup every 1 DTIM. Avoid waking up the chip and doing the FW command
unless there's an actual difference in the wakeup conditions.
Johannes Berg [Tue, 17 Jul 2012 15:12:29 +0000 (17:12 +0200)]
b43: fix crash with OpenFWWF
b43 with open firmware crashes mac80211 because
it changes the number of queues at runtime which,
while it was never really supported, now crashes
mac80211 due to the new hardware queue logic.
Fix this by detecting open vs. proprietary fw
earlier and registering with mac80211 with the
right number of queues.
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Cc: stable@vger.kernel.org (depends on commit a6f38ac3) Signed-off-by: John W. Linville <linville@tuxdriver.com>
Using work_pending() to defer certain operations when
a HW-reset work has been queued is racy since the check
would return false when the work item is actually in
execution. Use SC_OP_HW_RESET instead to fix this race.
Also, unify the reset debug statistics maintenance.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
When an interface in AP or P2P-GO mode is removed,
check whether a station interface is already present and
reconfigure the beacon timers etc. properly if it's
associated.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Setup the beacon queue parameters after disabling
interrupts. Also, remove the redundant call in conf_tx()
for IBSS mode since the queue would be configured
with the appropriate cwmin/cwmax values when beaconing
is enabled.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
In the tx_last_beacon() callback, mac80211's beaconing
status can be used instead. The beacon tasklet doesn't require
it because it is disabled when removing a slot.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Do not set/clear TSF when adding/deleting an interface.
This should be done when the BSS is set up and should also
take into account the existence of other interfaces.
* Set opmode explicitly.
* ANI setup needs to be decided based on multiple interfaces.
This can be done via the bss_info_changed() callback.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch revamps interface addition and deletion and simplifies
slot allocation. There is no need to setup the beacon buffer
in add/remove interface, remove this and use simple APIs for
assigning/deleting slots.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Drake [Sun, 15 Jul 2012 22:48:00 +0000 (23:48 +0100)]
libertas USB: don't set surpriseremoved flag
We found a deadlock in the handling of command failures/reset conditions.
For example:
1. Two commands are in the queue.
2. The first command is sent, but causes a timeout, which kicks off an
asynchronous device reset
3. The second command is queued (but not yet sent to the hardware)
4. The device reset kicks in, causing the if_usb disconnect handler to
set the "surprise removed" flag to be set as the device disappears
from the bus. This causes lbs_thread to stop processing things
("adapter removed; waiting to die"), not processing any further
commands, leaving the second queued command "in the air", causing a
deadlock.
Fix this by removing the surpriseremoved flag setting in if_usb. I can't
see any reason why this needs to be done so early. lbs_remove_card will set
this flag at an appropriate time - i.e. after all pending commands have
been completed or cancelled, avoiding this deadlock.
Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Drake [Sun, 15 Jul 2012 22:47:51 +0000 (23:47 +0100)]
libertas: handle command failure immediately
Fail commands immediately when the request cannot be sent to the hardware.
This solves the following deadlock:
1. Two commands are in the queue.
2. The first command is sent, but causes a timeout, which kicks off an
asynchronous device reset
3. The second command is submitted to the device, and fails. The failure
is noted but the existing code waits for the timeout handler to take
care of the failure.
4. The device reset kicks in, causing the device "surprise removed" flag
to be set as the device disappears from the bus.
5. lbs_thread notes this and enters "adapter removed; waiting to die"
mode, without processing any further command timeouts.
While adjusting lbs thread logic to handle this situation may be one way
to fix this, it seems more practical to simplify handling of host_to_card
failure so that the commands are failed immediately without waiting for
more compliated timeout logic to kick in.
Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Drake [Sun, 15 Jul 2012 22:44:58 +0000 (23:44 +0100)]
libertas: Update 11d info only when interface is active
reg_notifier can be called before the interface is up.
Handle this correctly by storing the requested country code, then
apply the relevant configuration when the interface is brought up.
Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sun, 15 Jul 2012 17:53:38 +0000 (19:53 +0200)]
ath9k_hw: clean up AR9003 EEPROM code
- add an inline function for getting the correct modal EEPROM struct
- remove unnecessary indirection through ath9k_hw_ar9300_get_eeprom
access the relevant fields directly
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sun, 15 Jul 2012 17:53:36 +0000 (19:53 +0200)]
ath9k: fix aggregate size limit based on queue TXOP limit
If the aggregate size exceeds the TXOP limit, it leads to lots of unnecessary
hardware and software retries.
The previous 4ms frame limit table was completely undocumented, the commit
that updated it only vaguely referenced and equation from the standard,
but I've been unable to replicate its results.
Fix this by using a formula based on the code in ath_pkt_duration, which is
more likely to be correct for this case.
Reported-by: Dave Täht <dave.taht@gmail.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sun, 15 Jul 2012 17:53:34 +0000 (19:53 +0200)]
ath9k/ath9k_htc: fix txop limit handling
In all those years apparently nobody noticed that the txop limit programmed
into the chip was off by a factor of 32 (!), probably because the VI and VO
queues aren't used that much aside from mgmt frames on VO.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sun, 15 Jul 2012 17:53:33 +0000 (19:53 +0200)]
ath9k_hw: remove redundant arguments to INIT_INI_ARRAY
The row/column sizes can be derived from the array argument within the macro
itself, which is less error prone. In a few cases the supplied column size
was actually wrong.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sun, 15 Jul 2012 17:53:30 +0000 (19:53 +0200)]
ath9k: validate rx antenna settings
Many chips are not able to deal with non-consecutive rx antenna selections
and respond with calibration errors, reset errors, etc.
When an antenna is selected as a tx antenna, also flag it for rx to avoid
chip issues.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwifiex: improvement in cfg80211 set_bitrate_mask handler
This patch configures data rates to firmware using bitrate mask
provided by cfg80211.
Earlier we used to only update band information in this handler
which will be used later for ibss network. Due to recent
modifications in ibss join code we don't need to do that.
mwifiex: add support to use basic rates in ibss join request
In mwifiex_set_rf_channel() ibss specific flags were unnecessarily
getting modified for infra and AP mode. This patch removes
mwifiex_set_rf_channel() function and adds equivalant code in infra,
ibss and AP path.
For ibss, now we are chosing band based on channel type and basic
rates provided in ibss join request. We can start ibss network in
A only, B only, G only, BG, BGN, AN mode.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwifiex: remove unnecessary code in data rate configuration
1) Remove unnecessary wrapper functions.
2) Currently we don't have command to set Tx data rate, so
mwifiex_rate_ioctl_set_rate_value() function and related code
can be removed.
3) "ds_rate" filled by mwifiex_ret_tx_rate_cfg() is never used.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwifiex: remove redundant code in set channel path
1) Recently we removed set_channel cfg80211 handler. Also, cfg80211
blocks ibss connection requests if ibss network is already started
/joined. Hence the code to restart ibss network in new channel
(mwifiex_drv_change_adhoc_chan() function) becomes redundant.
2) mwifiex_bss_set_channel() function is redundant. It does some
error checking and calculate adhoc start band and adhoc channel.
Cfg80211 already takes care of error checking and provides correct
channel information to the driver. Adhoc start band is already
calculated in mwifiex_set_rf_channel() function.
Other associated code is also removed in this patch.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Forest Bond [Fri, 13 Jul 2012 16:26:06 +0000 (12:26 -0400)]
rtlwifi: rtl8192de: Fix phy-based version calculation
Commit d83579e2a50ac68389e6b4c58b845c702cf37516 incorporated some
changes from the vendor driver that made it newly important that the
calculated hardware version correctly include the CHIP_92D bit, as all
of the IS_92D_* macros were changed to depend on it. However, this bit
was being unset for dual-mac, dual-phy devices. The vendor driver
behavior was modified to not do this, but unfortunately this change was
not picked up along with the others. This caused scanning in the 2.4GHz
band to be broken, and possibly other bugs as well.
This patch brings the version calculation logic in parity with the
vendor driver in this regard, and in doing so fixes the regression.
However, the version calculation code in general continues to be largely
incoherent and messy, and needs to be cleaned up.
Signed-off-by: Forest Bond <forest.bond@rapidrollout.com> Cc: Stable <stable@vger.kernel.org> [v3.2+] Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 13 Jul 2012 08:57:36 +0000 (10:57 +0200)]
b43: use temporary rate_index for error checking
The mac80211 rate_index changed to be a u8, so
can't hold the negative error value properly.
Use a temporary variable for error checking.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k: make CONFIG_ATH9K_DFS_CERTIFIED depend on CFG80211_CERTIFICATION_ONUS
Turns out every most standard Linux distributions enable
CONFIG_EXPERT, so use the shiny new CFG80211_CERTIFICATION_ONUS
which is meant by design to not be enabled by all Linux
distributions.
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
on disassoc, ieee80211_set_disassoc() goes out of PS
before indicating BSS_CHANGED_ASSOC (not sure why this
is needed, but some drivers might count on the current
behavior).
However, it does it after sending the disassoc
frame, which results in null-data frame being sent
(in order to go out of ps) after we were already sent
the disassoc, which is invalid.
Fix it by going out of ps before sending the disassoc.
Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
regulatory_update() just calls wiphy_update_regulatory().
wiphy_update_regulatory() assumes you already have
the reg_mutex held so just move the call within locking
context and kill the superfluous regulatory_update().
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
cfg80211: rename reg_device_remove() to wiphy_regulatory_deregister()
This makes it clearer what we're doing. This now makes a bit
more sense given that regardless of the wiphy if the cell
base station hint feature is supported we will be modifying the
way the regulatory core behaves.
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
cfg80211: add cellular base station regulatory hint support
Cellular base stations can provide hints to cfg80211 about
where they think we are. This can be done for example on
a cell phone. To enable these hints we simply allow them
through as user regulatory hints but we allow userspace
to clasify the hint as either coming directly from the
user or coming from a cellular base station. This option
is only available when you enable
CONFIG_CFG80211_CERTIFICATION_ONUS.
The base station hints themselves will not be processed
by the core unless at least one device on the system
supports this feature.
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This adds CONFIG_CFG80211_CERTIFICATION_ONUS which is to
be used for features / code which require a bit of work on
the system integrator's part to ensure that the system will
still pass 802.11 regulatory certification. This option is
also usable for researchers and experimenters looking to add
code in the kernel without impacting compliant code.
We'd use CONFIG_EXPERT alone but it seems that most standard
Linux distributions are enabling CONFIG_EXPERT already. This
allows us to define 802.11 specific kernel features under a
flag that is intended by design to be disabled by standard
Linux distributions, and only enabled by system integrators
or distributions that have done work to ensure regulatory
certification on the system with the enabled features.
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Kalle Valo [Thu, 12 Jul 2012 12:33:58 +0000 (15:33 +0300)]
cfg80211: fix set_regdom() to cancel requests with same alpha2
While adding regulatory support to ath6kl I noticed that I easily
got the regulatory code confused. The way to reproduce the bug was:
1. iw reg set FI (in userspace)
2. cfg80211 calls ath6kl_reg_notify(FI)
3. ath6kl sets regdomain in firmware
4. firmware sends regdomain event to notify about the new regdomain (FI)
5. ath6kl calls regulatory_hint(FI)
And this (from FI to FI transition) confuses cfg80211 and after that I
only get "Pending regulatory request, waiting for it to be
processed...." messages and regdomain changes won't work anymore.
The reason why ath6kl calls regulatory_hint() is that firmware can change
the regulatory domain by it's own, for example due to 11d IEs. I could
of course workaround this in ath6kl but I think it's better to handle
the case in cfg80211.
The fix is pretty simple, use a different error code if the regdomain is
same and then just set the request processed so that it doesn't block new
requests.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Thomas Pedersen [Thu, 12 Jul 2012 23:17:33 +0000 (16:17 -0700)]
cfg80211: support TX error rate CQM
Let the user configure serveral TX error conection quality monitoring
parameters: % error rate, survey interval, and # of attempted packets.
On exceeding the TX failure rate over the given interval, the driver
will send a CQM notify event with the actual TX failure rate and
packets attempted.
Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
mac80211: fix tx-mgmt cookie value being left uninitialized
commit "mac80211: unify SW/offload remain-on-channel"
moved the cookie assignment from ieee80211_mgmt_tx()
to ieee80211_start_roc_work(). But the latter is only
called where offchannel is needed. If offchannel isn't
needed/used, a uninitialized cookie value would be returned
to userspace.
This patch sets the cookie value when offchannel isn't used.
Signed-off-by: Nicolas Cavallari <cavallar@lri.fr> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Due to the tracking happening in NETDEV_PRE_UP, it had
introduced bugs because the monitor interface callback
would be called before the device was started. It looks
like there's no way to fix this, and using NETDEV_PRE_UP
is broken anyway (since there's no NETDEV_UP_FAIL), so
remove all that code, track interfaces in NETDEV_UP and
also stop tracking the monitor channel in cfg80211.
This mostly reverts to before the tracking, except that
we keep the interface count tracking so that setting the
monitor channel can be rejected properly.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 12 Jul 2012 17:45:08 +0000 (19:45 +0200)]
cfg80211/mac80211: re-add get_channel operation
This essentially reverts commit 2e165b818456 but
introduces the get_channel operation with a new
wireless_dev argument so that you can retrieve
the channel per interface. This is necessary as
even though we can track all interface channels
(except monitor) we can't track the channel type
used.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 12 Jul 2012 14:25:02 +0000 (16:25 +0200)]
nl80211: allow enabling WoWLAN without triggers
It may be desirable to use WoWLAN without triggers to
keep the connection alive to the AP while suspended.
Allow this use by enabling WoWLAN without triggers if
no triggers were requested.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Larry Finger [Wed, 11 Jul 2012 19:37:28 +0000 (14:37 -0500)]
rtlwifi: rtl8192cu: Change buffer allocation for synchronous reads
In commit a7959c1, the USB part of rtlwifi was switched to convert
_usb_read_sync() to using a preallocated buffer rather than one
that has been acquired using kmalloc. Although this routine is named
as though it were synchronous, there seem to be simultaneous users,
and the selection of the index to the data buffer is not multi-user
safe. This situation is addressed by adding a new spinlock. The routine
cannot sleep, thus a mutex is not allowed.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Huehn [Tue, 10 Jul 2012 12:01:37 +0000 (14:01 +0200)]
brcmsmac: restructure info->control.sta handling as it is goning to be removed soon.
brcmsmac uses info->control.sta while doing ampdu aggregation. This patch
changes the usage of the structure info->control.sta, as it is going to be
removed soon from struct ieee80211_tx_info. This patch is a pre-requisit in
order to add transmission power control (TPC) to the mac80211 subsystem.
Suggested-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
add suspend/resume/set_wakeup callbacks to the driver
*suspend
- bail out only if all the conditions for configuring WoW.
is fine, currently multivif case is not handled
- check for associated state.
- map wow triggers from user space data.
- add deauth/disassoc pattern and user defined pattern,
for the later a list is maintained.
- store the interrupt mask before suspend, enabled beacon
miss interrupt for WoW.
- configure WoW in the hardware by calling ath9k_hw_wow_enable.
*resume
- restore the interrupts based on the interrupt mask
stored before suspend.
- call ath9k_hw_wow_wakeup to configure/restore the hardware.
- after wow wakeup clear away WoW events and query the
WoW wakeup reason from the status register
*set_wakeup
- to call 'device_set_wakeup_enable' from cfg80211/mac80211
when wow is configured and as per Rafael/Johannnes the
right way to do so rather in the driver suspend/resume
call back
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Cc: vadivel@qca.qualcomm.com Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
add a new file wow.c which takes care of the hardware code
for WoW.
*program the descriptors and data words to periodically
send Keep Alive Frames.
*program the user defined patterns/masks and pattern length
in the hardware registers.
*'ath9k_hw_wow_enable' is called during the drivers suspend
callback which takes care of the following
- tracking wow event mask (to suppress spurious
wow events)
- properly configure suspend/resume WAR registers
- configure PCIE PM control register
- configure MAC WoW registers and their timeouts
- enabling wow configuration like magic packet,
user patterns based on users configuration
- configuring timeouts for KAL, beacon miss,
aifs, slot time, backoff
- create Keep Alive Pattern ('KAL')
*'ath9k_hw_wow_wakeup' is called during the drivers resume
callback which takes care of the following
- primary task is to find the reason for wakeup
from the wow status register
- configure/restore AR_PCIE_PM_CTRL register
- clear all WoW events
- configure/restore suspend/resume WAR registers
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Cc: vadivel@qca.qualcomm.com Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
for AR9002 family of chipsets and for WoW sleep, we reprogram
the SerDes so that the PLL and CHK REQ are both enabled. this
uses more power but in certain cases this is required as otherwise
WoW sleep is unstable and chip may disappear.
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Cc: vadivel@qca.qualcomm.com Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k: advertise supported WoW flags to upper layer
currently the code supports WoW triggers due to
*magic packet
*user defined patterns
*deauth and disassoc patterns
*disconnect - beacon miss, last beacon received timeout,
no ack for keeep alive frames.
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Cc: vadivel@qca.qualcomm.com Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k_hw: advertise WoW support for capable chipsets
support WoW for all chipsets starting from AR9280, AR9285, AR9287,
AR9380, AR9382, AR9485, AR9462. Really all hardware may not support
WoW even though the flag is set and the WoW working depends on
your laptop, BIOS apart from the hardware.
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Cc: vadivel@qca.qualcomm.com Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
have seperate wow capability flags for
*basic wow support
*device capable of matching exact user defined pattern
or de-authentication/disassoc pattern
*device such AR9280 requires first four bytes for
all sort of patterns
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Cc: vadivel@qca.qualcomm.com Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k: Add definitions and structures to support WoW
*add structures, macros and variables for WoW, so that the driver
can make use of it.
*maintain a list for user enabled patterns and masks
*track pattern slots for the hardware limitation on the
maximum number of patterns that can be stored.
*track interrupts enabled before WoW suspend, so
that can be reconfigured after resume
*have macros to parse user defined wow configurations to
hardware code
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Cc: vadivel@qca.qualcomm.com Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Cc: vadivel@qca.qualcomm.com Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Thu, 12 Jul 2012 18:27:54 +0000 (20:27 +0200)]
NFC: Set target nfcid1 for all HCI reader A targets
Without the discovered target nfcid1 and its length set properly, type 2
tags detection fails with the pn544 as it checks for them from
pn544_hci_complete_target_discovered().
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Reported-by: Mathias Jeppsson <mathias.jeppsson@sonymobile.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwifiex driver supports 2x2 chips as well. Hence valid mcs values
are 0 to 15. The check for mcs index is corrected in this patch.
For example: if 40MHz is enabled and mcs index is 11, "iw link"
command would show "tx bitrate: 108.0 MBit/s" without this patch.
Now it shows "tx bitrate: 108.0 MBit/s MCS 11 40Mhz" with the patch.
Cc: "3.2.y, 3.3.y, 3.4.y" <stable@vger.kernel.org> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 12 Jul 2012 14:10:02 +0000 (16:10 +0200)]
cfg80211: ignore channel state for stopped AP/mesh interfaces
Without this change, running AP + station on the same wiphy
does not work since the commit "cfg80211: add channel checking
for iface combinations". The stopped AP prevents the client
from connecting to an AP on a different channel.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
[line-break commit message to < 72 chars] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 12 Jul 2012 11:56:28 +0000 (13:56 +0200)]
iwlwifi: don't use stack memory for kmem cache name
Since the kmem cache API doesn't internally allocate
the name but just points to the name that was passed
in we can't use stack memory for it. Move the name
into the transport struct.
Johannes Berg [Tue, 10 Jul 2012 17:39:02 +0000 (19:39 +0200)]
cfg80211: fix locking and lockdep complaints
To call cfg80211_get_chan_state() we need to lock
the wdev, so we need to lock the wdev_iter mutex
in cfg80211_can_use_iftype_chan(). This needs to
use nested locking for lockdep.
Also, cfg80211_get_chan_state() doesn't actually
use the rdev, so remove that completely including
the lock assertion that isn't needed.
Reported-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
minstrel_ht: enable frame aggregation for fixed rate
When sample_idx is set to a value other than -1 it activates
the IEEE80211_TX_CTL_RATE_CTRL_PROBE flag which disables
frame aggregation. To allow frame aggregation during fixed
rate it is necessary to set max_tp_rate, max_tp_rate2 and
max_prob_rate instead of sample_idx.
Signed-off-by: Sylvain Roger Rieunier <sylvain.roger.rieunier@gmail.com>
[reword commit message a bit] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
mac80211: tx: do not drop non-robust mgmt to non-MFP stas.
When drop_unencrypted is enabled and MFP is disabled,
non-robust management frames for not-yet associated STA are dropped.
This isn't visible as many management frames sent from the kernel
have TX_INTFL_DONT_ENCRYPT set and management frames injected
from a monitor vif have TX_CTL_INJECTED so aren't dropped.
But management frames sent from userspace via NL80211_CMD_FRAME
do not have this flag set, so are dropped.
This patch make it always accept non-robust management frames.
Signed-off-by: Nicolas Cavallari <cavallar@lri.fr> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Jul 2012 16:10:07 +0000 (18:10 +0200)]
mac80211: restructure key selection
The "no key" case in key selection that decides
whether to drop the frame or not is impossible
to understand, restructure the code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
[cavallar@lri.fr: removed blank line and restructured action frame clause] Signed-off-by: Nicolas Cavallari <cavallar@lri.fr>
Johannes Berg [Tue, 22 May 2012 20:13:05 +0000 (22:13 +0200)]
mac80211: add time synchronisation with BSS for assoc
Some drivers (iwlegacy, iwlwifi and rt2x00) today use the
bss_conf.last_tsf value. By itself though that value is
completely worthless since it may be ancient. What really
is needed is synchronisation between some device time and
the TSF.
To clarify this, rename bss_conf.last_tsf to sync_tsf and
add sync_device_ts which is obtained from rx_status which
gets a new field device_timestamp for this purpose. This
is intentionally not using the mactime field since that
is used for other things and in IBSS is expected to sync
with the IBSS's TSF which isn't necessarily true for the
device timestamp.
Also, since we have the information and it's useful even
before the connection has been established, give all the
timing details to the driver before authenticating.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
We waste a lot of space in this struct because it uses
int values where smaller ones would be sufficient. The
upcoming A-MPDU information needs some space, optimize
the struct now.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 6 Jul 2012 20:19:27 +0000 (22:19 +0200)]
mac80211: redesign scan RX
Scan receive is rather inefficient when there are
multiple virtual interfaces. We iterate all of the
virtual interfaces and then notify cfg80211 about
each beacon many times.
Redesign scan RX to happen before everything else.
Then we can also get rid of IEEE80211_RX_IN_SCAN
since we don't have to accept frames into the RX
handlers for scanning or scheduled scanning any
more. Overall, this simplifies the code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>