aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/llcp/sock.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2012-07-09NFC: Release LLCP SAP when the owner is releasedSamuel Ortiz3-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>
2012-07-09NFC: Close listening LLCP sockets when the device is goneSamuel Ortiz1-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>
2012-07-09NFC: Build LLCP general bytes upon requestSamuel Ortiz1-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>
2012-07-09NFC: Fix LLCP getname socket opSamuel Ortiz1-4/+7
Set the right target index and use a better socket declaration routine. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09NFC: Update LLCP socket target index when getting a connectionSamuel Ortiz1-0/+1
Getting a valid CONNECT means we have a valid target index. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09NFC: Add netlink module alias for NFCSamuel Ortiz1-0/+3
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09NFC: Add modules alias for NFC socketsSamuel Ortiz1-0/+1
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09NFC: Allow HCI driver to pre-open pipes to some gatesEric Lapuyade5-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>
2012-07-09NFC: update PN544 HCI driver state when opened/closedEric Lapuyade1-0/+5
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09NFC: Error management documentationEric Lapuyade1-0/+33
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09NFC: nfc_driver_failure() implementationEric Lapuyade1-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>
2012-07-09NFC: nfc_targets_found() should accept zero target foundEric Lapuyade1-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>
2012-07-09NFC: Core must test the device polling state inside the device lockEric Lapuyade1-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>
2012-07-09NFC: Implement HCI driver or internal error managementEric Lapuyade1-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>
2012-07-09NFC: Factorize HCI cmd completionEric Lapuyade1-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>
2012-07-09NFC: Driver failure APIEric Lapuyade2-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>
2012-07-09NFC: Changed HCI cmd execution completion result to std linux errnoEric Lapuyade3-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>
2012-07-09NFC: Implement HCP reaggregation allocation error caseEric Lapuyade1-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>
2012-07-09NFC: Remove an impossible HCI error caseEric Lapuyade1-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>
2012-07-09NFC: Handle SHDLC RSET frames from an SHDLC connected chipEric Lapuyade1-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>
2012-07-09NFC: Removed addressed shdlc TODOsEric Lapuyade1-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>
2012-07-09NFC: Prepare asynchronous error management for driver and shdlcEric Lapuyade3-8/+21
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09ath9k: Stop the BTCOEX timers before disabling BTCOEXMohammed Shafi Shajakhan2-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>
2012-07-09ath9k: Fix MCI cleanupMohammed Shafi Shajakhan1-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>
2012-07-09bcma: use custom printing functionsRafał Miłecki10-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>
2012-07-09b43: N-PHY: fix RSSI calibrationRafał Miłecki1-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>
2012-07-09brcmsmac: fix brcms_c_regd_init() which crashed after 11ad patchArend van Spriel1-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>
2012-07-09ath9k: enable support for AR9550Gabor Juhos1-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>
2012-07-09ath9k: set 4ADDRESS bit in RX filter for AR9550Gabor Juhos2-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>
2012-07-09ath9k: enable PLL workaround for AR9550Gabor Juhos1-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>
2012-07-09ath9k: fix PLL initialization for AR9550Gabor Juhos1-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>
2012-07-09ath9k: skip internal regulator configuration for AR9550Gabor Juhos1-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>
2012-07-09ath9k: disable SYNC_HOST1_FATAL interrupts for AR9550Gabor Juhos2-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>
2012-07-09ath9k: fix RF channel frequency configuration for AR9550Gabor Juhos1-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>
2012-07-09ath9k: fix PAPRD settings for AR9550Gabor Juhos1-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>
2012-07-09ath9k: fix antenna control configuration for AR9550Gabor Juhos2-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>
2012-07-09ath9k: fix XPABIASLEVEL settings for AR9550Gabor Juhos2-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>
2012-07-09ath9k: read spur frequency information from eeprom for AR9550Gabor Juhos1-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>
2012-07-09ath9k: add mode register initialization code for AR9550Gabor Juhos3-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>
2012-07-09ath9k: add initvals for AR9550Gabor Juhos2-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>
2012-07-09ath9k: enable TX/RX data byte swap for AR9550Gabor Juhos1-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>
2012-07-09ath9k: clear pciexpress flag for AR9550Gabor Juhos1-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>
2012-07-09ath9k: add BB name string for AR9550Gabor Juhos1-0/+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>
2012-07-09ath9k: add platform_device_id for AR9550Gabor Juhos1-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>
2012-07-09ath9k: set MAC version for AR9550Gabor Juhos1-0/+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>
2012-07-09ath9k: define MAC version for AR9550Gabor Juhos1-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>
2012-07-09ath9k: define DEVID for QCA955xGabor Juhos1-0/+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>
2012-07-09net/wireless: remove macro defined twice with same valueOskar Schirmer1-1/+0
In the list of commands CMD_802_11_EEPROM_ACCESS had been defined twice, unnecessarily, luckily with same value. Remove one occurence. Signed-off-by: Oskar Schirmer <oskar@scara.com> Cc: Marcelo Tosatti <marcelo@kvack.org> Cc: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09mwifiex: add set_antenna handler supportAmitkumar Karwar5-0/+133
This enables user to set mode of Tx/Rx path using "iw set antenna" command. For non MIMO chips, the command will be used for selecting specific antenna or configuring antenna diversity mode. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09ath9k_hw: fix AR9462 2g5g switch on full resetRajkumar Manoharan1-12/+6
On full reset, mci reset will put LNA update on 2G mode. And Whenever 2g5g_switch is forced at the end of full reset, lna update should not be skipped. Not doing so, is affecting WLAN rx and causing beacon loss when BTCOEX is enabled on AR9462. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>