diff mbox series

[BlueZ,1/4] lib: Add definitions for ISO socket

Message ID 20201221230140.2100824-1-luiz.dentz@gmail.com (mailing list archive)
State New, archived
Headers show
Series [BlueZ,1/4] lib: Add definitions for ISO socket | expand

Commit Message

Luiz Augusto von Dentz Dec. 21, 2020, 11:01 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 lib/bluetooth.h | 24 ++++++++++++++++++++++++
 lib/iso.h       | 45 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+)
 create mode 100644 lib/iso.h

Comments

bluez.test.bot@gmail.com Dec. 21, 2020, 11:42 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=405035

---Test result---

##############################
Test: CheckPatch - FAIL
Output:
lib: Add definitions for ISO socket
WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#55: FILE: lib/iso.h:1:
+/*

ERROR:FSF_MAILING_ADDRESS: Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL.
#73: FILE: lib/iso.h:19:
+ *  along with this program; if not, write to the Free Software$

ERROR:FSF_MAILING_ADDRESS: Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL.
#74: FILE: lib/iso.h:20:
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA$

- total: 2 errors, 1 warnings, 81 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] lib: Add definitions for ISO socket" has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

tools: Add isotest tool
ERROR:INITIALISED_STATIC: do not initialise statics to 0
#91: FILE: tools/isotest.c:55:
+static int defer_setup = 0;

ERROR:GLOBAL_INITIALISERS: do not initialise globals to NULL
#93: FILE: tools/isotest.c:57:
+struct bt_iso_qos *iso_qos = NULL;

ERROR:SPACING: space required after that ',' (ctx:VxV)
#271: FILE: tools/isotest.c:235:
+		syslog(LOG_ERR,"Can not listen on the socket: %s (%d)",
 		              ^

ERROR:SPACING: space required after that ',' (ctx:VxV)
#276: FILE: tools/isotest.c:240:
+	syslog(LOG_INFO,"Waiting for connection ...");
 	               ^

ERROR:SPACING: space required after that ',' (ctx:VxV)
#284: FILE: tools/isotest.c:248:
+			syslog(LOG_ERR,"Accept failed: %s (%d)",
 			              ^

ERROR:SPACING: space required after that ',' (ctx:VxV)
#337: FILE: tools/isotest.c:301:
+	syslog(LOG_INFO,"Receiving ...");
 	               ^

ERROR:SPACING: space required after that ',' (ctx:VxV)
#353: FILE: tools/isotest.c:317:
+	struct timeval tv_beg,tv_end,tv_diff;
 	                     ^

ERROR:SPACING: space required after that ',' (ctx:VxV)
#353: FILE: tools/isotest.c:317:
+	struct timeval tv_beg,tv_end,tv_diff;
 	                            ^

ERROR:SPACING: space required after that ',' (ctx:VxV)
#399: FILE: tools/isotest.c:363:
+		syslog(LOG_INFO,"%ld bytes in %.2f sec speed %.2f kb/s", total,
 		               ^

ERROR:SPACING: space required after that ',' (ctx:VxV)
#409: FILE: tools/isotest.c:373:
+	syslog(LOG_INFO,"Opening %s ...", filename);
 	               ^

ERROR:SPACING: space required after that ',' (ctx:VxV)
#455: FILE: tools/isotest.c:419:
+	syslog(LOG_INFO,"Sending ...");
 	               ^

ERROR:SPACING: space required before the open brace '{'
#519: FILE: tools/isotest.c:483:
+		for (i = 0; i < 10; i++){

ERROR:SPACING: space prohibited before that ',' (ctx:WxV)
#661: FILE: tools/isotest.c:625:
+int main(int argc ,char *argv[])
                   ^

ERROR:SPACING: space required after that ',' (ctx:WxV)
#661: FILE: tools/isotest.c:625:
+int main(int argc ,char *argv[])
                   ^

ERROR:SPACING: space required before the open parenthesis '('
#683: FILE: tools/isotest.c:647:
+		switch(opt) {

WARNING:PREFER_FALLTHROUGH: Prefer 'fallthrough;' over fallthrough comment
#797: FILE: tools/isotest.c:761:
+		/* Fallthrough */

- total: 15 errors, 1 warnings, 862 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] tools: Add isotest tool" has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

btio: Add support for ISO sockets
WARNING:LINE_SPACING: Missing a blank line after declarations
#52: FILE: btio/btio.c:781:
+		int error = -errno;
+		ERROR_FAILED(err, "sco_bind", errno);

- total: 0 errors, 1 warnings, 419 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

"[PATCH] btio: Add support for ISO sockets" has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: CheckGitLint - FAIL
Output:
lib: Add definitions for ISO socket
3: B6 Body message is missing


##############################
Test: CheckBuild - PASS

##############################
Test: MakeCheck - PASS



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/lib/bluetooth.h b/lib/bluetooth.h
index 9ab033ec4..0d4557377 100644
--- a/lib/bluetooth.h
+++ b/lib/bluetooth.h
@@ -37,6 +37,7 @@  extern "C" {
 #define BTPROTO_CMTP	5
 #define BTPROTO_HIDP	6
 #define BTPROTO_AVDTP	7
+#define BTPROTO_ISO	8
 
 #define SOL_HCI		0
 #define SOL_L2CAP	6
@@ -140,6 +141,29 @@  struct bt_voice {
 
 #define BT_SCM_PKT_STATUS	0x03
 
+#define BT_ISO_QOS		17
+
+#define BT_ISO_QOS_CIG_UNSET	0xff
+#define BT_ISO_QOS_CIS_UNSET	0xff
+
+struct bt_iso_io_qos {
+	uint32_t interval;
+	uint16_t latency;
+	uint16_t sdu;
+	uint8_t  phy;
+	uint8_t  rtn;
+};
+
+struct bt_iso_qos {
+	uint8_t  cig;
+	uint8_t  cis;
+	uint8_t  sca;
+	uint8_t  packing;
+	uint8_t  framing;
+	struct bt_iso_io_qos in;
+	struct bt_iso_io_qos out;
+};
+
 /* Connection and socket states */
 enum {
 	BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */
diff --git a/lib/iso.h b/lib/iso.h
new file mode 100644
index 000000000..2d427b417
--- /dev/null
+++ b/lib/iso.h
@@ -0,0 +1,45 @@ 
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2019  Intel Corporation.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifndef __ISO_H
+#define __ISO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ISO defaults */
+#define ISO_DEFAULT_MTU		251
+
+/* ISO socket address */
+struct sockaddr_iso {
+	sa_family_t	iso_family;
+	bdaddr_t	iso_bdaddr;
+	uint8_t		iso_bdaddr_type;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ISO_H */