aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | Bluetooth: Add secure flag for mgmt_pin_code_reqWaldemar Rymarkiewicz2011-04-282-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the mgmt_pin_code_request interface to require secure pin code (16 digit) for authentication. This is a kernel part of the secure pin code requirement notification to user space agent. Code styling fix by Johan Hedberg. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Respect local MITM req in io_cap replyWaldemar Rymarkiewicz2011-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If host requires MITM protection notify that to controller in io capabilities reply even if the remote device requires no bonding. If it is not respected, host can get an unauthenticated link key while it expects authenticated one. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Ignore key unauthenticated for high securityWaldemar Rymarkiewicz2011-04-281-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | High security level for pre v2.1 devices requires combination link key authenticated by at least 16 digit PIN code. It's also necessary to update key_type and pin_length when the key exists and is sufficently secured for the connection as there will be no link key notify event in that case. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Map sec_level to link key requirementsWaldemar Rymarkiewicz2011-04-282-10/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep the link key type together with connection and use it to map security level to link key requirements. Authenticate and/or encrypt connection if the link is insufficiently secure. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Don't modify sec_level if auth failedWaldemar Rymarkiewicz2011-04-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If authentication fails the security level should stay as it was set before the process has started. Setting BT_SECURITY_LOW can hide real security level on a link eg. having BT_SECURITY_MEDIUM on the link, re-authenticate with failure to get BT_SECURITY_HIGH, as a result we get BT_SECURITY_LOW on the link while the real security is still medium. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Add definitions for link key typesWaldemar Rymarkiewicz2011-04-282-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the link key types defs and use them instead of magic numbers. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Add discovering event to the Management interfaceJohan Hedberg2011-04-282-6/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new event to the Management interface to track when local adapters are discovering remote devices. For now this only tracks BR/EDR discovery procedures. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Add basic discovery commands to the management interfaceJohan Hedberg2011-04-281-1/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds start_discovery and stop_discovery commands to the management interface. Right now their implementation is fairly simplistic and the parameters are fixed to what user space has defaulted to so far. This is the very initial phase for discovery implementation into the kernel. Next steps include name resolution, LE scanning and bdaddr type handling. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Don't export l2cap_sock_opsGustavo F. Padovan2011-04-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | l2cap_sk_ops can be static, it's not used outside l2cap_sock.c Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Fix memory leak with L2CAP channelsGustavo F. Padovan2011-04-282-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new l2cap_chan_free() is added to free the channels. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Move conn to struct l2cap_chanGustavo F. Padovan2011-04-284-62/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to the socket deal directly with the channel, most of the time it cares about the channel only. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Move more vars to struct l2cap_chanGustavo F. Padovan2011-04-282-70/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this commit, psm, scid and dcid. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Move more channel info to struct l2cap_chanGustavo F. Padovan2011-04-285-103/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this commit, omtu, imtu, flush_to, mode and sport. It also remove the pi var from l2cap_sock_sendmsg(). Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Move more vars to struct l2cap_chanGustavo F. Padovan2011-04-273-67/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this commit all ERTM and Streaming Mode specific vars. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Move some more elements to struct l2cap_chanGustavo F. Padovan2011-04-272-60/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this commit sec_level, force_reliable, role_switch and flushable. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Rename l2cap_do_connect() to l2cap_chan_connect()Gustavo F. Padovan2011-04-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | l2cap_chan_connect() is a much better name and reflects what this functions is doing (or will do once socket dependence is removed from the core). Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Move conf_state to struct l2cap_chanGustavo F. Padovan2011-04-272-46/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First move of elements depending on user data. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Bluetooth: Refactor L2CAP channel allocationGustavo F. Padovan2011-04-272-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the allocation happens at l2cap_sock_create() will be able to use the struct l2cap_chan to store channel info that comes from the user via setsockopt. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | | * | Merge master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth-2.6Gustavo F. Padovan2011-04-204-2/+11
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: net/bluetooth/l2cap_core.c net/bluetooth/l2cap_sock.c net/bluetooth/mgmt.c
| | * | \ \ Merge branch 'master' of ↵John W. Linville2011-04-264-5/+12
| | |\ \ \ \ | | | |/ / / | | |/| / / | | | |/ / git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
| * | | | Merge branch 'master' of ↵David S. Miller2011-04-264-5/+12
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Resolved logic conflicts causing a build failure due to drivers/net/r8169.c changes using a patch from Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | | | bluetooth: Fix use-before-initiailized var.David S. Miller2011-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | net/bluetooth/l2cap_core.c: In function ‘l2cap_recv_frame’: net/bluetooth/l2cap_core.c:3612:15: warning: ‘sk’ may be used uninitialized in this function net/bluetooth/l2cap_core.c:3612:15: note: ‘sk’ was declared here Actually the problem is in the inline function l2cap_data_channel(), we branch to the label 'done' which tests 'sk' before we set it to anything. Initialize it to NULL to fix this. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | | | Merge branch 'master' of ↵John W. Linville2011-04-253-666/+754
| |\ \ \ \ \ | | | |/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/iwlwifi/iwl-core.c drivers/net/wireless/rt2x00/rt2x00queue.c drivers/net/wireless/rt2x00/rt2x00queue.h
| | * | | | Bluetooth: Fix lockdep warning in L2CAPGustavo F. Padovan2011-04-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a regression from the L2CAP "rewrite" patches. Purge the tx_q already happens on l2cap_chan_del() so we don't need it at l2cap_disconnect_req(). Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Fix another locking unbalanceGustavo F. Padovan2011-04-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | l2cap_get_sock_by_scid was changed to not lock the socket anymore, but I forgot to change all the users of this function. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Don't lock sock inside l2cap_get_sock_by_scid()Gustavo F. Padovan2011-04-131-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix an locking issue with the new l2cap_att_channel(). l2cap_att_channel() was trying to lock a locked socket. Reported-by: Anderson Lizardo <anderson.lizardo@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Fix Out Of Band pairing when mgmt interface is disabledSzymon Janc2011-04-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use kernel stored remote Out Of Band data only if management interface is enabled. Otherwise HCI_OP_REMOTE_OOB_DATA_NEG_REPLY was sent to controller even if remote Out Of Band data was present in bluetoothd. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Add proper handling of received LE dataGustavo F. Padovan2011-04-131-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Despite it works, handling through l2cap_data_channel() is wrongs. That function should handle only connection oriented data. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Fix wrong comparison in listen()Gustavo F. Padovan2011-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should check for the pi->scid there. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Move tx queue to struct l2cap_chanGustavo F. Padovan2011-04-132-25/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tx_q is the queue used by ERTM mode. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Remove unneeded uninitialized_vars()Gustavo F. Padovan2011-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That was unnecessary use of it. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Remove some sk references from l2cap_core.cGustavo F. Padovan2011-04-131-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change some BT_DBG messages and consequently remove some struct sock declarations. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Move SREJ list to struct l2cap_chanGustavo F. Padovan2011-04-132-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of moving all the Channel related operation to struct l2cap_chan. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Fix lockdep warning with skb list lockGustavo F. Padovan2011-04-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression acctually, caused by the first patch series for creating a formal strcut l2cap_chan. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Move busy workqueue to struct l2cap_chanGustavo F. Padovan2011-04-071-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the moving channel stuff to l2cap_chan. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Move srej and busy queues to struct l2cap_chanGustavo F. Padovan2011-04-072-24/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the moving channel stuff to l2cap_chan. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Move ERTM timers to struct l2cap_chanGustavo F. Padovan2011-04-072-44/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also triggered a change in l2cap_send_disconn_req() parameters. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Move remote info to struct l2cap_chanGustavo F. Padovan2011-04-072-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the moving channel stuff to l2cap_chan. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Move SDU related vars to struct l2cap_chanGustavo F. Padovan2011-04-071-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the moving channel stuff to l2cap_chan. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Move more ERTM stuff to struct l2cap_chanGustavo F. Padovan2011-04-071-27/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the moving channel stuff to l2cap_chan. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Move of ERTM *_seq vars to struct l2cap_chanGustavo F. Padovan2011-04-072-67/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the moving channel to stuff to struct l2cap_chan. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Move conn_state to struct l2cap_chanGustavo F. Padovan2011-04-072-193/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of "moving things to l2cap_chan". As one the first move it triggered a big number of changes in the funcions parameters, basically changing the struct sock param to struct l2cap_chan. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: clean up l2cap_sock_recvmsg()Gustavo F. Padovan2011-04-072-25/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move some channel specific stuff to l2cap_core.c, this will make things more clear. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Move conf_{req,rsp} stuff to struct l2cap_chanGustavo F. Padovan2011-04-072-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are also l2cap_chan specific. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Move ident to struct l2cap_chanGustavo F. Padovan2011-04-072-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ident is chan property, no need to reside on socket. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Remove struct del_listGustavo F. Padovan2011-04-071-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we use struct list_head to keep L2CAP channels list the workaround with del_list is not needed anymore. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Use struct list_head for L2CAP channels listGustavo F. Padovan2011-04-071-103/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a well known Kernel API is always a good idea than implement your own list. In the future we might use RCU on this list. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| | * | | | Bluetooth: Create struct l2cap_chanGustavo F. Padovan2011-04-072-90/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct l2cap_chan cames to create a clear separation between what properties and data belongs to the L2CAP channel and what belongs to the socket. By now we just fold the struct sock * in struct l2cap_chan as all the channel info is struct l2cap_pinfo today. In the next commits we will see a move of channel stuff to struct l2cap_chan. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * | | | | Merge branch 'master' of ↵John W. Linville2011-04-1215-279/+848
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/ath/ar9170/main.c drivers/net/wireless/ath/ar9170/phy.c drivers/net/wireless/zd1211rw/zd_rf_rf2959.c
| | * | | | Bluetooth: convert net/bluetooth/ to kstrtoxAlexey Dobriyan2011-04-051-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert from strict_strto*() interfaces to kstrto*() interfaces. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>