summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* brcmfmac: use irq safe spinlock in brcmf_sdbrcm_txdata()Arend van Spriel2013-08-152-3/+8
| | | | | | | | | | | | Firmware-signalling needs transmit to firmware to be atomic and uses a spinlock with irq disabled. Therefor, brcmf_sdbrcm_txdata() should not use spin_unlock_bh() as it would enable the interrupts. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge tag 'nfc-next-3.12-1' of ↵John W. Linville2013-08-1513-123/+810
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next Samuel Ortiz <sameo@linux.intel.com> says: "This is the first NFC pull request for the 3.12 release. With this one we have: - A few pn533 improvements and minor fixes. Testing our pn533 driver against Google's NCI stack triggered a few issues that we fixed now. We also added Tx fragmentation support to this driver. - More NFC secure element handling. We added a GET_SE netlink command for getting all the discovered secure elements, and we defined 2 additional secure element netlink event (transaction and connectivity). We also fixed a couple of typos and copy-paste bugs from the secure element handling code. - Firmware download support for the pn544 driver. This chipset can enter a special mode where it's waiting for firmware blobs to replace the already flashed one. We now support that mode." Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * NFC: Update secure element stateArron Wang2013-08-141-0/+4
| | | | | | | | | | | | | | | | The secure element state was not updated from the enable/disable ops, leaving the SE state to disabled for ever. Signed-off-by: Arron Wang <arron.wang@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: Fix secure element state checkArron Wang2013-08-141-2/+2
| | | | | | | | | | | | | | | | Another typo from the initial commit where we check for the secure element type field instead of its state when enabling or disabling it. Signed-off-by: Arron Wang <arron.wang@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: hci: Fix enable/disable confusionDan Carpenter2013-08-141-1/+1
| | | | | | | | | | | | | | | | There is a cut and paste bug so we enable a second time instead of disabling. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn544: i2c: Add firmware download implementation for pn544Eric Lapuyade2013-08-141-12/+334
| | | | | | | | | | | | | | | | | | | | The pn544 can enter a firmware update mode where firmware blobs can be pushed through the i2c line and flashed on the target. A special command allows to verify that blobs are correctly flashed and this is what we do for every downloaded firmware blob. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn544: Add firmware operations hci opsEric Lapuyade2013-08-144-4/+21
| | | | | | | | | | | | | | | | | | The firmware operation callback is passed by the physical layer to the hci driver during probe. All the driver does is to store it and call it when the fw_upload hci ops is invoked. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: netlink: Add result of firmware operation to completion eventEric Lapuyade2013-08-145-5/+19
| | | | | | | | | | | | | | | | | | | | Result is added as an NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS attribute containing the standard errno positive value of the completion result. This event will be sent when the firmare download operation is done and will contain the operation result. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn544: i2c: Add firmware download mode power-on supportEric Lapuyade2013-08-143-6/+14
| | | | | | | | | | | | | | | | This is in preparation for pn544-i2c firmware download feature, where we need to know if we're in regular or firmware upload mode. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: Move nfc_fw_download_done() definition from private to publicEric Lapuyade2013-08-142-2/+2
| | | | | | | | | | | | | | | | This API must be called by NFC drivers, and its prototype was incorrectly placed. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn533: Add some polling entropySamuel Ortiz2013-08-141-1/+6
| | | | | | | | | | | | | | | | | | | | By not always starting the polling loop from the same modulation, we avoid entering infinite loops where devices exporting 2 targets (on 2 different modulations) get the same target activated over and over. If this target is not readable (e.g. a wallet emulating a tag), we will stay in an error loop for ever. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn533: Add delay between each poll frameSamuel Ortiz2013-08-141-5/+11
| | | | | | | | | | | | | | | | It seems that some pn533 firmwares go belly up when being asked to send poll frames too frequently. Adding a 10ms delay between each of them calm the chip down and prevent it from crashing. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: Add a GET_SE netlink APISamuel Ortiz2013-08-142-0/+93
| | | | | | | | | | | | | | | | In order to fetch the discovered secure elements from an NFC controller, we need to send a netlink command that will dump the list of available SEs from NFC. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: Fix SE discovery failure warning conditionSamuel Ortiz2013-08-141-1/+1
| | | | | | | | | | | | | | | | This is a typo coming from the initial implementation. se_discover fails when it returns something different than zero and we should only display a warning in that case. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn533: Store the correct frame size (normal vs ext)Olivier Guiter2013-08-141-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | The extended information frame are sent by PN533 to exchange frames larger than 255 bytes. These extended frame are very close from the standard ones except for the header size length. On each incoming frame, we set the correct header length, and we do that only for the standard pn533 chipsets as the acr122 does not seem to support extended frames properly. Signed-off-by: Olivier Guiter <olivier.guiter@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn533: Split large Tx frames in chunksOlivier Guiter2013-08-141-14/+130
| | | | | | | | | | | | | | | | On sending large frames (size > 262), we split it in multiple chunks and send them asynchronously with MI bit. Signed-off-by: Olivier Guiter <olivier.guiter@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn533: Add extended information frame decoding supportOlivier Guiter2013-08-141-13/+72
| | | | | | | | | | | | | | | | | | | | | | Extended Information frames are slightly different from standard frames as they can (theorically) handle datas up tu 64kB. PN533 firmware only supports packet data up to 265 (incl. TFI byte) This kind of frame are used when the pn533 wants to exchange more than 255 bytes, and this patch handles the reception of such frames. Signed-off-by: Olivier Guiter <olivier.guiter@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn533: Enable AUTO RFCASamuel Ortiz2013-08-141-3/+6
| | | | | | | | | | | | | | | | | | The AUTO RFCA bit forbids the pn533 chipset to turn its radio on whenever an external field is present. Without this bit set, some devices seems to get over flood by the pn533 rf field and thus become hardly detectable. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn533: Unconditionaly select the highest p2p bit rateSamuel Ortiz2013-08-141-36/+20
| | | | | | | | | | | | | | p2p devices must be able to support 424 kbps, so we should always select that bitrate in initiator mode. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn533: Request System code from SENSF_REQSamuel Ortiz2013-08-141-2/+2
| | | | | | | | | | | | | | Some devices are getting confused when not being asked for their system code with type F. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn533: Fix the pn533 polling loopSamuel Ortiz2013-08-141-1/+54
| | | | | | | | | | | | | | | | | | By turning the radio off after each failed polling try, we dramatically improve the pn533 polling loop efficiency. Without this fix, all Android phones running the broadcom NFC stack are almost never detected. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: pn533: Fix hardware busy loop when establishing the LLCP linkSamuel Ortiz2013-08-141-11/+0
| | | | | | | | | | | | | | | | | | By using the standard setting for the regular pn533 dongles, we no longer wait for ever for an ATR_RES. Without this, a failing ATR_REQ will put the hardware into a busy loop, constantly waiting for an ATR_RES. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: Define secure element connectivity and transaction eventsSamuel Ortiz2013-08-141-0/+11
| | | | | | | | | | | | | | | | | | | | The SE_CONNECTIVITY event is for an SE to request connection to e.g. a modem. The SE_TRANSACTION one is sent when an application running on a specific SE wants to notify the host CPU about the end of a transaction. Those events respectively map to the EVT_CONNECTIVITY and the EVT_TRANSACTION HCI events. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: Document secure element addition/removal netlink eventsSamuel Ortiz2013-08-141-0/+5
| | | | | | | | Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * MAINTAINERS: Change the NFC subsystem status to SupportedSamuel Ortiz2013-08-141-1/+1
| | | | | | | | Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * NFC: Fix missing static declarationsThierry Escande2013-08-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | This patch fixes 3 sparse warnings: nfcsim.c:63:25: sparse: symbol 'wq' was not declared. nfcsim.c:484:12: sparse: symbol 'nfcsim_init' was not declared. nfcsim.c:525:13: sparse: symbol 'nfcsim_exit' was not declared. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | Merge branch 'for-linville' of git://github.com/kvalo/athJohn W. Linville2013-08-1511-43/+270
|\ \ | |/ |/|
| * ath6kl: Fix invalid pointer access on fuzz testing with AP modeMohammed Shafi Shajakhan2013-08-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | In our Fuz testing, reference client corrupts the dest mac to "00:00:00:00:00:00" in the WPA2 handshake no 2. During driver init the sta_list entries mac addresses are by default "00:00:00:00:00:00". Driver returns an invalid pointer (conn) and the drver shall crash, if rxtids (aggr_conn) skb queues are accessed, since they would not be initialized. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: Fix race in heart beat pollingVasanthakumar Thiagarajan2013-08-071-0/+3
| | | | | | | | | | | | | | | | | | | | Make sure to cancel heart beat timer before freeing wmi to avoid potential NULL pointer dereference. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add SoC power save option to PCI features mapBartosz Markowski2013-08-072-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unify the PCI options location. By default the SoC PS option is disabled to boost the performance and due to poor stability on early HW revisions. In future we can remove the module parameter and turn on/off the PS for given hardware. This change also makes the pci module parameter for SoC PS static. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix device teardownMichal Kazior2013-08-051-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes interrupt-related issue when no interfaces were running thus the device was considered powered down. The power_down() function isn't really powering down the device. It simply assumed it won't interrupt. This wasn't true in some cases and could lead to paging failures upon FW indication interrupt (i.e. FW crash) because some structures aren't allocated in that device state. One reason for that was that ar_pci->started wasn't reset. The other is interrupts should've been masked when teardown starts. The patch reorganized interrupt setup and makes sure ar_pci->started is reset accordingly. Reported-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix failpath in MSI-X setupMichal Kazior2013-08-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | pci_disable_msi() must be called if the initial request_irq() fails. Also add a warning message so it's possible to distinguish request_irq() failure and pci_enable_msi() failure. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: zero arvif memory on add_interface()Michal Kazior2013-08-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The private memory area in vif provided by mac80211 isn't guaranteed to be zeroed. This patch should fix issues when switching between STA and AP interface types. The tim_bitmap could become polluted by STA bssid field (since it's a union), wep_keys array could also become polluted with invalid pointers and probably much more. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: advertise more conservative intf combinationsMichal Kazior2013-08-021-3/+9
| | | | | | | | | | | | | | | | | | | | Apparently the available firmware has a limit of handling 7 APs, 3 GOs or 8 STAs. This is based on empirical tests and it is still possible some combinations may crash the firmware. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: make sure to use passive scan when n_ssids is 0Michal Kazior2013-08-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Normally user specifies broadcast ssid for scanning. If the user wants to do a passive scan it does not pass any ssids. The patch makes sure we ath10k tells firmware to not send anything at all in case it decides no ssids equals broadcast ssid. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: prevent using invalid ringbuffer indexesMichal Kazior2013-08-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the device is removed and hotplug fails ioread32() will return 0xFFFFFFFF. In that case reading ringbuffer during device bringup led to out-of-bounds addressing of a ringbuffer array that in turn led to a paging failure. This could be reproduced by the following: * boot without acpi/prevent hotplug from working * insert and manually detect (pci rescan) the device * remove the device physically * load ath10k driver * kernel crashed Ringbuffer index reading is now protected by using an appropriate mask to prevent addressing an invalid array index. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: implement get_survey()Michal Kazior2013-08-024-1/+122
| | | | | | | | | | | | | | | | | | | | | | This implements a limited subset of what can be reported in the survey dump. This can be used for assessing approximate channel load, e.g. for automatic channel selection. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: implement tx checksum offloadingMichal Kazior2013-08-022-0/+4
| | | | | | | | | | | | | | | | | | | | HW supports L3/L4 tx checksum offloading. This should reduce CPU load and improve performance on slow host machines. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: implement rx checksum offloadingMichal Kazior2013-08-021-0/+40
| | | | | | | | | | | | | | | | | | | | HW supports L3/L4 rx checksum offloading. This should reduce CPU load and improve performance on slow host machines. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: detect the number of spatial streams supported by hwMichal Kazior2013-07-313-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | Until now ath10k assumed 3 spatial streams. However some devices support only 2 spatial streams. This patch improves performance on devices that don't support 3 spatial streams. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: improve tx throughput on slow machinesMichal Kazior2013-07-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | It is more efficient to move just the 802.11 header instead of the whole payload in most cases. This has no measurable effect on modern hardware. It should improve performance by a few percent on hardware such as an Access Point that have a slow CPU compared to a typical desktop CPU. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | mwifiex: fix build error when CONFIG_PM is not setBing Zhao2013-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config: make ARCH=m68k allmodconfig All error/warnings: drivers/net/wireless/mwifiex/cfg80211.c: In function 'mwifiex_fill_coalesce_rule_info': >> drivers/net/wireless/mwifiex/cfg80211.c:2493:3: error: implicit declaration of function 'mwifiex_is_pattern_supported' [-Werror=implicit-function-declaration] drivers/net/wireless/mwifiex/cfg80211.c: At top level: drivers/net/wireless/mwifiex/cfg80211.c:2537:12: warning: 'mwifiex_cfg80211_set_coalesce' defined but not used [-Wunused-function] cc1: some warnings being treated as errors Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Run the LNA combining algorithm properlySujith Manoharan2013-08-091-16/+28
| | | | | | | | | | | | | | | | | | | | The LNA combining algorithm has to be run for cards that support the required diversity features, make sure that that correct conditions are met before enabing this algorithm. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Fix BTCOEX usage for RX diversitySujith Manoharan2013-08-091-2/+2
| | | | | | | | | | | | | | | | BTCOEX has to be *disabled* for WLAN RX diversity to work on combo cards. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: use software queueing for multicast trafficFelix Fietkau2013-08-093-2/+23
| | | | | | | | | | | | | | | | | | Create a per-vif dummy node entry for keeping the multicast software queues. This helps in setups with a lot of mulitcast traffic that could otherwise potentially drown out unicast traffic to stations. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: improve tx scheduling fairnessFelix Fietkau2013-08-091-39/+50
| | | | | | | | | | | | | | | | Instead of trying to schedule the same TID multiple times in a loop, iterate over other TIDs/stations first. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: use software queues for un-aggregated data packetsFelix Fietkau2013-08-092-127/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first step for improving fairness between legacy and 802.11n traffic, and it should also improve reliability of resets and channel changes by keeping the hardware queue depth very short. When an aggregation session is torn down, all packets in the retry queue will be removed from the BAW and freed. For all subframes that have not been transmitted yet, the A-MPDU flag will be cleared, and a sequence number allocated. This ensures that the next A-MPDU session will get the correct initial sequence number. This happens both on aggregation session start and stop. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: always clear ps filter bit on new assocFelix Fietkau2013-08-091-0/+1
| | | | | | | | | | | | | | | | | | Otherwise in some cases, EAPOL frames might be filtered during the initial handshake, causing delays and assoc failures. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: fix clearing expired A-MPDU subframes in tx completionFelix Fietkau2013-08-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | When the tid aggregation state has been marked as inactive, free completed tx packets immediately. When a new aggregation session has not been initialized yet, the BAW checks do not recognize it as expired. Might fix potential stalls in setting up a new aggregation session. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: prepare queueing code for handling unaggregated trafficFelix Fietkau2013-08-092-9/+14
| | | | | | | | | | | | | | | | | | - Allow ath_tx_get_tid_subframe to return non-AMPDU subframes. - Reset the tid paused state on aggregation stop - Initialize software queues even when HT is not supported Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud