summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* isdn: hisax: hfc4s8s_l1: Remove some unused functionsRickard Strandqvist2015-01-021-21/+0
| | | | | | | | | | Removes some functions that are not used anywhere: Read_hfc32() Write_hfc32() Write_hfc16() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: fddi: skfp: smt.c: Remove unused functionRickard Strandqvist2015-01-021-12/+0
| | | | | | | | | Remove the function smt_ifconfig() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: chelsio: cxgb3: mc5.c: Remove some unused functionsRickard Strandqvist2015-01-021-16/+0
| | | | | | | | | | Removes some functions that are not used anywhere: dbgi_rd_rsp3() dbgi_wr_addr3() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: skbuff: don't zero tc members when freeing skbFlorian Westphal2015-01-021-7/+0
| | | | | | | | | | | | | | | Not needed, only four cases: - kfree_skb (or one of its aliases). Don't need to zero, memory will be freed. - kfree_skb_partial and head was stolen: memory will be freed. - skb_morph: The skb header fields (including tc ones) will be copied over from the 'to-be-morphed' skb right after skb_release_head_state returns. - skb_segment: Same as before, all the skb header fields are copied over from the original skb right away. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'for-upstream' of ↵David S. Miller2015-01-0237-1778/+3082
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg say: ==================== pull request: bluetooth-next 2014-12-31 Here's the first batch of bluetooth patches for 3.20. - Cleanups & fixes to ieee802154 drivers - Fix synchronization of mgmt commands with respective HCI commands - Add self-tests for LE pairing crypto functionality - Remove 'BlueFritz!' specific handling from core using a new quirk flag - Public address configuration support for ath3012 - Refactor debugfs support into a dedicated file - Initial support for LE Data Length Extension feature from Bluetooth 4.2 Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * Bluetooth: Add timing information to ECDH test case runsMarcel Holtmann2014-12-301-1/+9
| | | | | | | | | | | | | | | | After successful completion of the ECDH test cases, print the time it took to run them. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Add timing information to SMP test case runsMarcel Holtmann2014-12-301-1/+9
| | | | | | | | | | | | | | | | After successful completion of the SMP test cases, print the time it took to run them. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Add LE Secure Connections tests for SMPJohan Hedberg2014-12-301-0/+186
| | | | | | | | | | | | | | | | This patch adds SMP self-tests for the Secure Connections crypto functions. The sample data has been taken from the core specification. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add legacy SMP testsJohan Hedberg2014-12-301-0/+95
| | | | | | | | | | | | | | | | This patch adds self-tests for legacy SMP crypto functions. The sample data has been taken from the core specification. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add skeleton for SMP self-testsJohan Hedberg2014-12-304-0/+66
| | | | | | | | | | | | | | | | This patch adds the initial skeleton and kernel config option for SMP self-tests. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add support for ECDH test casesJohan Hedberg2014-12-302-1/+175
| | | | | | | | | | | | | | | | This patch adds the test cases for ECDH cryptographic functionality used by Bluetooth Low Energy Secure Connections feature. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add support for self testing frameworkMarcel Holtmann2014-12-305-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | This add support for the Bluetooth self testing framework that allows running certain test cases of sample data to ensure correctness of its basic functionality. With this patch only the basic framework will be added. It contains the build magic that allows running this at module loading time or at late_initcall stage when built into the kernel image. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Fix const declarations for smp_f5 and smp_f6Johan Hedberg2014-12-301-3/+4
| | | | | | | | | | | | | | | | | | These SMP crypto functions should have all their input parameters declared as const. This patch fixes the parameters that were missing the const declaration. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * cc2520: fix zero perm_extended_addr addressVarka Bhadram2014-12-301-0/+1
| | | | | | | | | | | | | | It will remove the bug of havine zero perm_extended_addr address. Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * cc2520: remove 'ret' goto labelVarka Bhadram2014-12-301-10/+4
| | | | | | | | | | | | | | | | If allocation of memory fails instead of going to ret goto label and returning from there, we can directly return -ENOMEM on failure. Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * cc2520: use devm_kzalloc(.., sizeof(*pointer), ..) patternVarka Bhadram2014-12-301-2/+1
| | | | | | | | | | Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * net: ieee802154: don't use devm_pinctrl_get_select_default() in probeWolfram Sang2014-12-301-7/+0
| | | | | | | | | | | | | | | | | | Since commit ab78029ecc34 (drivers/pinctrl: grab default handles from device core), we can rely on device core for setting the default pins. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Remove BlueFritz! specific check from initializationMarcel Holtmann2014-12-261-3/+9
| | | | | | | | | | | | | | | | | | | | | | The AVM BlueFritz! USB controllers had a special handling in the Bluetooth core when it comes to reading the supported commands. Both drivers now set the HCI_QUIRK_BROKEN_LOCAL_COMMANDS and with that it is no longer needed to look for vendor specific details. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: btusb: Set the HCI_QUIRK_BROKEN_LOCAL_COMMANDS quirkMarcel Holtmann2014-12-261-1/+5
| | | | | | | | | | | | | | | | | | The AVM BlueFritz! 2.0 USB dongles do not support the HCI command for reading the local supported commands. So set this quirk to let the core know about it. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: bfusb: Set the HCI_QUIRK_BROKEN_LOCAL_COMMANDS quirkMarcel Holtmann2014-12-261-0/+2
| | | | | | | | | | | | | | | | | | The AVM BlueFritz! 1.0 USB dongles do not support the HCI command for reading the local supported commands. So set this quirk to let the core know about it. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Introduce HCI_QUIRK_BROKEN_LOCAL_COMMANDS constantMarcel Holtmann2014-12-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Some controllers advertise support for Bluetooth 1.2 specification, but they do not support the HCI Read Local Supported Commands command. If that is the case, then the driver can quirk the behavior and force the core to skip this command. This will allow removing vendor specific checks out of the core. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Remove duplicate constant for RFCOMM PSMMarcel Holtmann2014-12-202-4/+2
| | | | | | | | | | | | | | | | The RFCOMM_PSM constant is actually a duplicate. So remove it and use the L2CAP_PSM_RFCOMM constant instead. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Create debugfs directory for each connection handleMarcel Holtmann2014-12-205-0/+22
| | | | | | | | | | | | | | | | | | For every internal representation of a Bluetooth connection which is identified by hci_conn, create a debugfs directory with the handle number as directory name. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Store default and maximum LE data length settingsMarcel Holtmann2014-12-203-0/+73
| | | | | | | | | | | | | | | | | | | | | | When the controller supports the LE Data Length Extension feature, the default and maximum data length are read and now stored. For backwards compatibility all values are initialized to the data length values from Bluetooth 4.1 and earlier specifications. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Enable basics for LE Data Length Extension featureMarcel Holtmann2014-12-201-0/+14
| | | | | | | | | | | | | | | | | | When the controller supports the new LE Data Length Extension feature from Bluetooth 4.2 specification, enable the new events and read the values for default and maxmimum data length supported by the controller. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Add structures for LE Data Length Extension featureMarcel Holtmann2014-12-201-0/+43
| | | | | | | | | | | | | | | | This patch adds the structures for HCI commands and events of the LE Data Length Extension feature from Bluetooth 4.2 specification. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Move LE debugfs file creation into hci_debugfs.cMarcel Holtmann2014-12-202-478/+474
| | | | | | | | | | | | | | | | This patch moves the creation of the debugs files for LE controllers into hci_debugfs.c file. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Move BR/EDR debugfs file creation into hci_debugfs.cMarcel Holtmann2014-12-202-349/+350
| | | | | | | | | | | | | | | | This patch moves the creation of the debugs files for BR/EDR controllers into hci_debugfs.c file. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Move common debugfs file creation into hci_debugfs.cMarcel Holtmann2014-12-202-201/+200
| | | | | | | | | | | | | | | | This patch moves the creation of the debugs files common for all controllers into hci_debugfs.c file. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Add skeleton functions for debugfs creationMarcel Holtmann2014-12-204-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The debugfs file creation has been part of the core initialization handling of controllers. With the introduction of Bluetooth 4.2 core specification, the number of debugfs files is increasing even further. To avoid cluttering the core controller handling, create a separate file hci_debugfs.c to centralize all debugfs file creation. For now leave the current files in the core, but in the future all debugfs file creation will be moved. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Support static address when BR/EDR has been disabledMarcel Holtmann2014-12-202-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every BR/EDR/LE dual-mode controller requires to have a public address and so far that has become the identity address and own address. The only way to change that behavior was with a force_static_address debugfs option. However the host can actually disable the BR/EDR part of a dual-mode controller and turn into a single mode LE controller. In that case it makes perfect sense for a host to use a chosen static address instead of the public address. So if the host disables BR/EDR and configures a static address, then that static address is used as identity address and own address. If the host does not configure a static address, then the public address is used as before. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * ieee802154: iface: move multiple node type checkAlexander Aring2014-12-201-14/+9
| | | | | | | | | | | | | | | | This patch moves the handling for checking on multiple node type interface to the corresponding concurrent iface check function. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * mac802154: iface: check concurrent ifacesAlexander Aring2014-12-201-0/+77
| | | | | | | | | | | | | | | | | | | | This patch adds a check for concurrent interfaces while calling interface up. This avoids to have different mac parameters on one phy. Otherwise it could be that a interface can overwrite current phy mac settings which is set by an another interface. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Move hci_update_page_scan to hci_request.cJohan Hedberg2014-12-192-56/+56
| | | | | | | | | | | | | | | | | | This is a left-over from the patch that created hci_request.c. The hci_update_page_scan functions should have been moved from hci_core.c there. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add return parameter to cmd_complete callbacksJohan Hedberg2014-12-191-40/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | The cmd_complete callbacks for pending mgmt commands may fail e.g. in the case of memory allocation. Previously this error would be caught and returned to user space in the form of a failed write on the mgmt socket (when the error happened in the mgmt command handler) but with the introduction of the generic cmd_complete callback this information was lost. This patch returns the feature by making cmd_complete callbacks return int instead of void. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix Add Device to wait for HCI before sending cmd_completeJohan Hedberg2014-12-193-70/+109
| | | | | | | | | | | | | | | | | | | | | | | | This patch updates the Add Device mgmt command handler to use a hci_request to wait for HCI command completion before notifying user space of the mgmt command completion. To do this we need to add an extra hci_request parameter to the hci_conn_params_set function. Since this function has no other users besides mgmt.c it's moved there as a static function. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix Remove Device to wait for HCI before sending cmd_completeJohan Hedberg2014-12-191-22/+62
| | | | | | | | | | | | | | | | | | | | | | This patch updates the Remove Device mgmt command handler to use a hci_request to wait for HCI command completion before notifying user space of the mgmt command completion. This way we ensure that once the mgmt command returns all HCI commands triggered by it have also completed. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add hci_request support for hci_update_background_scanJohan Hedberg2014-12-195-97/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | Many places using hci_update_background_scan() try to synchronize whatever they're doing with the help of hci_request callbacks. However, since the hci_update_background_scan() function hasn't so far accepted a hci_request pointer any commands triggered by it have been left out by the synchronization. This patch modifies the API in a similar way as was done for hci_update_page_scan, i.e. there's a variant that takes a hci_request and another one that takes a hci_dev. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Split hci_request helpers to hci_request.[ch]Johan Hedberg2014-12-198-395/+453
| | | | | | | | | | | | | | | | | | | | None of the hci_request related things in net/bluetooth/hci_core.h are needed anywhere outside of the core bluetooth module. This patch creates a new net/bluetooth/hci_request.c file with its corresponding h-file and moves the functionality there from hci_core.c and hci_core.h. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Split hci_update_page_scan into two functionsJohan Hedberg2014-12-194-16/+24
| | | | | | | | | | | | | | | | | | | | | | To keep the parameter list and its semantics clear it makes sense to split the hci_update_page_scan function into two separate functions: one taking a hci_dev and another taking a hci_request. The one taking a hci_dev constructs its own hci_request and then calls the other function. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: cleanup check on trac statusAlexander Aring2014-12-191-5/+3
| | | | | | | | | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: 6lowpan: Add IPSP PSM valueJukka Rissanen2014-12-191-0/+1
| | | | | | | | | | | | | | | | The Internet Protocol Support Profile a.k.a BT 6LoWPAN specification is ready so PSM value for it is now known. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: remove version check for AT86RF212Andrey Yurovsky2014-12-191-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This version check allows the driver to only work with v=1 hardware however there is no driver-facing difference with newer versions (confirmed by Atmel FAEs) so this check needlessly prevents the driver from being used with radios now in production. Tested on AT86RF212B radio (which came up as v=3). Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: fix register read for part versionAndrey Yurovsky2014-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The driver was reading the PART_NUM register for both the part number (type of device) and the part version, the version is actually in register 0x1D, VERSION_NUM. I believe that this was a copy-paste error. Tested on AT86RF212B where the part is detected to be the expected part number (0x07) and version (0x03 on mine). Signed-off-by: Andrey Yurovsky <andrey@snupi.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: remove unnecessary assignAlexander Aring2014-12-191-1/+0
| | | | | | | | | | | | | | | | The attribute extra_tx_headroom should already be zero. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: fix context pointer handlingAlexander Aring2014-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | This patch changes the context pointer to the parameter given one inside function at86rf230_async_state_change_start. This could occur problem if context isn't pointed to lp->state. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: make at86rf230_async_error inlineAlexander Aring2014-12-191-1/+1
| | | | | | | | | | | | | | | | | | This patch makes the at86rf230_async_error inline. This function is small enough to handle inline. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: remove if branchAlexander Aring2014-12-191-4/+1
| | | | | | | | | | | | | | | | | | This patch removes an unnecessary if branch inside the tx complete handler. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * ieee802154/mrf24j40: Fix alignment of parenthesisStefan Schmidt2014-12-191-2/+2
| | | | | | | | | | | | | | CC: Alan Ott <alan@signal11.us> Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * ieee802154/mrf24j40: Fix typo begining -> beginningStefan Schmidt2014-12-191-1/+1
| | | | | | | | | | | | | | CC: Alan Ott <alan@signal11.us> Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>