summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-11-16Bluetooth: Fix some checkpatch.pl errors and warningsSzymon Janc
Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Simplify __l2cap_global_chan_by_addrSzymon Janc
Make __l2cap_global_chan_by_addr similar to other find functions. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Refactor loop in l2cap_retransmit_one_frameSzymon Janc
This make it easier to see what is the real reason for loop to exit. skb_queue_next return valid skb or garbage, not NULL. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Simplify l2cap_add_to_srej_queueSzymon Janc
Make it easier to see what is loop break condition. skb_queue_next return valid skb or garbage, not NULL. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Fix possible NULL pointer derefence in l2cap codeSzymon Janc
Due to ERTM reliability L2CAP channel needs to be disconnected if adding to srej list failed. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Allow to set AMP type for virtual HCIAndrei Emeltchenko
Type can be changed during re-opening device /dev/vhci. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Do not set HCI_RAW when HS enabledAndrei Emeltchenko
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Move scope of kernel parameter enable_hsAndrei Emeltchenko
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Add MGMT opcodes for Passkey EntryBrian Gix
Signed-off-by: Brian Gix <bgix@codeaurora.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Add HCI defines for User Passkey entryBrian Gix
Signed-off-by: Brian Gix <bgix@codeaurora.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Pass all message parameters to mgmt_start_discoveryJohan Hedberg
The mgmt_start_discovery command contains the type of discovery that should be started so this should be passed to the start_discovery function. This patch doesn't yet add any action depending on the type of the requested discovery. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Add missing cmd_complete for mgmt_load_link_keysJohan Hedberg
The command complete event was completely missing for this command. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Create a unique mgmt error code hierarchyJohan Hedberg
The management protocol uses a single byte for error codes (aka command status). In some places this value is directly copied from HCI and in other a POSIX error number is used. This makes it impossible for user-space to uniquily decipher the meaning of an error. To solve this issue a new mgmt-specific set of error codes is added along with a conversion table for HCI status values. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Return success instead of EALREADY for mgmt commandsJohan Hedberg
When the adapter state is already what is requested it's more friendly to user-space to simply report success than to send a EALREADY error message. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Fix mgmt_pair_device imediate error responsesJohan Hedberg
When possible cmd_complete should be returned instead of cmd_status since it contains the remote address (this helps user-space track what exactly failed). Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Add address type to mgmt_pair_deviceJohan Hedberg
The kernel needs to know whether it should connect to a device over BR/EDR or over LE. This is particularly important in the future when dual-mode device may be connectable also over LE. It is also important if/when we decide to move the LE advertisement cache from the kernel into user-space. Adding the type to the mgmt command also ensures conformance with the latest mgmt API spec. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: mgmt_stop_discovery_failed()Andre Guedes
This patches creates mgmt_stop_discovery_failed() which removes pending MGMT_OP_STOP_DISCOVERY commands and sends proper command status events. This patch also fixes the MGMT_OP_STOP_DISCOVERY command leak in case cancel inquiry fails. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-16Bluetooth: Rename mgmt_inquiry_failed()Andre Guedes
This patch renames the function mgmt_inquiry_failed() to mgmt_start_discovery_failed(). This function is more related to MGMT_OP_START_DISCOVERY command handling than to inquiry. Besides, this functions will be reused by LE based discovery procedures in case of failure. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-10Bluetooth: Only set ack_timer if we didn't send and ackGustavo F. Padovan
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-10Bluetooth: Allow L2CAP to increase the security levelGustavo F. Padovan
Some incomming connections needs to increase the security level by requesting encryption for example (HID keyboard case). This change allows the userspace to change it through setsockopt with defer_setup enabled. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-10Bluetooth: Rename l2cap_check_security()Gustavo F. Padovan
rename to l2cap_chan_check_security() to make it consistent with other l2cap_exported functions. This function will be exported in a later commit. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-10Bluetooth: Add status parameter to mgmt_disconnect responseJohan Hedberg
Since disconnecting may fail the status needs to be communicated to user space. This also updates the implementation to match the latest mgmt API specification. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-10Bluetooth: Add proper response to mgmt_remove_keys commandJohan Hedberg
Since the command can fail we need to have a proper response with the remote address and a failure status for it. This also updates it to conform to the latest mgmt API spec. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-10Bluetooth: Fix deadlock with mgmt_pair_deviceJohan Hedberg
The hci_conn callbacks are called with the hci_dev lock already held so no locking should be attempted in them. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-10Bluetooth: Add public/random LE address information to mgmt messagesJohan Hedberg
It's necessary to know the distinction between public and random LE addresses so the mgmt interface also needs to distinguish between them. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-11-09mwifiex: prevent corruption instead of just warningDan Carpenter
Probably we never hit this condition, but in case we do, we may as well put a return here instead of just printing a warning message and then corrupting memory. The caller doesn't check the return code. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09mwifiex: enable SDIO multiport aggregationAmitkumar Karwar
By default SDIO multiport aggregation is disabled. It's useful to get good throughput results. This patch enables it. 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>
2011-11-09mwifiex: remove an unneeded NULL checkDan Carpenter
We dereference adapter in the error handling code so this needed to be fixed. This function is always called like: adapter->if_ops.host_to_card(adapter, ...); so adapter can never be NULL and I've removed the NULL check. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09mwifiex: remove unneeded kfree(NULL);Dan Carpenter
The previous if statement means this that pointer is NULL so there is no need to free it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09net/rfkill/core.c: use kstrtoul, etcJulia Lawall
Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc. A semantic patch rule for the kstrtoul case is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression a,b; {int,long} *c; @@ -strict_strtoul +kstrtoul (a,b,c) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09net/mac80211/debugfs.c: use kstrtoul, etcJulia Lawall
Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc. A semantic patch rule for the kstrtoul case is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression a,b; {int,long} *c; @@ -strict_strtoul +kstrtoul (a,b,c) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09mac80211: implement wifi TX statusJohannes Berg
Implement the socket wifi TX status error queue reflection in mac80211. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09nl80211: advertise socket TX status capabilityJohannes Berg
The new wifi socket TX capability should be supported by wifi drivers, let them advertise whether they do or not. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09mac80211: Also report the STA's TDLS flag via nl80211Helmut Schaa
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: optimize chip core info managementFranky Lin
Prepare for adding backplane interconnect type support Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: replace private SB macros with ssb_regs versionFranky Lin
Use SSB macros in order to clean up brcmfmac code Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: move chip drive strength related code to sdio_chip.cFranky Lin
This patch is part of the abstracting chip backplane handle code series. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: move chip detach function to sdio_chip.cFranky Lin
This patch is part of the abstracting chip backplane handle code series. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: move chip reset core function to sdio_chip.cFranky Lin
This patch is part of the abstracting chip backplane handle code series. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: abstract chip core revision functionFranky Lin
Prepare for adding backplane interconnect type support Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: abstract chip iscoreup functionFranky Lin
Prepare for adding backplane interconnect type support Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: chip attach code flow clean upFranky Lin
Merged brcmf_sdbrcm_chip_attach into brcmf_sdio_chip_attach for better readability. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: remove duplicate regiter set in chip attach pathFranky Lin
Same register writes have been done in brcmf_sdbrcm_probe_init which is earlier in the same code path. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: move dongle gpio reset code to chip attach functionFranky Lin
This patch is part of the abstracting chip backplane handle code series. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: disable dongle arm core in bus core setup functionFranky Lin
This will provide a better code flow that fits the logic Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: move core disable function to sdio_chip.cFranky Lin
This patch is part of the abstracting chip backplane handle code series. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: abstract chip buscore setup functionFranky Lin
This patch is part of the abstracting chip backplane handle code series. Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: move bus core prep code to sdio_chip.cFranky Lin
This patch is part of abstracting chip backplane handle code series. Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: move chip recognition function to sdio_chip.cFranky Lin
Currently backplane handle code is scatterd around dhd_sdio.c which is not good for maintenance and adding new backplane interconnect type support. This patch and the follow up patches are going to abstract all chip backplane control code specific for sdio bus into this new sdio_chip.c Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-09brcm80211: fmac: remove unnecessary 4329 chip specific codeFranky Lin
4329 with chiprev 0 can not be found on any product. The code can be removed. Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>