summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_sock.c
Commit message (Collapse)AuthorAgeFilesLines
* Bluetooth: l2cap and rfcomm: fix 1 byte infoleak to userspace.Filip Palian2011-06-091-0/+1
| | | | | | | | | Structures "l2cap_conninfo" and "rfcomm_conninfo" have one padding byte each. This byte in "cinfo" is copied to userspace uninitialized. Signed-off-by: Filip Palian <filip.palian@pjwstk.edu.pl> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Merge branch 'master' of ↵John W. Linville2011-05-161-59/+13
|\ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/iwlwifi/iwl-agn-tx.c net/mac80211/sta_info.h
| * Bluetooth: Remove l2cap_sk_listGustavo F. Padovan2011-05-051-4/+2
| | | | | | | | | | | | | | | | | | | | A new list was added to replace the socket based one. This new list doesn't depent on sock and then fits better inside l2cap_core.c code. It also rename l2cap_chan_alloc() to l2cap_chan_create() and l2cap_chan_free() to l2cap_chan_destroy) Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Handle psm == 0 case inside l2cap_add_psm()Gustavo F. Padovan2011-05-051-22/+0
| | | | | | | | | | | | | | When the user doesn't specify a psm we have the choose one for the channel. Now we do this inside l2cap_add_psm(). Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Add l2cap_add_psm() and l2cap_add_scid()Gustavo F. Padovan2011-05-051-33/+11
| | | | | | | | | | | | | | | | The intention is to get rid of the l2cap_sk_list usage inside l2cap_core.c. l2cap_sk_list will soon be replaced by a list that does not depend on socket usage. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* | Merge branch 'master' of ↵John W. Linville2011-05-051-105/+137
|\ \ | |/ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/libertas/if_cs.c drivers/net/wireless/rtlwifi/pci.c net/bluetooth/l2cap_sock.c
| * 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-281-0/+2
| | | | | | | | | | | | 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-281-5/+7
| | | | | | | | | | | | | | 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-281-13/+13
| | | | | | | | | | | | 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-281-46/+54
| | | | | | | | | | | | | | 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-271-16/+17
| | | | | | | | | | | | 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-271-24/+28
| | | | | | | | | | | | 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-271-1/+1
| | | | | | | | | | | | | | | | 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-271-3/+7
| | | | | | | | | | | | 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-271-1/+10
| | | | | | | | | | | | | | | | 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 branch 'master' of ↵John W. Linville2011-04-251-48/+24
|\ \ | |/ | | | | | | | | | | | | | | 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 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-131-4/+3
| | | | | | | | | | | | tx_q is the queue used by ERTM mode. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Move SREJ list to struct l2cap_chanGustavo F. Padovan2011-04-131-1/+0
| | | | | | | | | | | | As part of moving all the Channel related operation to struct l2cap_chan. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Move srej and busy queues to struct l2cap_chanGustavo F. Padovan2011-04-071-2/+0
| | | | | | | | | | | | 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-071-6/+7
| | | | | | | | | | | | 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-071-2/+2
| | | | | | | | | | | | 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-071-1/+1
| | | | | | | | | | | | 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-071-7/+9
| | | | | | | | | | | | | | | | 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-071-24/+1
| | | | | | | | | | | | | | 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-071-4/+4
| | | | | | | | | | | | 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-071-2/+2
| | | | | | | | | | | | ident is chan property, no need to reside on socket. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Create struct l2cap_chanGustavo F. Padovan2011-04-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Bluetooth: delete hanging L2CAP channelAndrei Emeltchenko2011-03-311-2/+3
| | | | | | | | | | | | | | | | Sometimes L2CAP connection remains hanging. Make sure that L2CAP channel is deleted. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* | Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6Linus Torvalds2011-04-071-1/+1
|\ \ | | | | | | | | | | | | * 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6: Fix common misspellings
| * | Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| |/ | | | | | | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* | Bluetooth: delete hanging L2CAP channelAndrei Emeltchenko2011-03-241-2/+3
|/ | | | | | | | Sometimes L2CAP connection remains hanging. Make sure that L2CAP channel is deleted. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: fix errors reported by checkpatch.plGustavo F. Padovan2011-02-171-15/+15
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Do not send disconn comand over LE linksVille Tervo2011-02-161-7/+8
| | | | | | | | | l2cap over LE links can be disconnected without sending disconnect command first. Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Add server socket support for LE connectionVille Tervo2011-02-161-2/+5
| | | | | | | | Add support for LE server sockets. Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: Add LE connection support to L2CAPVille Tervo2011-02-161-3/+4
| | | | | | | | | | Add basic LE connection support to L2CAP. LE connection can be created by specifying cid in struct sockaddr_l2 Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: l2cap: fix 1 byte infoleak to userspaceVasiliy Kulikov2011-02-111-0/+1
| | | | | | | | | Structure l2cap_options has one padding byte between max_tx and txwin_size fields. This byte in "opts" is copied to userspace uninitialized. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move __l2cap_sock_close() to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+78
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_kill() to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+16
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move L2CAP sock timers function to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+13
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_sendmsg() to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+102
| | | | | | Also moves some L2CAP sending functions declaration to l2cap.h Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_shutdown() to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+31
| | | | | | Declare __l2cap_wait_ack() and l2cap_sock_clear_timer() in l2cap.h Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_recvmsg() to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+42
| | | | | | | It causes the move of the declaration of 3 functions to l2cap.h: l2cap_get_ident(), l2cap_send_cmd(), l2cap_build_conf_req() Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_connect() to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+85
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_getsockopt() to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+145
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_setsockopt() to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+175
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_getname() to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+23
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_accept() to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+56
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* Bluetooth: move l2cap_sock_bind()/listen() to l2cap_sock.cGustavo F. Padovan2011-02-081-0/+135
| | | | Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
OpenPOWER on IntegriCloud