summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* NFC: Add initial Sony RC-S360 support to pn533Samuel Ortiz2012-07-091-38/+181
| | | | | | | Sony RC-S360 is also known as the Sony PaSoRi contactless reader. Only type 2, 3 and 4 tag reading is supported at the moment. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Dereference LLCP bind socket address after checking for it to be NULLSamuel Ortiz2012-07-091-2/+2
| | | | | Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Do not return EBUSY when stopping a poll that's already stoppedSamuel Ortiz2012-07-091-0/+9
| | | | | | | We check for the polling flag before checking if the netlink PID caller match. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Remove warning from nfc_llcp_local_putSamuel Ortiz2012-07-091-2/+0
| | | | | | | | The socket local pointer can be NULL when a socket is created but never bound or connected. Reported-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Handle LLCP Disconnected Mode framesSamuel Ortiz2012-07-091-0/+44
| | | | | | | | When receiving such frame, the sockets waiting for a connection to finish should be woken up. Connecting to an unbound LLCP service will trigger a DM as a response. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: LLCP late bindingSamuel Ortiz2012-07-092-77/+166
| | | | | | | | | | With the LLCP 16 local SAPs we can potentially quickly run out of source SAPs for non well known services. With the so called late binding we will reserve an SAP only when we actually get a client connection for a local service. The SAP will be released once the last client is gone, leaving it available to other services. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Forbid SSAP binding to a not well known LLCP serviceSamuel Ortiz2012-07-091-17/+5
| | | | | | | | With not Well Known Services there is no guarantees as to which SSAP the server will be listening on, so there is no reason to support binding to a specific source SAP. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Forbid LLCP service name reusingSamuel Ortiz2012-07-091-1/+3
| | | | | | | This patch fixes a typo and return the correct error when trying to bind 2 sockets to the same service name. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Release LLCP SAP when the owner is releasedSamuel Ortiz2012-07-093-14/+11
| | | | | | | | The LLCP SAP should only be freed when the socket owning it is released. As long as the socket is alive, the SAP should be reserved in order to e.g. send the right wks array when bringing the MAC up. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Close listening LLCP sockets when the device is goneSamuel Ortiz2012-07-091-3/+8
| | | | | | | | When the MAC link goes down, we should only keep the bound sockets alive. They will be closed by sock_release or when the underlying NFC device is moving away. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Build LLCP general bytes upon requestSamuel Ortiz2012-07-091-15/+17
| | | | | | | | Drivers will need them before starting a poll or when being activated as targets. Mostly WKS can have changed between device registration and then so we need to re-build the whole array. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Fix LLCP getname socket opSamuel Ortiz2012-07-091-4/+7
| | | | | | Set the right target index and use a better socket declaration routine. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Update LLCP socket target index when getting a connectionSamuel Ortiz2012-07-091-0/+1
| | | | | | Getting a valid CONNECT means we have a valid target index. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Add netlink module alias for NFCSamuel Ortiz2012-07-091-0/+3
| | | | Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Add modules alias for NFC socketsSamuel Ortiz2012-07-091-0/+1
| | | | Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Allow HCI driver to pre-open pipes to some gatesEric Lapuyade2012-07-095-37/+47
| | | | | | | | | | Some NFC chips will statically create and open pipes for both standard and proprietary gates. The driver can now pass this information to HCI such that HCI will not attempt to create and open them, but will instead directly use the passed pipe ids. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: update PN544 HCI driver state when opened/closedEric Lapuyade2012-07-091-0/+5
| | | | | Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Error management documentationEric Lapuyade2012-07-091-0/+33
| | | | | Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: nfc_driver_failure() implementationEric Lapuyade2012-07-091-6/+2
| | | | | | | If the device is polling we sent a 0 target found event. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: nfc_targets_found() should accept zero target foundEric Lapuyade2012-07-091-6/+13
| | | | | | | | The semantics for a zero target found event is that the polling operation could not complete. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Core must test the device polling state inside the device lockEric Lapuyade2012-07-091-2/+7
| | | | | | | | | There can ever be only one call to nfc_targets_found() after polling has been engaged. This could be from a target discovered event from the driver, or from an error handler to notify poll will never complete. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Implement HCI driver or internal error managementEric Lapuyade2012-07-091-4/+11
| | | | | | | | | If there is an ongoing HCI command executing, it will be completed, thereby pushing the error up to the core. Otherwise, HCI will directly notify the core with the error. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Factorize HCI cmd completionEric Lapuyade2012-07-091-11/+16
| | | | | | | | | HCI cmd can be completed either from an HCI response or from an internal driver or HCI error. This requires to factorize the completion code outside of the device lock. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Driver failure APIEric Lapuyade2012-07-092-0/+12
| | | | | | | | This API should be used by drivers, HCI, SHDLC or NCI stacks to report an unrecoverable error. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Changed HCI cmd execution completion result to std linux errnoEric Lapuyade2012-07-093-22/+23
| | | | | | | | | | | An HCI command can complete either from an HCI response (with an HCI result) or as a consequence of any other system error during processing. The completion therefore needs to take a standard errno code. The HCI response will convert its result to a standard errno before calling the completion. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Implement HCP reaggregation allocation error caseEric Lapuyade2012-07-091-5/+10
| | | | | | | We can now report an ENOMEM error up to the HCI layer. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Remove an impossible HCI error caseEric Lapuyade2012-07-091-10/+0
| | | | | | | nfc_hci_recv_frame can not be called with a NULL skb. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Handle SHDLC RSET frames from an SHDLC connected chipEric Lapuyade2012-07-091-4/+4
| | | | | | | | shdlc reset may leave HCI in an inconsistent state by loosing parts of HCI frames. Handle this case by reporting an unrecoverable error to HCI. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Removed addressed shdlc TODOsEric Lapuyade2012-07-091-11/+0
| | | | | | | The questions asked in the comments have been answered and addressed. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: Prepare asynchronous error management for driver and shdlcEric Lapuyade2012-07-093-8/+21
| | | | | Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* ath9k: Stop the BTCOEX timers before disabling BTCOEXMohammed Shafi Shajakhan2012-07-092-2/+2
| | | | | | | | | | | | | | Its safe to stop the BTCOEX timers 'period_timer' and 'no_stomp_timer' before disabling BTCOEX. These timers can call ath9k_hw_btcoex_enable (or) change the BT stomp type if they seem to be running after we had called ath9k_hw_btcoex_disable, which is obviously not correct. Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Cc: Bala Shanmugam <bkamatch@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix MCI cleanupMohammed Shafi Shajakhan2012-07-091-1/+3
| | | | | | | | | | | | We are doing MCI cleanup eventhough BTCOEX is not enabled via module parameter. This means we do ath_mci_cleanup though we skipped calling ath_mci_setup. Yet it does not causes any issues now as we free the DMA buffer allocated only when it is allocated during ath_mci_setup. Reviewed-by: Bala Shanmugam <bkamatch@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: use custom printing functionsRafał Miłecki2012-07-0910-62/+69
| | | | | | | | | Having bus number printed makes it much easier to anaylze logs on systems with more buses. For example Netgear WNDR4500 has 3 AMBA buses in total, which makes standard log really messy. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: N-PHY: fix RSSI calibrationRafał Miłecki2012-07-091-8/+9
| | | | | | | Specs were updated, change code to match it. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: fix brcms_c_regd_init() which crashed after 11ad patchArend van Spriel2012-07-091-10/+7
| | | | | | | | | | | | | This patch fixes an OOPS in brcmsmac driver, which was introduced by the 11ad patch 'cfg80211: add 802.11ad (60gHz band) support'. The value IEEE80211_NUM_BANDS increased, which was used in the brcms_c_regd_init() function. Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Cc: Johannes Berg <johannes.berg@intel.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: enable support for AR9550Gabor Juhos2012-07-091-0/+2
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: set 4ADDRESS bit in RX filter for AR9550Gabor Juhos2012-07-092-0/+4
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: enable PLL workaround for AR9550Gabor Juhos2012-07-091-1/+2
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix PLL initialization for AR9550Gabor Juhos2012-07-091-8/+19
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: skip internal regulator configuration for AR9550Gabor Juhos2012-07-091-1/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: disable SYNC_HOST1_FATAL interrupts for AR9550Gabor Juhos2012-07-092-2/+2
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix RF channel frequency configuration for AR9550Gabor Juhos2012-07-091-2/+3
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix PAPRD settings for AR9550Gabor Juhos2012-07-091-1/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix antenna control configuration for AR9550Gabor Juhos2012-07-092-0/+5
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix XPABIASLEVEL settings for AR9550Gabor Juhos2012-07-092-3/+3
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: read spur frequency information from eeprom for AR9550Gabor Juhos2012-07-091-2/+4
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: add mode register initialization code for AR9550Gabor Juhos2012-07-093-3/+145
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: add initvals for AR9550Gabor Juhos2012-07-092-0/+1285
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: enable TX/RX data byte swap for AR9550Gabor Juhos2012-07-091-1/+2
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: clear pciexpress flag for AR9550Gabor Juhos2012-07-091-1/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>