summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-07-21mac80211: set TDLS capab to zero on failure framesArik Nemtsov
When sending setup-failure frames, set the capability field to zero, as mandated by the specification (IEEE802.11-2012 8.5.13). Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Liad Kaufman <liad.kaufman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-07-21mac80211: avoid adding some IEs on TDLS setup failure packetsArik Nemtsov
Most setup-specific information elements are not to be added when a setup frame is sent with an error status code. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Liad Kaufman <liad.kaufman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-07-21mac80211: split extra TDLS IEs in setup framesArik Nemtsov
When building TDLS setup frames, use the IE order mandates in the specification, splitting extra IEs coming from usermode. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-07-21mac80211: consolidate TDLS IE treatmentArik Nemtsov
Add all information elements for TDLS discovery and setup in the same function. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Liad Kaufman <liad.kaufman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-07-21mac80211: fix error path for TDLS setupArik Nemtsov
The patch "8f02e6b mac80211: make sure TDLS peer STA exists during setup" broke TDLS error paths where the STA doesn't exist when sending the error. Fix it by only testing for STA existence during a non-error flow. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-07-21mac80211: track TDLS initiator internallyArik Nemtsov
Infer the TDLS initiator and track it in mac80211 via a STA flag. This avoids breaking old userspace that doesn't pass it via nl80211 APIs. The only case where userspace will need to pass the initiator is when the STA is removed due to unreachability before a teardown packet is sent. Support for unreachability was only recently added to wpa_supplicant, so it won't be a problem in practice. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-07-21iwlwifi: mvm: Define AUX ROC CommandAriej Marjieh
Add new AUX ROC command that is intended for HS2.0 purposes. It is used to send ANQP requests on a specific channel. This command requests the firmware to trigger a time event and remain on a certain channel for a given duration. Triggering the time event is done by using the Aux Framework in the firmware, and makes use of the Aux station (similarly to scan). Signed-off-by: Ariej Marjieh <ariej.marjieh@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-21iwlwifi: mvm: Enabling Aux QueueAriej Marjieh
Enabling the Aux queue and mapping it to FIFO 5. Defining the Aux queue for the Aux station. Signed-off-by: Ariej Marjieh <ariej.marjieh@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-21iwlwifi: mvm: add some missing iwl_mvm_ref_sync() callsEliad Peller
Add iwl_mvm_ref_sync() calls (with new ref types) to flows that might access the device directly. These calls make sure the device is out of d0i3, and the bus is available for direct access. Since some of these functions are reentrant, convert the refs_bitmap to a ref counter, so multiple refs of the same type could be taken concurrently. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-21iwlwifi: mvm: fix wrong offset while reading from NVMEytan Lifshitz
As part of thermal throttling, some data is being read from NVM. The offset is in words, but was addressed as in octets. fixed. Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-21iwlwifi: mvm: pass beacons from foreign APsEliad Peller
In AP mode, configure the fw to pass beacons from foreign APs, in order to be able to set the ht protection IE properly. Add the same filters in case of GO (which didn't have any configured filter_flags, probably by mistake) Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-21iwlwifi: mvm: use C99 initializers for add_staEmmanuel Grumbach
Instead of code the fixed values, use a C99 initializer. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-21iwlwifi: fix Kconfig issuesEmmanuel Grumbach
Randy fixes a few issues in iwlwifi's Kconfig. Because of this, 'Debugging options' was not indented under iwlwifi using menuconfig. I added a few other fixes on the way, like the link to the website and added 7265 in the supported NICs. Reported-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Johannes Berg <johannes.berg@intel.com> [ Commit message + other fixes ] Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-21iwlwifi: add max RX aggregation sizeOren Givon
Allow to configure the maximal Rx AMPDU size per device. Signed-off-by: Oren Givon <oren.givon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-07-21NFC: digital: Add digital framing calls when in target modeMark A. Greer
Add new "NFC_DIGITAL_FRAMING_*" calls to the digital layer so the driver can make the necessary adjustments when performing anticollision while in target mode. The driver must ensure that the effect of these calls happens after the following response has been sent but before reception of the next request begins. Acked-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-07-21NFC: digital: Clear poll_tech_count before activating targetMark A. Greer
Currently, digital_target_found() has a race between the events started by calling nfc_targets_found() (which ultimately expect ddev->poll_tech_count to be zero) and setting ddev->poll_tech_count to zero after the call to nfc_targets_found(). When the race is "lost" (i.e., ddev->poll_tech_count is found to not be zero by the events started by nfc_targets_found()), an error message is printed and the target is not found. A similar race exists when digital_tg_recv_atr_req() calls nfc_tm_activated(). Fix this by first saving the current value of ddev->poll_tech_count and then clearing it before calling nfc_targets_found()/nfc_tm_activated(). Clearing ddev->poll_tech_count before calling nfc_targets_found()/nfc_tm_activated() eliminates the race. Saving the value is required so it can be restored when nfc_targets_found()/nfc_tm_activated() fails and polling needs to continue. Acked-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-07-21NFC: digital: Check for NFC-DEP before checking for Type 4 tagMark A. Greer
In digital_in_recv_sel_res(), the code that determines the tag type will interpret bits 7:6 (lsb being b1 as per the Digital Specification) of a SEL RES set to 11b as a Type 4 tag. This is okay except that the neard will interpret the same value as an NFC-DEP device (in src/tag.c:set_tag_type() in the neard source). Make the digital layer's interpretation match neard's interpretation by changing the order of the checks in digital_in_recv_sel_res() so that a value of 11b in bits 7:6 is interpreted as an NFC-DEP device instead of a Type 4 tag. Acked-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-07-20Bluetooth: Remove unneeded variable assignment in hmac_sha256Marcel Holtmann
The variable ret does not need to be assigned when declaring it. So remove this initial assignment. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-20Bluetooth: Fix endian and alignment issue with ath3k version handlingMarcel Holtmann
The ath3k driver is treating the version information badly when it comes to loading the right firmware version and comparing that it actually matches with the hardware. Initially this showed up as this: CHECK drivers/bluetooth/ath3k.c drivers/bluetooth/ath3k.c:373:17: warning: cast to restricted __le32 drivers/bluetooth/ath3k.c:435:17: warning: cast to restricted __le32 However when fixing this by actually using __packed and __le32 for the ath3_version structure, more issues came up: CHECK drivers/bluetooth/ath3k.c drivers/bluetooth/ath3k.c:381:32: warning: incorrect type in assignment (different base types) drivers/bluetooth/ath3k.c:381:32: expected restricted __le32 [usertype] rom_version drivers/bluetooth/ath3k.c:381:32: got int [signed] <noident> drivers/bluetooth/ath3k.c:382:34: warning: incorrect type in assignment (different base types) drivers/bluetooth/ath3k.c:382:34: expected restricted __le32 [usertype] build_version drivers/bluetooth/ath3k.c:382:34: got int [signed] <noident> drivers/bluetooth/ath3k.c:386:28: warning: restricted __le32 degrades to integer drivers/bluetooth/ath3k.c:386:56: warning: restricted __le32 degrades to integer This patch fixes every instance of the firmware version handling and makes sure it is endian safe and uses proper unaligned access. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-20Bluetooth: Disable HCI_CONNECTABLE based passive scanning for nowJohan Hedberg
When HCI_CONNECTABLE is set the code has been enabling passive scanning in order to be consistent with BR/EDR and accept connections from any device doing directed advertising to us. However, some hardware (particularly CSR) can get very noisy even when doing duplicates filtering, making this feature waste resources. Considering that the feature is for fairly corner-case use (devices who'd use directed advertising would likely be in the whitelist anyway) it's better to disable it for now. It may still be brought back later, possibly with a better implementation (e.g. through improved scan parameters). Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2014-07-19Bluetooth: btmrvl: add public address configuration supportAmitkumar Karwar
.set_bdaddr handler is implemented for public address configuration. A reboot restores the bdaddr to its original address. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2014-07-19Bluetooth: add public address configuration for Marvell USB devicesAmitkumar Karwar
Implemented .set_bdaddr handler provided by bluetooth stack for Marvell devices for public address configuration. A reboot restores the bdaddr to its original address. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2014-07-18mwifiex: remove redundant timestamps in debug printsBing Zhao
We don't need wall-clock time here, and in most configurations that care, there are already timestamps in the kernel using CONFIG_PRINTK_TIME=y. Reported-by: Paul Stewart <pstew@chromium.org> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18mwifiex: do not re-associate when already connectedUjjal Roy
In managed mode if the driver is getting a re-associate command from cfg80211, driver deauthenticates with the AP internally and sends a disconnected event to cfg80211 before completion of its association process. The disconnected event then modifies the SSID length as wdev->ssid_len = 0. So, upon receiving the connect result event from driver, cfg80211 is unable to get that BSS from the device's BSS list and generates the following WARN_ON message. WARNING: CPU: 0 PID: 857 at net/wireless/sme.c:658 __cfg80211_connect_result+0x3a6/0x3e0 [cfg80211]() Avoid re-association while the device is already associated to a network. Also remove the internal deauthentication from the association path. Signed-off-by: Ujjal Roy <royujjal@gmail.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18mwifiex: remove needless current_bssid variableAvinash Patil
This local variable is not used anywhere in function. 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>
2014-07-18b43: N-PHY: update spur avoidance to support newer devicesRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18b43: use one shared function for setting MAC frequencyRafał Miłecki
By the way add few chipsets that were tracked with "wl" dumps. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18b43: N-PHY: set band on every channel switchRafał Miłecki
Seems to be required by some hardware, wl does it every time. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18b43: N-PHY: complete 0x2057 radio init calibrationRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18b43: N-PHY: add tables for radio 0x2057 rev 14Rafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18b43: N-PHY: fix channel switching with 2 GHz radio 0x2057Rafał Miłecki
Values were written to wrong registers. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18ath9k: drop negativity checks for unsigned values coming from kstrtoul()Andrey Utkin
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80471 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80481 Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18ath9k: set up tx power into the MRRLorenzo Bianconi
Set up tx power for each MRR segment in the tx descriptor Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18ath9k: fix pending tx frames accountingFelix Fietkau
Packets originally buffered for the regular hardware tx queues can end up being transmitted through the U-APSD queue (via PS-Poll or U-APSD). When packets are dropped due to retransmit failures, the pending frames counter is not always updated properly. Fix this by keeping track of the queue that a frame was accounted for in the ath_frame_info struct, and using that on completion to decide whether the counter should be updated. This fixes some spurious transmit queue hangs. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18bcma: add support for BCM43217 found in Tenda W322E (14e4:43a9)Rafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18bcma: extract antenna gains from SPROM correctlyRafał Miłecki
Just like in case of SSB SPROMs they are encoded in a bit tricky way. SPROM struct already uses s8 type and it's supposed to store decoded values. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18ssb: extract power info from SPROM revs 4 and 5Rafał Miłecki
This is needed to properly handle early 802.11n devices like BCM4321. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18wil6210: add new register region for AGC tableVladimir Kondratiev
New register area defined in the firmware Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18wil6210: map RGF_USER_USAGE_1 on the debugfsVladimir Kondratiev
Firmware sets this register with the offset of the firmware trace area within the peripheral memory region. Critical for the firmware trace to work Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18wil6210: use same mapping table for FW addr translation and debugfsVladimir Kondratiev
Use single data source for all information regarding the firmware memory map. With this change "ucode_xxx" regions disappears since they are in fact part of larger "upper area" region Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18wil6210: fix memory leak on error path in wil_write_file_rxon()Vladimir Kondratiev
If copy_from_user() fails, buffer allocated for parameters would leak Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18wil6210: fix double definition of 'ctx'Vladimir Kondratiev
Variable 'ctx' declarad again in the inner loop. Should use one from outer loop instead. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18wil6210: export FW/HW versions through debugfsVladimir Kondratiev
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18wil6210: support for "sparrow" hardwareVladimir Kondratiev
New hardware release appears; it require some changes to properly support it. Introduce struct wil_board and "board" attribute in wil6210_priv; keep hardware variant information in this structure. fill it on probe(). Used in the reset flow. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18Merge tag 'for-linville-20140717' of git://github.com/kvalo/athJohn W. Linville
2014-07-18Merge branch 'for-upstream' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
2014-07-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211John W. Linville
2014-07-18Bluetooth: Use EOPNOTSUPP instead of ENOTSUPPJohan Hedberg
The EOPNOTSUPP and ENOTSUPP errors are very similar in meaning, but ENOTSUPP is a fairly new addition to POSIX. Not all libc versions know about the value the kernel uses for ENOTSUPP so it's better to use EOPNOTSUPP to ensure understandable error messages. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2014-07-18cfg80211: fix mic_failure tracingEliad Peller
tsc can be NULL (mac80211 currently always passes NULL), resulting in NULL-dereference. check before copying it. Cc: stable@vger.kernel.org Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-07-18mac80211: suppress unused variable warning without lockdepJohannes Berg
When lockdep isn't compiled, a local variable isn't used (it's only in a macro argument), annotate it to suppress the compiler warning. Signed-off-by: Johannes Berg <johannes.berg@intel.com>