Commit Graph

430 Commits

Author SHA1 Message Date
larry ab33519b1b bluetooth: fix net lock imbalance in drop casse
Signed-off-by: larry <larry@transtekcorp.com>
2022-08-04 23:23:01 +08:00
Sergey Nikitenko 2421a591a5 bluetooth: fixing bt_buf addref/release balance 2022-07-26 16:01:07 +08:00
Xiang Xiao 463f321316 wireless/ieee802154: Don't set IFF_DOWN in mac802154netdev_register
since IFF_DOWN is only used for request, not for status. Instead,
IFF_UP should be used to query the netdev status. The IFF_DOWN
related macros are also removed to avoid the confuse.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-19 11:09:16 +03:00
Gustavo Henrique Nihei 939b990a9c wireless: Convert DEBUGASSERT(false) into more intuitive DEBUGPANIC()
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-07-14 12:08:45 +08:00
Xiang Xiao fe85e9d0fa net: Remove devif_timer from comment
since devif_timer has been removed in:
commit 035d925864
Author: zhanghongyu <zhanghongyu@xiaomi.com>
Date:   Sun May 29 21:47:28 2022 +0800

    devif: remove all devif_timer

    Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:15:41 +03:00
zhanghongyu 035d925864 devif: remove all devif_timer
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-06-02 20:11:50 -03:00
Xiang Xiao 1fb8c13e5e Replace nxsem_timedwait_uninterruptible with nxsem_tickwait_uninterruptible
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 13:55:58 +03:00
Petro Karashchenko 09b3fb25ab drivers: remove unimplemented open/close/ioctl interfaces
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-04-15 16:56:25 +08:00
Petro Karashchenko 68902d8732 pid_t: unify usage of special task IDs
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 21:22:32 +08:00
Xiang Xiao ec77c2d3de ieee802154/mac802154.c:332:3: Fix error: 'memcpy' reading 13 bytes from a region of size 4
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-10 19:46:01 +02:00
Xiang Xiao 1d1bdd85a3 Remove the double blank line from source files
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 20:10:14 +01:00
chao.an ef2097e439 wireless/bluetooth: fix build break if NET_6LOWPAN enabled
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-07 18:26:55 +08:00
Petro Karashchenko 3ccb657dc2 nuttx: remove space befone newline in logs
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-27 21:01:19 -06:00
raiden00pl 5ac469441e wireless/bluetooth/bt_hcicore.c: allocated recv buffer must reserve BLUETOOTH_H4_HDRLEN for head
This was broken since 6c69b12000.
The first byte in io_data buffer must be the BT H4 packet type.
Without this change an assertion in bt_netdev.c:535 is always raised and nimble host layer crash.
2021-12-18 09:11:29 -06:00
Petro Karashchenko 51a2db6ffc Kconfig: improve uniformity
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-14 07:32:48 -06:00
Alin Jerpelea df088c39f0 author: Anthony Merlino : update licenses to Apache
Verge Aero has submitted the SGA

Anthony Merlino has submitted the SGA

Gregory Nutt has submitted the SGA

Sebastien Lorquet has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-06 20:38:14 +08:00
Alin Jerpelea a09a9524b4 wireless: bluetooth: revert to the original license
Those files are ported from the Intel/Zephyr
arduino101_firmware_source-v1.tar package
where the code was released with a compatible 3-clause BSD license

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-01 11:56:31 +08:00
Alin Jerpelea 29bfbf8769 License: add Bluetooth LE support to the license guard
If ALLOW_BSD_COMPONENTS is not enabled in the license setup,
Bluetooth LE support will be disabled

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-27 02:56:22 +08:00
jordi f3af6edf93 Kconfig: add quotes in source to clean warnings from setconfig
To avoid the setconfig warning "style: quotes recommended around xxx in
source xxx"
2021-07-23 02:32:19 -07:00
Xiang Xiao 2e54df0f35 Don't include assert.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Xiang Xiao d7f96003cf Don't include debug.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 06:42:02 +09:00
chao.an 6c69b12000 wireless/bluetooth: decoupling bt_driver_s and bt_buf_s
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-31 09:50:54 -03:00
Nathan Hartman f61214cc0d mqueue, btqueue: Fix some typos (e.g., essage -> message)
include/nuttx/mqueue.h:
sched/mqueue/mq_msgqfree.c:
wireless/bluetooth/bt_queue.c:

    * Fix typos in comments only. No functional changes.
