aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>2011-06-07 05:18:06 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-06-09 15:33:28 -0400
commit5a9d0a3ffbc40ea1f5a0636501e7599cbb327bcc (patch)
treeabaef9b1bf4896e777842818bd9c0035cff53fb0 /include/net/bluetooth
parentd29d04ce0f49b9fbcaefc83ec4e9bdb7badd45fa (diff)
Bluetooth: Clean up some code style issues
Fix lines longer than 80 chars in length. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/bluetooth.h7
-rw-r--r--include/net/bluetooth/hci_core.h38
-rw-r--r--include/net/bluetooth/rfcomm.h9
3 files changed, 35 insertions, 19 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index af930a3a66be..7bccaf921cab 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -137,7 +137,8 @@ int bt_sock_register(int proto, const struct net_proto_family *ops);
137int bt_sock_unregister(int proto); 137int bt_sock_unregister(int proto);
138void bt_sock_link(struct bt_sock_list *l, struct sock *s); 138void bt_sock_link(struct bt_sock_list *l, struct sock *s);
139void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); 139void bt_sock_unlink(struct bt_sock_list *l, struct sock *s);
140int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t len, int flags); 140int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
141 struct msghdr *msg, size_t len, int flags);
141int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock, 142int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
142 struct msghdr *msg, size_t len, int flags); 143 struct msghdr *msg, size_t len, int flags);
143uint bt_sock_poll(struct file * file, struct socket *sock, poll_table *wait); 144uint bt_sock_poll(struct file * file, struct socket *sock, poll_table *wait);
@@ -172,8 +173,8 @@ static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how)
172 return skb; 173 return skb;
173} 174}
174 175
175static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk, unsigned long len, 176static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk,
176 int nb, int *err) 177 unsigned long len, int nb, int *err)
177{ 178{
178 struct sk_buff *skb; 179 struct sk_buff *skb;
179 180
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 818eadbc3f7f..836d3e8c4bf1 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -224,7 +224,7 @@ struct hci_conn {
224 spinlock_t lock; 224 spinlock_t lock;
225 225
226 bdaddr_t dst; 226 bdaddr_t dst;
227 __u8 dst_type; 227 __u8 dst_type;
228 __u16 handle; 228 __u16 handle;
229 __u16 state; 229 __u16 state;
230 __u8 mode; 230 __u8 mode;
@@ -317,7 +317,8 @@ static inline long inquiry_entry_age(struct inquiry_entry *e)
317 return jiffies - e->timestamp; 317 return jiffies - e->timestamp;
318} 318}
319 319
320struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr); 320struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev,
321 bdaddr_t *bdaddr);
321void hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data); 322void hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data);
322 323
323/* ----- HCI Connections ----- */ 324/* ----- HCI Connections ----- */
@@ -431,7 +432,8 @@ int hci_conn_del(struct hci_conn *conn);
431void hci_conn_hash_flush(struct hci_dev *hdev); 432void hci_conn_hash_flush(struct hci_dev *hdev);
432void hci_conn_check_pending(struct hci_dev *hdev); 433void hci_conn_check_pending(struct hci_dev *hdev);
433 434
434struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 sec_level, __u8 auth_type); 435struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst,
436 __u8 sec_level, __u8 auth_type);
435int hci_conn_check_link_mode(struct hci_conn *conn); 437int hci_conn_check_link_mode(struct hci_conn *conn);
436int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level); 438int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level);
437int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type); 439int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type);
@@ -460,10 +462,12 @@ static inline void hci_conn_put(struct hci_conn *conn)
460 timeo = msecs_to_jiffies(conn->disc_timeout); 462 timeo = msecs_to_jiffies(conn->disc_timeout);
461 if (!conn->out) 463 if (!conn->out)
462 timeo *= 2; 464 timeo *= 2;
463 } else 465 } else {
464 timeo = msecs_to_jiffies(10); 466 timeo = msecs_to_jiffies(10);
465 } else 467 }
468 } else {
466 timeo = msecs_to_jiffies(10); 469 timeo = msecs_to_jiffies(10);
470 }
467 mod_timer(&conn->disc_timer, jiffies + timeo); 471 mod_timer(&conn->disc_timer, jiffies + timeo);
468 } 472 }
469} 473}
@@ -578,16 +582,20 @@ struct hci_proto {
578 582
579 void *priv; 583 void *priv;
580 584
581 int (*connect_ind) (struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type); 585 int (*connect_ind) (struct hci_dev *hdev, bdaddr_t *bdaddr,
586 __u8 type);
582 int (*connect_cfm) (struct hci_conn *conn, __u8 status); 587 int (*connect_cfm) (struct hci_conn *conn, __u8 status);
583 int (*disconn_ind) (struct hci_conn *conn); 588 int (*disconn_ind) (struct hci_conn *conn);
584 int (*disconn_cfm) (struct hci_conn *conn, __u8 reason); 589 int (*disconn_cfm) (struct hci_conn *conn, __u8 reason);
585 int (*recv_acldata) (struct hci_conn *conn, struct sk_buff *skb, __u16 flags); 590 int (*recv_acldata) (struct hci_conn *conn, struct sk_buff *skb,
591 __u16 flags);
586 int (*recv_scodata) (struct hci_conn *conn, struct sk_buff *skb); 592 int (*recv_scodata) (struct hci_conn *conn, struct sk_buff *skb);
587 int (*security_cfm) (struct hci_conn *conn, __u8 status, __u8 encrypt); 593 int (*security_cfm) (struct hci_conn *conn, __u8 status,
594 __u8 encrypt);
588}; 595};
589 596
590static inline int hci_proto_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type) 597static inline int hci_proto_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr,
598 __u8 type)
591{ 599{
592 register struct hci_proto *hp; 600 register struct hci_proto *hp;
593 int mask = 0; 601 int mask = 0;
@@ -673,7 +681,8 @@ static inline void hci_proto_auth_cfm(struct hci_conn *conn, __u8 status)
673 conn->security_cfm_cb(conn, status); 681 conn->security_cfm_cb(conn, status);
674} 682}
675 683
676static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt) 684static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status,
685 __u8 encrypt)
677{ 686{
678 register struct hci_proto *hp; 687 register struct hci_proto *hp;
679 688
@@ -698,7 +707,8 @@ struct hci_cb {
698 707
699 char *name; 708 char *name;
700 709
701 void (*security_cfm) (struct hci_conn *conn, __u8 status, __u8 encrypt); 710 void (*security_cfm) (struct hci_conn *conn, __u8 status,
711 __u8 encrypt);
702 void (*key_change_cfm) (struct hci_conn *conn, __u8 status); 712 void (*key_change_cfm) (struct hci_conn *conn, __u8 status);
703 void (*role_switch_cfm) (struct hci_conn *conn, __u8 status, __u8 role); 713 void (*role_switch_cfm) (struct hci_conn *conn, __u8 status, __u8 role);
704}; 714};
@@ -724,7 +734,8 @@ static inline void hci_auth_cfm(struct hci_conn *conn, __u8 status)
724 read_unlock_bh(&hci_cb_list_lock); 734 read_unlock_bh(&hci_cb_list_lock);
725} 735}
726 736
727static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt) 737static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status,
738 __u8 encrypt)
728{ 739{
729 struct list_head *p; 740 struct list_head *p;
730 741
@@ -755,7 +766,8 @@ static inline void hci_key_change_cfm(struct hci_conn *conn, __u8 status)
755 read_unlock_bh(&hci_cb_list_lock); 766 read_unlock_bh(&hci_cb_list_lock);
756} 767}
757 768
758static inline void hci_role_switch_cfm(struct hci_conn *conn, __u8 status, __u8 role) 769static inline void hci_role_switch_cfm(struct hci_conn *conn, __u8 status,
770 __u8 role)
759{ 771{
760 struct list_head *p; 772 struct list_head *p;
761 773
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
index 6eac4a760c3b..d5eee2093b1e 100644
--- a/include/net/bluetooth/rfcomm.h
+++ b/include/net/bluetooth/rfcomm.h
@@ -234,7 +234,8 @@ int rfcomm_send_rpn(struct rfcomm_session *s, int cr, u8 dlci,
234/* ---- RFCOMM DLCs (channels) ---- */ 234/* ---- RFCOMM DLCs (channels) ---- */
235struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio); 235struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio);
236void rfcomm_dlc_free(struct rfcomm_dlc *d); 236void rfcomm_dlc_free(struct rfcomm_dlc *d);
237int rfcomm_dlc_open(struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst, u8 channel); 237int rfcomm_dlc_open(struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst,
238 u8 channel);
238int rfcomm_dlc_close(struct rfcomm_dlc *d, int reason); 239int rfcomm_dlc_close(struct rfcomm_dlc *d, int reason);
239int rfcomm_dlc_send(struct rfcomm_dlc *d, struct sk_buff *skb); 240int rfcomm_dlc_send(struct rfcomm_dlc *d, struct sk_buff *skb);
240int rfcomm_dlc_set_modem_status(struct rfcomm_dlc *d, u8 v24_sig); 241int rfcomm_dlc_set_modem_status(struct rfcomm_dlc *d, u8 v24_sig);
@@ -271,7 +272,8 @@ static inline void rfcomm_dlc_unthrottle(struct rfcomm_dlc *d)
271} 272}
272 273
273/* ---- RFCOMM sessions ---- */ 274/* ---- RFCOMM sessions ---- */
274void rfcomm_session_getaddr(struct rfcomm_session *s, bdaddr_t *src, bdaddr_t *dst); 275void rfcomm_session_getaddr(struct rfcomm_session *s, bdaddr_t *src,
276 bdaddr_t *dst);
275 277
276static inline void rfcomm_session_hold(struct rfcomm_session *s) 278static inline void rfcomm_session_hold(struct rfcomm_session *s)
277{ 279{
@@ -312,7 +314,8 @@ struct rfcomm_pinfo {
312int rfcomm_init_sockets(void); 314int rfcomm_init_sockets(void);
313void rfcomm_cleanup_sockets(void); 315void rfcomm_cleanup_sockets(void);
314 316
315int rfcomm_connect_ind(struct rfcomm_session *s, u8 channel, struct rfcomm_dlc **d); 317int rfcomm_connect_ind(struct rfcomm_session *s, u8 channel,
318 struct rfcomm_dlc **d);
316 319
317/* ---- RFCOMM TTY ---- */ 320/* ---- RFCOMM TTY ---- */
318#define RFCOMM_MAX_DEV 256 321#define RFCOMM_MAX_DEV 256