Andrea Merello [Wed, 7 May 2014 15:54:46 +0000 (17:54 +0200)]
rtl8187: make CTS-to-self protection work
CTS protection was not working properly because the HW needs
RTS flag to be asserted, and it need also RTS duration field to be
filled with CTS-to-self duration.
This patch makes the driver to do this.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Wed, 7 May 2014 15:53:17 +0000 (17:53 +0200)]
rtl8180: make CTS-to-self protection work
CTS protection was not working properly because the HW still need
RTS flag to be asserted, and it need also RTS rate field to be
set with CTS-to-self rate and RTS duration field to be filled with
CTS-to-self duration.
This patch makes the driver to do this.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Wed, 7 May 2014 15:52:16 +0000 (17:52 +0200)]
rtl8180: report mac80211 short preamble RX flag
This patch make it possible to mac80211 to know whether a frame
has been received with short preamble.
It simply checks for the "splcp" flag in the RX status
descriptor, and eventually set RX_FLAG_SHORTPRE in mac80211
rx status structure.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Wed, 7 May 2014 15:51:43 +0000 (17:51 +0200)]
rtl8187: report mac80211 short preamble RX flag
This patch make it possible to mac80211 to know whether a frame
has been received with short preamble.
It simply checks for the "splcp" flag in the RX status
descriptor, and eventually set RX_FLAG_SHORTPRE in mac80211
rx status structure.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Wed, 7 May 2014 07:28:31 +0000 (09:28 +0200)]
ath9k: Allow platform override without EEPROM override
Add a new platform data flag "use_eeprom" that indicates that the eeprom
found on the card itself should be used instead of the one present in
the platform data.
This allows to override the MAC address of a PCI card while preserving
the eeprom data from the card itself.
The default behavior is preserved.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Avinash Patil [Wed, 7 May 2014 05:02:45 +0000 (22:02 -0700)]
mwifiex: add HT operation IE in TDLS setup confirm
This patch adds support to populate HT operatation IE in TDLS
setup confirm command. This is required for setting wider
bandwidths for TDLS operations.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Avinash Patil [Wed, 7 May 2014 05:02:44 +0000 (22:02 -0700)]
mwifiex: disable TDLS link upon tear down event
This patch adds code to disable TDLS link upon reception of TDLS
teardown event from peer. Teardown event can happen either
because of TDLS teardown packet from peer or internal timeout
configured during TDLS setup. Event is propogated to cfg80211
so that userspace application can take appropriate action.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Avinash Patil [Wed, 7 May 2014 05:02:43 +0000 (22:02 -0700)]
mwifiex: configure inactivity timeout for TDLS link
This patch adds configuration timeout for TDLS link. This is
configuered at the time of TDLS link configuration. If TDLS link
is inactive for more than timeout, FW will tear this link.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sun, 4 May 2014 23:33:01 +0000 (01:33 +0200)]
ath9k_hw: get QCA953x WMAC revision via platform_data
The SREV register in the WMAC register space does not contain the chip
revision, so it needs to be passed in from the kernel.
With an updated kernel, this fixes tx gain table selection.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andy Spencer [Fri, 2 May 2014 06:48:13 +0000 (06:48 +0000)]
RTL8192CU: Increase max APFM_ONMAC polling count
With certain hardware combinations the poll interval is exceeded before
initialization completes.
Tested on a MacBookPro10,1 using a Sabrent USB-A11N USB adapter.
Signed-off-by: Andy Spencer <andy753421@ucla.edu>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Thu, 1 May 2014 11:37:43 +0000 (17:07 +0530)]
ath9k: Advertise support for AP mode channel width changes
This will enable AP mode to change channel width dynamically
based on 20/40 intolerance report sent by associated client.
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear [Wed, 30 Apr 2014 19:02:05 +0000 (12:02 -0700)]
ath9k: Prevent divide-by-zero upon bad beacon_interval.
A similar patch fixed crashes seen on an ath9k system
when testing against a broken ath10k AP. This patch
is slightly less protective, but probably will do the
job and is less redundant.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 6 May 2014 18:43:34 +0000 (14:43 -0400)]
Merge branch 'rfkill-gpio-cleanups' of git://git./linux/kernel/git/jberg/mac80211-next
Jahnavi Meher [Mon, 28 Apr 2014 19:33:53 +0000 (01:03 +0530)]
rsi: Changing opcode for sta mode according to changes in firmware
Signed-off-by: Jahnavi Meher <jahnavi.meher@redpinesignals.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Mon, 28 Apr 2014 15:47:08 +0000 (21:17 +0530)]
ath9k_hw: fix worse EVM for 11b rates
Adjust FIR filter co-efficients to improve EVM for 11b rates.
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Mon, 28 Apr 2014 15:47:07 +0000 (21:17 +0530)]
ath9k_hw: update ar9300 initvals
* rfsat gainchange hysteresis of rf_gain stuck with large
interference present.
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 26 Apr 2014 18:56:05 +0000 (20:56 +0200)]
b43: N-PHY: complete radio 0x2056 setup
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nickolay Ledovskikh [Fri, 25 Apr 2014 18:53:34 +0000 (22:53 +0400)]
ath5k: Fix AR5K_PHY_TXPOWER_RATE_MAX register value setting.
I was reading ath5k power setting code and
noticed typing error in ath5k_hw_txpower function.
Invalid value was written to AR5K_PHY_TXPOWER_RATE_MAX
register.
Signed-off-by: Nikolay Ledovskikh <nledovskikh@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Joe Perches [Fri, 25 Apr 2014 01:51:00 +0000 (18:51 -0700)]
iwlegacy: Convert /n to \n
Use a newline character appropriately.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Engelmayer [Thu, 24 Apr 2014 20:35:56 +0000 (22:35 +0200)]
wlcore: fix usage of platform_device_add_data()
Coverity CID 986698 reports leakage of struct wlcore_platdev_data in the
probe functions of both the SPI/SDIO interfaces. The structure passed to
platform_device_add_data() is dynamically allocated and only freed in the
error paths, however, platform_device_add_data() adds a copy of the platform
specific data to the device. Move the temporary struct that is kmemdup'ed
to the stack. This issue exists since
afb43e6d (wlcore: remove if_ops from
platform_data).
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Adam Lee [Thu, 24 Apr 2014 03:08:44 +0000 (11:08 +0800)]
rtlwifi: rtl8723be: disable MSI interrupts mode
94010fa0dd07e8b904e7c6b6589f15573008ab15 ("rtlwifi: add MSI interrupts
mode support") introduced MSI interrupts mode support, which seemed
safe enough with RTL8188EE and RTL8723BE as RealTek's testing results,
but some users reported their RTL8188EE modules could not connect to
any wireless network after the MSI mode was enabled by Ubuntu 14.04.
So, let's fallback to pin-based mode until rtlwifi's MSI support get
good compatibility.
BugLink: https://bugs.launchpad.net/bugs/1310512
Signed-off-by: Adam Lee <adam.lee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Adam Lee [Thu, 24 Apr 2014 03:08:43 +0000 (11:08 +0800)]
Revert "rtlwifi: rtl8188ee: enable MSI interrupts mode"
This reverts commit
2a54eb5e1476426ee639bbfbe179b52342a0d82c
("rtlwifi: rtl8188ee: enable MSI interrupts mode").
94010fa0dd07e8b904e7c6b6589f15573008ab15 ("rtlwifi: add MSI interrupts
mode support") introduced MSI interrupts mode support, which seemed
safe enough with RTL8188EE and RTL8723BE as RealTek's testing results,
but some users reported their RTL8188EE modules could not connect to
any wireless network after the MSI mode was enabled by Ubuntu 14.04.
So, let's fallback to pin-based mode until rtlwifi's MSI support get
good compatibility.
BugLink: https://bugs.launchpad.net/bugs/1310512
Signed-off-by: Adam Lee <adam.lee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 22 Apr 2014 11:54:37 +0000 (13:54 +0200)]
b43: don't pre-set radio_on variable to true
Setting it to true during init doesn't seem to be any workaround while
it can cause problems (not enabling radio due to belief it's enabled).
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 22 Apr 2014 11:54:36 +0000 (13:54 +0200)]
b43: use b43_software_rfkill helper
This removes dealing with pointers directly and allows tracking radio
state with radio_on variable.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 22 Apr 2014 11:54:35 +0000 (13:54 +0200)]
b43: bcma: respect GMODE (band choice) during core reset
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 30 Apr 2014 16:04:27 +0000 (12:04 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next
Conflicts:
net/mac80211/chan.c
John W. Linville [Wed, 30 Apr 2014 15:56:43 +0000 (11:56 -0400)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next
Jouni Malinen [Mon, 28 Apr 2014 08:22:46 +0000 (11:22 +0300)]
mac80211_hwsim: Advertise support for AP mode channel width changes
mac80211 takes care of all the needed steps for hwsim, so indicate
support for this capability.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jouni Malinen [Mon, 28 Apr 2014 08:22:25 +0000 (11:22 +0300)]
mac80211: Support dynamic AP mode channel width changes
Implement the new cfg80211 capability to enable mac80211-based drivers
to support for dynamic channel bandwidth changes (e.g., HT 20/40 MHz
changes).
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jouni Malinen [Mon, 28 Apr 2014 08:22:08 +0000 (11:22 +0300)]
cfg80211: Dynamic channel bandwidth changes in AP mode
This extends NL80211_CMD_SET_CHANNEL to allow dynamic channel bandwidth
changes in AP mode (including P2P GO) during a lifetime of the BSS. This
can be used to implement, e.g., HT 20/40 MHz co-existence rules on the
2.4 GHz band.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Zhao, Gang [Sat, 26 Apr 2014 01:43:41 +0000 (09:43 +0800)]
mac80211: remove unnecessary assignment
P2P_DEVICE doesn't support ieee80211_bss_info_change_notify() for now,
so it's not needed to set changed flags for P2P_DEVICE.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Zhao, Gang [Sat, 26 Apr 2014 01:43:40 +0000 (09:43 +0800)]
mac80211: avoid calling useless channel context code
ieee80211_assign_chanctx() checks if local->use_chanctx is true, so
the two code block related to ieee80211_assign_chanctx() can be moved
into above if clause, emphasize that these code are executed only if
local->use_chanctx is true.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
[change subject]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Rostislav Lisovy [Tue, 15 Apr 2014 12:37:56 +0000 (14:37 +0200)]
cfg80211: Use 5MHz bandwidth by default when checking usable channels
Current code checks if the 20MHz bandwidth is allowed for
particular channel -- if it is not, the channel is disabled.
Since we need to use 5/10 MHz channels, this code is modified in
the way that the default bandwidth to check is 5MHz. If the
maximum bandwidth allowed by the channel is smaller than 5MHz,
the channel is disabled. Otherwise the channel is used and the
flags are set according to the bandwidth allowed by the channel.
Signed-off-by: Rostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Rostislav Lisovy [Tue, 15 Apr 2014 12:37:55 +0000 (14:37 +0200)]
cfg80211: Add attributes describing prohibited channel bandwidth
Since there are frequency bands (e.g. 5.9GHz) allowing channels
with only 10 or 5 MHz bandwidth, this patch adds attributes that
allow keeping track about this information.
When channel attributes are reported to user-space, make sure to
not break old tools, i.e. if the 'split wiphy dump' is enabled,
report the extra attributes (if present) describing the bandwidth
restrictions. If the 'split wiphy dump' is not enabled,
completely omit those channels that have flags set to either
IEEE80211_CHAN_NO_10MHZ or IEEE80211_CHAN_NO_20MHZ.
Add the check for new bandwidth restriction flags in
cfg80211_chandef_usable() to comply with the restrictions.
Signed-off-by: Rostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Zhao, Gang [Mon, 21 Apr 2014 04:53:05 +0000 (12:53 +0800)]
mac80211: change return value of notifier function
Return NOTIFY_DONE if we don't care this time's notification, return
NOTIFY_OK if we successfully handled this time's notification. That's
the formal way to do it.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Zhao, Gang [Mon, 21 Apr 2014 04:53:04 +0000 (12:53 +0800)]
cfg80211: change return value of notifier function
Return NOTIFY_DONE if we don't care this time's notification, return
NOTIFY_OK if we successfully handled this time's notification. That's
the formal way to do it.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Zhao, Gang [Mon, 21 Apr 2014 04:53:03 +0000 (12:53 +0800)]
cfg80211: change wiphy_to_dev function name
Name wiphy_to_rdev is more accurate to describe what the function
does, i.e., return a pointer pointing to struct
cfg80211_registered_device.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Zhao, Gang [Mon, 21 Apr 2014 04:53:02 +0000 (12:53 +0800)]
cfg80211: change registered device pointer name
Name "dev" is too common and ambiguous, let all the pointer name
pointing to struct cfg80211_registered_device be "rdev". This can
improve code readability and consistency(since other places have
already called it rdev).
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Zhao, Gang [Mon, 21 Apr 2014 04:53:00 +0000 (12:53 +0800)]
mac80211: remove unnecessary BUG_ON()
The BUG_ON(!err) can't be triggered in the code path, so remove
it.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Zhao, Gang [Mon, 21 Apr 2014 04:52:59 +0000 (12:52 +0800)]
mac80211: return bool instead of numbers in yes/no function
And some code style changes in the function, and correct a typo in
comment.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Marek Kwaczynski [Mon, 14 Apr 2014 09:27:21 +0000 (11:27 +0200)]
mac80211: add option to generate CCMP IVs only for mgmt frames
Some chips can encrypt managment frames in HW, but
require generated IV in the frame. Add a key flag
that allows us to achieve this.
Signed-off-by: Marek Kwaczynski <marek.kwaczynski@tieto.com>
[use BIT(0) to fill that spot, fix indentation]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 9 Apr 2014 13:29:33 +0000 (15:29 +0200)]
mac80211: compute chanctx refcount on-the-fly
It doesn't make much sense to store refcount in
the chanctx structure. One still needs to hold
chanctx_mtx to get the value safely. Besides,
refcount isn't on performance critical paths.
This will make implementing chanctx reservation
refcounting a little easier.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 9 Apr 2014 13:29:32 +0000 (15:29 +0200)]
mac80211: fix racy usage of chanctx->refcount
Channel context refcount is protected by
chanctx_mtx. Accessing the value without holding
the mutex is racy. RCU section didn't guarantee
anything here.
Theoretically ieee80211_channel_switch() could
fail to see refcount change and read "1" instead
of, e.g. "2". This means mac80211 could accept CSA
even though it shouldn't have.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 9 Apr 2014 13:29:31 +0000 (15:29 +0200)]
mac80211: split ieee80211_free_chanctx()
The function did a little too much. Split it up so
the code can be easily reused in the future.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 9 Apr 2014 13:29:30 +0000 (15:29 +0200)]
mac80211: split ieee80211_new_chanctx()
The function did a little too much. Split it up so
the code can be easily reused in the future.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 9 Apr 2014 13:29:29 +0000 (15:29 +0200)]
mac80211: improve chanctx reservation lookup
Use a separate function to look for reservation
chanctx. For multi-interface/channel reservation
search sematics differ slightly.
The new routine allows reservations to be merged
with chanctx that are already reserved by other
interface(s).
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 9 Apr 2014 13:29:28 +0000 (15:29 +0200)]
mac80211: improve find_chanctx() for reservations
This allows new vifs to be assigned to a chanctx
as long as chanctx's reservation chandefs (if any)
and chanctx's current chandef (implied by assigned
vifs at the time, if any) and the new vif chandef
are all compatible.
This implies it is impossible to assign a new vif
to an in-place reservation chanctx.
This gives no advantages for single-channel
hardware. It makes sense for multi-channel
hardware only.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 9 Apr 2014 13:29:27 +0000 (15:29 +0200)]
mac80211: track reserved vifs in chanctx
This can be useful. Provides a more straghtforward
way to iterate over interfaces taking part in
chanctx reservation and allows tracking chanctx
usage explicitly.
The structure is protected by local->chanctx_mtx.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 9 Apr 2014 13:29:26 +0000 (15:29 +0200)]
mac80211: track assigned vifs in chanctx
This can be useful. Provides a more straghtforward
way to iterate over interfaces bound to a given
chanctx and allows tracking chanctx usage
explicitly.
The structure is protected by local->chanctx_mtx.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 9 Apr 2014 13:29:25 +0000 (15:29 +0200)]
mac80211: add support for radar detection for reservations
Initial chanctx reservation code wasn't aware of
radar detection requirements. This is necessary
for chanctx reservations to be used for channel
switching in the future.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 9 Apr 2014 13:29:24 +0000 (15:29 +0200)]
mac80211: prevent chanctx overcommit
Do not allocate more channel contexts than a
driver is capable for currently matching interface
combination.
This allows the ieee80211_vif_reserve_chanctx() to
act as a guard against breaking interface
combinations.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 9 Apr 2014 13:29:23 +0000 (15:29 +0200)]
mac80211: add max channel calculation utility function
The utility function has no uses yet. It is aimed
at future chanctx reservation management and
channel switching.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 9 Apr 2014 13:29:22 +0000 (15:29 +0200)]
cfg80211: allow drivers to iterate over matching combinations
The patch splits cfg80211_check_combinations()
into an iterator function and a simple iteration
user.
This makes it possible for drivers to asses how
many channels can use given iftype setup. This in
turn can be used for future
multi-interface/multi-channel channel switching.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ilan Peer [Wed, 23 Apr 2014 06:22:58 +0000 (09:22 +0300)]
cfg80211: Fix GO Concurrent relaxation on UNII-3
At some locations, channels 149-165 are considered a single
bundle, while at some other locations, e.g., Indonesia, channels
149-161 are considered a single bundle, while channel 165 belongs
to a different bundle. This means that:
1. A station interface connection to an AP on channel 165 allows
the instantiation of a P2P GO on channels 149-165.
2. A station interface connection to an AP on channels 149-161
does NOT allow the instantiation of a P2P GO on channel 165.
Fix this.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
John W. Linville [Fri, 25 Apr 2014 01:33:55 +0000 (21:33 -0400)]
Revert "mwifiex: add firmware dump feature for PCIe"
This reverts commit
e050c76fcf49599c5b98e4614392dc87c69123a6.
I'm not sure what crack pipe I was using when I merged this...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Poulain, Loic [Tue, 1 Apr 2014 14:56:17 +0000 (14:56 +0000)]
Bluetooth: Remove hci_h4 unused defines
H4 states are not used anymore.
Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Petri Gynther [Tue, 15 Apr 2014 20:00:00 +0000 (13:00 -0700)]
Bluetooth: btmrvl: Fix btmrvl_send_module_cfg_cmd()
Change subcmd parameter from int to u8 to match its use:
btmrvl_send_sync_cmd(priv, BT_CMD_MODULE_CFG_REQ, &subcmd, 1);
Signed-off-by: Petri Gynther <pgynther@google.com>
Reviewed-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Marcel Holtmann [Thu, 17 Apr 2014 03:04:38 +0000 (20:04 -0700)]
Bluetooth: Return EOPNOTSUPP for HCISETRAW ioctl command
The HCISETRAW ioctl command is not really useful. To utilize raw and
direct access to the HCI controller, the HCI User Channel feature has
been introduced. Return EOPNOTSUPP to indicate missing support for
this command.
For legacy reasons hcidump used to use HCISETRAW for permission check
to return proper error codes to users. To keep backwards compability
return EPERM in case the caller does not have CAP_NET_ADMIN capability.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Rafał Miłecki [Mon, 21 Apr 2014 08:54:29 +0000 (10:54 +0200)]
b43: remove list of IEEE 802.11 devices
This is the first step to remove leftover code.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 20 Apr 2014 18:30:58 +0000 (20:30 +0200)]
b43: ssb: refuse to support more than IEEE 802.11 core
Some ancient Broadcom devices had one core per band, e.g.:
ssb: Found chip with id 0x4306, rev 0x02 and package 0x00
ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x02, vendor 0x4243)
ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x04, vendor 0x4243)
ssb: Core 2 found: PCMCIA (cc 0x80D, rev 0x01, vendor 0x4243)
ssb: Core 3 found: V90 (cc 0x807, rev 0x01, vendor 0x4243)
ssb: Core 4 found: PCI (cc 0x804, rev 0x07, vendor 0x4243)
ssb: Core 5 found: IEEE 802.11 (cc 0x812, rev 0x04, vendor 0x4243)
This hardware model was dropped for newer devices handled by b43.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 20 Apr 2014 11:05:51 +0000 (13:05 +0200)]
b43: N-PHY: enable forgotten write of hw power adjust table
We've implemented table calculation, but forgot to enable writing it in
power setup function.
By the way document table layout.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 20 Apr 2014 11:05:50 +0000 (13:05 +0200)]
b43: N-PHY: fix selection of init & calib values
Logic in specs and our code was wrong. Init and calibration values for
newer cards depend on radio revision, not PHY revision.
To make code clearer, change tables names to include "radio" or "phy".
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 20 Apr 2014 11:05:49 +0000 (13:05 +0200)]
b43: N-PHY: add init & calib values for radio 0x2056 rev 11
They were extracted from MMIO dumps of 14e4:4353 and wl 6.30.223.141.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 20 Apr 2014 11:05:48 +0000 (13:05 +0200)]
b43: N-PHY: prepare for rev 7+ RSSI calibration
Mostly just add place for future code
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 20 Apr 2014 11:05:47 +0000 (13:05 +0200)]
b43: N-PHY: implement RF control INTC for revs 7+
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 20 Apr 2014 11:05:46 +0000 (13:05 +0200)]
b43: N-PHY: implement reading support for radio 0x2057
Bit 0x200 has been noticed in the following log:
radio_read(0x02ca) -> 0x0000
radio_write(0x00ca) <- 0x0080
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 20 Apr 2014 11:05:45 +0000 (13:05 +0200)]
b43: N-PHY: random updates and typo fixes all around
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 20 Apr 2014 11:05:44 +0000 (13:05 +0200)]
b43: N-PHY: rev3+: complete workarounds
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 20 Apr 2014 11:05:43 +0000 (13:05 +0200)]
b43: N-PHY: drop second noise variance table
New Broadcom drivers don't upload it anymore. It was probably a copy & paste
mistake in early N-PHY rev 3+ days.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 19 Apr 2014 21:10:05 +0000 (23:10 +0200)]
b43: G-PHY: fix random mistakes to match specs
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Thu, 17 Apr 2014 18:47:03 +0000 (11:47 -0700)]
mwifiex: enable aggregation for TID 6 and 7 streams
Currently AMSDU and AMPDU aggregation is enabled for TID 0 to
TID 5 streams. Lets enable it for remaining two streams also.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Thu, 17 Apr 2014 18:47:02 +0000 (11:47 -0700)]
mwifiex: increase tx/rx AMPDU window sizes for STA 11ac mode
This will help to aggregate more packets which yields better
throughput results for 11ac chipsets.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Thu, 17 Apr 2014 18:47:01 +0000 (11:47 -0700)]
mwifiex: increase tx/rx AMPDU window sizes for STA 11n mode
This will help to aggregate more packets which yields better
throughput results.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Thu, 17 Apr 2014 18:47:00 +0000 (11:47 -0700)]
mwifiex: add firmware dump feature for PCIe
Firmware dump feature is added for PCIe based chipsets.
Separate file will be created at /var/log/fw_dump_*
for each memory segment.
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>
Amitkumar Karwar [Thu, 17 Apr 2014 18:46:59 +0000 (11:46 -0700)]
mwifiex: add fw_dump debugfs file
This option be useful to dump firmware memory for debugging
purpose. Actual code to dump firmware momory for SDIO and PCIe
chipsets will be added later.
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>
Stanislaw Gruszka [Thu, 17 Apr 2014 09:08:48 +0000 (11:08 +0200)]
rt2x00: restore original beaconing state
After changing local per interface beacon setting restore original
global beaconing state.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Thu, 17 Apr 2014 05:01:54 +0000 (22:01 -0700)]
mwifiex: don't clear cmd_sent flag in timeout handler
When command timeout occurs due to a firmware/hardware bug,
there is no chance of next command being successful. We will
keep cmd_sent flag on so that next command won't be sent to
firmware.
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>
Amitkumar Karwar [Thu, 17 Apr 2014 05:01:53 +0000 (22:01 -0700)]
mwifiex: fix IE parsing issues
IE's are parsed from beacon buffer and stored locally using
mwifiex_update_bss_desc_with_ie() function.
Sometimes the local pointers point to the data inside IE, but
while using them it is assumed that they are pointing to the IE
itself.
These issues are fixed in this patch.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Mon, 14 Apr 2014 22:32:55 +0000 (15:32 -0700)]
mwifiex: remove redundant 'fw_load' completion structure
'add_remove_card_sem' semaphore already takes care of
synchronization for driver load and unload threads.
Hence there won't be a case when unload thread is waiting on
'wait_for_completion(fw_load)'.
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>
Amitkumar Karwar [Mon, 14 Apr 2014 22:32:54 +0000 (15:32 -0700)]
mwifiex: use USB core's soft_unbind option
This option allows driver to finish pending operations in
disconnect handler by not killing URBs after usb_deregister
call.
We will get rid of global pointer 'usb_card' by moving code
from cleanup_module() to disconnect(). This will help to match
with our handling for SDIO and PCIe interfaces.
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>
Avinash Patil [Mon, 14 Apr 2014 22:32:53 +0000 (15:32 -0700)]
mwifiex: update timestamp information for aggregation packets
New skbs are allocated at the time of AMSDU aggregation. Setting
up in timestamps for such skbs was missing which would result
into wrong queue delays passed to FW. Fix this by setting
timestamp of skbs created for AMSDU aggregation.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Mon, 14 Apr 2014 22:32:52 +0000 (15:32 -0700)]
mwifiex: increase the number of nodes in command pool
Command nodes are increased from 20 to 50. Now we can always
scan 1 channel per scan command to avoid traffic delay/loss in
connected state. We will get rid of *CHANNEL_PER_SCAN_CMD macros
used due to command node constraints.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Mon, 14 Apr 2014 22:32:51 +0000 (15:32 -0700)]
mwifiex: improve AMSDU packet aggregation for PCIe and SDIO
For PCIe, aggregate more AMSDU packets till PCIe TXBD is full.
For SDIO, aggregation was disabled for AMSDU packets because
AMSDU aggregated packet size is already 4K or 8K, SDIO Multiport
Aggregation feature didn't use to gain much previously.
Now with increased multiport aggregation buffer, we can enable
it for AMSDU packets.
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>
Amitkumar Karwar [Mon, 14 Apr 2014 22:32:50 +0000 (15:32 -0700)]
mwifiex: increase SDIO multiport aggregation buffer sizes
Currently Tx and Rx buffer sizes are 8K and 16K respectively for
all chipsets. We will change them to 32K for SD8897 and 16K for
older chipsets. SD8897 chipset has more SDIO data ports than
older chipsets.
This patch will help to improve throughput numbers.
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>
Maithili Hinge [Mon, 14 Apr 2014 22:32:49 +0000 (15:32 -0700)]
mwifiex: change memset to simple assignment for ht_cap.mcs.rx_mask
WARNING: single byte memset is suspicious.
Swapped 2nd/3rd argument?
This code happens to work because rx_mcs is the first variable
in mcs structure. We should use 'mcs.rx_mcs' here anyway.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Maithili Hinge <maithili@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Tue, 8 Apr 2014 08:36:19 +0000 (11:36 +0300)]
wil6210: Use larger Tx rings
When using scatter-gather, more descriptor entries get used.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Tue, 8 Apr 2014 08:36:18 +0000 (11:36 +0300)]
wil6210: relaxed check for BACK start sequence
Sometimes, due to the race between Rx path and WMI_BA_STATUS_EVENTID WMI event,
few frames may be passed to the stack before reorder buffer allocated.
Then, after BACK establishment, it start getting frames with sequence number ahead of
SSN, and it get interpreted as missing frames. Then, BACK mechanism will wait
for missing frames; data traffic will be stopped. In case of interface configured
for DHCP, this data delay causes DHCP failure.
Relax checking for sequence number; use sequence of 1-st frame handled by the buffer
as SSN for this buffer.
This is work-around, real fix should be done when proper BACK mechanism implemented.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Tue, 8 Apr 2014 08:36:17 +0000 (11:36 +0300)]
wil6210: sync with the latest FW API
- add pcp_max_assoc_sta to the struct wmi_pcp_start_cmd
- enum for the scan ststus
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Tue, 8 Apr 2014 08:36:16 +0000 (11:36 +0300)]
wil6210: fix printouts for better readability
Reshuffle prints to consolidate firmware/hardware information
report upon card init
Convert print for unhandled MISC ISR bits to "debug" - it is
normal situation and not an "error"
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 5 Apr 2014 22:37:03 +0000 (00:37 +0200)]
ath9k: implement p2p client powersave support
Use generic TSF timers to trigger powersave state changes based
information from the P2P NoA attribute.
Opportunistic Powersave is not handled, because the driver does not
support powersave at the moment.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 5 Apr 2014 22:37:02 +0000 (00:37 +0200)]
ath9k: support only one P2P interface
Preparation for adding P2P powersave and multi-channel support.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Julia Lawall [Tue, 1 Apr 2014 13:49:18 +0000 (15:49 +0200)]
ray_cs: replace del_timer by del_timer_sync
Use del_timer_sync to ensure that the timer is stopped on all CPUs before
the driver exits.
This change was suggested by Thomas Gleixner.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r@
identifier i,t,ex;
@@
struct t i = { .remove = ex, };
@@
identifier r.ex;
@@
ex(...) {
<...
- del_timer
+ del_timer_sync
(...)
...>
}
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Fri, 4 Apr 2014 16:25:51 +0000 (18:25 +0200)]
rtl8180: be paranoid in stopping unused queues.
HW should never attempt to perform DMA for unused queues.
For rtl8187se this is ensured by setting a dedicated register at
init time, before enabling TX.
In rtl8180/5 the register is only written at the first TX (because
in rtl8180/5 it serves also to kick DMA for used queues).
This should be enough, but it's worth to add a register write at
init time, before enabling TX.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Fri, 4 Apr 2014 16:24:36 +0000 (18:24 +0200)]
rtl8180: add parentheses to REG_ADDR macros
Parentheses are missing around the macro argument, causing the
macro possibly not to work passing certain expressions as
arguments.
This should not cause any issues with current code, however it's
worth to add them, as a good practice, and to eventually avoid
future bugs.
Suggested-by: Dave Kilroy <kilroyd@googlemail.com>
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Fri, 4 Apr 2014 16:21:14 +0000 (18:21 +0200)]
rtl8180: fix enabled interrupt mask for rtl8187se
When preparing the bitfield to write to HW register, the high-priority
queue error interrupt bit is set two times, and the beacon queue
TX-OK interrupt is not enabled.
Currently this have no functional impact because the high-priority
queue is not used at all, and the beacon queue is not used yet.
This patch removes high-priority queue bits and it adds the
beacon queue missing bit.
It removes also the management queue bits because it is not used.
This was found by static code analyzer.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [ original patch ] [Tue, 8 Apr 2014 18:25:25 +0000 (20:25 +0200)]
rtl8180: change module name in rtl818x_pci
rtl8180 driver can handle also rtl8185 and rtl8187SE cards,
however in userspace tools (network manager) it still appares
as "rtl8180".
This might lead the user to think the wrong driver is in use.
This patch changes module name to "rtl818x_pci" that should be
more explanatory.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> [ original patch ]
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 22 Apr 2014 19:02:03 +0000 (15:02 -0400)]
Merge branch 'for-linville' of git://github.com/kvalo/ath
John W. Linville [Tue, 22 Apr 2014 19:01:24 +0000 (15:01 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next
Bob Copeland [Tue, 15 Apr 2014 14:43:08 +0000 (10:43 -0400)]
mac80211: mesh: always use the latest target_sn
When a path target responds to a path request, its response
always contains the most up-to-date information; accordingly,
it should use the latest target_sn, regardless of
net_traversal_jiffies(). Otherwise, only the first path
response is considered when constructing a path, as it will
have the highest target_sn of all replies during that period.
Signed-off-by: Bob Copeland <bob@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bob Copeland [Tue, 15 Apr 2014 14:43:07 +0000 (10:43 -0400)]
mac80211: fix mesh_add_rsn_ie IE finding loop
Previously, the code to copy the RSN IE from the mesh config
would increment its pointer by one in the loop instead of by
the element length, so there was the potential for mistaking
another IE's data fields as the RSN IE.
cfg80211_find_ie() exists, so just use that.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>