~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to include/net/bluetooth/rfcomm.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* 
2
 
   RFCOMM implementation for Linux Bluetooth stack (BlueZ).
 
1
/*
 
2
   RFCOMM implementation for Linux Bluetooth stack (BlueZ)
3
3
   Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com>
4
4
   Copyright (C) 2002 Marcel Holtmann <marcel@holtmann.org>
5
5
 
11
11
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
12
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
13
13
   IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
14
 
   CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES 
15
 
   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
16
 
   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 
 
14
   CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
 
15
   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 
16
   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17
17
   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18
18
 
19
 
   ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, 
20
 
   COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS 
 
19
   ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
 
20
   COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
21
21
   SOFTWARE IS DISCLAIMED.
22
22
*/
23
23
 
105
105
struct rfcomm_hdr {
106
106
        u8 addr;
107
107
        u8 ctrl;
108
 
        u8 len;    // Actual size can be 2 bytes
109
 
} __attribute__ ((packed));
 
108
        u8 len;    /* Actual size can be 2 bytes */
 
109
} __packed;
110
110
 
111
111
struct rfcomm_cmd {
112
112
        u8 addr;
113
113
        u8 ctrl;
114
114
        u8 len;
115
115
        u8 fcs;
116
 
} __attribute__ ((packed));
 
116
} __packed;
117
117
 
118
118
struct rfcomm_mcc {
119
119
        u8 type;
120
120
        u8 len;
121
 
} __attribute__ ((packed));
 
121
} __packed;
122
122
 
123
123
struct rfcomm_pn {
124
124
        u8  dlci;
128
128
        __le16 mtu;
129
129
        u8  max_retrans;
130
130
        u8  credits;
131
 
} __attribute__ ((packed));
 
131
} __packed;
132
132
 
133
133
struct rfcomm_rpn {
134
134
        u8  dlci;
138
138
        u8  xon_char;
139
139
        u8  xoff_char;
140
140
        __le16 param_mask;
141
 
} __attribute__ ((packed));
 
141
} __packed;
142
142
 
143
143
struct rfcomm_rls {
144
144
        u8  dlci;
145
145
        u8  status;
146
 
} __attribute__ ((packed));
 
146
} __packed;
147
147
 
148
148
struct rfcomm_msc {
149
149
        u8  dlci;
150
150
        u8  v24_sig;
151
 
} __attribute__ ((packed));
 
151
} __packed;
152
152
 
153
153
/* ---- Core structures, flags etc ---- */
154
154
 
213
213
#define RFCOMM_DEFER_SETUP  8
214
214
 
215
215
/* Scheduling flags and events */
216
 
#define RFCOMM_SCHED_STATE  0
217
 
#define RFCOMM_SCHED_RX     1
218
 
#define RFCOMM_SCHED_TX     2
219
 
#define RFCOMM_SCHED_TIMEO  3
220
 
#define RFCOMM_SCHED_AUTH   4
221
216
#define RFCOMM_SCHED_WAKEUP 31
222
217
 
223
218
/* MSC exchange flags */
233
228
/* ---- RFCOMM SEND RPN ---- */
234
229
int rfcomm_send_rpn(struct rfcomm_session *s, int cr, u8 dlci,
235
230
                        u8 bit_rate, u8 data_bits, u8 stop_bits,
236
 
                        u8 parity, u8 flow_ctrl_settings, 
 
231
                        u8 parity, u8 flow_ctrl_settings,
237
232
                        u8 xon_char, u8 xoff_char, u16 param_mask);
238
233
 
239
234
/* ---- RFCOMM DLCs (channels) ---- */