2021-05-25 07:39:24 +09:00
Xiang Xiao 001e7c3e76 sched: Don't include nuttx/sched.h inside sched.h
But let nuttx/sched.h include sched.h instead to
avoid expose nuttx kernel API to userspace.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:11:53 +09:00
Xiang Xiao 5f3a98b5a8 libc/assert: Reference the expression in all case
to avoid the warning "defined but not used"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I55b7c092d0f2e5882fc1784987657c10cdf2d90b
2021-04-03 21:00:41 +01:00
Gustavo Henrique Nihei 330eff36d7 sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Gustavo Henrique Nihei 47cb41c92f makefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Gustavo Henrique Nihei 76acb32e29 Fix typos reported by codespell 2021-02-25 11:31:49 -08:00
Alin Jerpelea 911bc68833 wireless: fix nxstyle errors
Fix nxstyle errors to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-19 08:07:47 -08:00
Alin Jerpelea f59814e7d7 wireless: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-19 08:07:47 -08:00
Masayuki Ishikawa d87f350831 arch, boards, drivers, include, sched, wireless: Change spinlock APIs.
Summary:
- This commit changes spinlock APIs (spin_lock_irqsave/spin_unlock_irqrestore)
- In the previous implementation, the global spinlock (i.e. g_irq_spin) was used.
- This commit allows to use caller specific spinlock but also supports to use
  g_irq_spin for backword compatibility (In this case, NULL must be specified)

Impact:
- None

Testing:
- Tested with the following configurations
- spresnse:wifi, spresense:wifi_smp
- esp32-devkitc:smp (QEMU), sabre6-quad:smp (QEMU)
- maxi-bit:smp (QEMU), sim:smp
- stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-07 21:28:56 -08:00
Matias N 45b392be7e nRF52: add support for building SoftDevice BLE controller 2021-02-02 14:40:26 -08:00
ligd f63db66382 mqueue: add file_mq_xx for kernel use
Change-Id: Ida12f5938388cca2f233a4cde90277a218033645
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-05 02:40:43 -06:00
Xiang Xiao d75895586a bluetooth: Don't call BT_LE162HOST in bt_buf_get_le16
since BT_GETUINT16 alredy convert the value to the little endian

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Xiang Xiao 5c0d430b99 bluetooth: replace leave_critical_section with spin_unlock_irqrestore
since the resouce in bt_buf is protected by spin_lock_irqresave

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Xiang Xiao d1dc0bf848 bluetooth: Fix typos in comment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Brennan Ashton c6947199b2 Bluetooth: Fix bt_buff lifecycle
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-12-21 23:36:57 -06:00
chao.an 6ecf9dc5ef wireless/bluetooth: change the tx thread stack size to DEFAULT_TASK_STACKSIZE
simulate will demands more stack in different platform

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-10 06:34:09 -06:00
YAMAMOTO Takashi 2a2679e11a wireless/bluetooth/bt_smp.c: Avoid assuming wlinfo expansion 2020-12-06 09:03:09 -06:00
YAMAMOTO Takashi 14b7ea01ba wireless/bluetooth/bt_conn.c: Avoid assuming wlinfo expansion 2020-12-06 09:03:09 -06:00
YAMAMOTO Takashi af4f81a7e1 wireless/bluetooth/bt_hcicore.c: Avoid assuming wlinfo expansion 2020-12-06 09:03:09 -06:00
chao.an c56785bd0d style/Makefile: remove unnecessary trailing whitespace
N/A

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-28 12:20:30 +01:00
YAMAMOTO Takashi 0dadd03dbb wireless/bluetooth/bt_smp.c: Fix a syslog format 2020-11-27 05:18:57 -06:00
YAMAMOTO Takashi 05127a2a33 wireless/bluetooth/bt_ioctl.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi e8ae56d9ea wireless/bluetooth/bt_att.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 46c52132c4 wireless/bluetooth/bt_buf.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
Matias N d5b6ec450f Parallelize depend file generation 2020-11-22 09:02:59 -03:00
Matias N 52c3037b00 bt_conn.c: use definition names instead of hardcoded numbers 2020-10-28 22:02:09 -07:00
Matias N e560eeae01 bt_hcicore.c: fix handling of advertising report; use correct advertising interval 2020-10-28 22:02:09 -07:00
Matias N db37d825ba bt_netdev.c: wrong placement of DEBUGASSERT (checks pointer before being set) 2020-10-28 22:02:09 -07:00