Commit Graph

553 Commits

Author SHA1 Message Date
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
Alin Jerpelea
ccff570e6f drivers: nxstyle fixes
nxstyle fixes to pass the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-04 18:32:27 -08:00
Alin Jerpelea
e5b6305f4a drivers: 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-03-04 18:32:27 -08:00
Gustavo Henrique Nihei
c76e201ebd drivers/i2s: Fix nxstyle issues 2021-02-25 18:57:18 -08:00
Gustavo Henrique Nihei
55d66f60a3 drivers: Fix typos reported by codespell 2021-02-25 18:57:18 -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
Masayuki Ishikawa
0c68ddb760 drivers: wireless: Change retry condition in gs2200m_hal_write()
Summary:
- During Wi-Fi stress test, I noticed that ASSERT() happened
  in gs2200m_hal_write(). Actually, this happens in 20-40 hours.
- In this case, resp[1] was always 0x0 which is not defined
  in the spec.
- In the previous implementation, retry was only done in case of
  WR_RESP_NOK. (0x13)
- This commit changes this condition and it reties in case of
  0x0 as well

Impact:
- gs2200m driver

Testing:
- Tested with spresense:wifi_smp and stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-03 10:29:05 +01:00
Masayuki Ishikawa
c6ed7dd760 drivers: wireless: Fix _read_data() in gs2200m.c
Summary:
- During reviewing the GS2200M document, I noticed that
   _read_data() implementation is incorrect.
- Actually, we do not use "SPI Byte Stuffing for SPI-NO-DMA"
  but use "SPI Command Response (SPI-DMA)", so the sequence
  should use SPI_RECVBLOCK().

Impact:
- gs2200m.c only

Testing:
- Tested with stm32f4discovery:wifi and spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-25 19:13:17 -08:00
Masayuki Ishikawa
8a72ab1a50 drivers: wireless: Print error massages with wlerr() in gs2200m.c
Summary:
- I noticed that some error messages are printed with wlinfo()
- This commit prints such error messages with wlerr()

Impact:
- No impact

Testing:
- Tested with spresense:wifi
- NOTE: CONFIG_DEBUG_WIRELESS_ERROR must be enabled

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-24 20:03:53 -08:00
Masayuki Ishikawa
11a842333f drivers: wireless: Fix ASSERT() in _read_data_len() in gs2200m.c
Summary:
- During stress test with spresense:wifi (non-SMP), I noticed
  sometimes ASSERT() happened in _read_data_len()
- Actually, up_udelay(50) has been added to avoid the ASSERT
- However, I finally noticed that it should be moved before
  calling dready()
- Also, I cofirmed that we can reduced the time from 50 to 30
- NOTE: we need at least 15us in my experience

Impact:
- gs2200m.c only

Testing:
- Tested with following configurations
- spresense:wifi, spresense:wifi_smp, stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-17 21:43:23 -08:00
Xiang Xiao
7df322c6be bluetooth: Move the lower half null check to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-17 20:49:19 -08:00
Xiang Xiao
9103184722 bluetooth: Rename *bt_uart_shim_getdevice to btuart_shim_getdevice
follow other bluetooth driver convention(e.g. btuart_register)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-17 20:49:19 -08:00
chao.an
c8a6f31a33 wireless/bluetooth: move H4_* definition to external
Reference the define from board or arch driver

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-16 11:18:26 -08:00
chao.an
f308ac1583 wireless/bluetooth: add more hci event definitions
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-16 11:18:26 -08:00
chao.an
605cd77a23 wireless/bluetooth: remove the host dependency
HCI driver should not depend on the bluetooth host

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-16 11:18:26 -08:00
Xiang Xiao
0536953ded Kernel module should prefer functions with nx/kmm prefix
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 08:57:58 +01:00
Xiang Xiao
d9b1cb3d27 bluetooth: BLUETOOTH_BCM4343X shouldn't select BLUETOOTH_UART_SHIM
since bcm4343x bluetooth driver doesn't depend on uart shim driver

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-29 18:11:21 -08:00
Xiang Xiao
753cb6c22b bluetooth: Remove BLUETOOTH_UART_BT860 from Kconfig
it isn't difference from BLUETOOTH_UART_OTHER, so let's use the later instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-29 18:11:21 -08:00
Xiang Xiao
c612c068e1 bt_uart_shim: Setup pollfd with file* correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:42 +01:00
Xiang Xiao
c258fe0f85 bt_uart_shim: Make CONFIG_SERIAL_TERMIOS optional
since the caller don't always need to use setbaud callback

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:42 +01:00
Xiang Xiao
9f463fd3da bt_uart_shim: Remove g_lowerstatic static variable
let's initialize the callback directly to save the memory

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:42 +01:00
Xiang Xiao
8ce2d376cc bt_uart_shim: Don't hardcode the thread stack size
so let's change 1024 to CONFIG_DEFAULT_TASKSIZE

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:42 +01:00
Xiang Xiao
c0cd125bf3 bt_uart_shim: Support the multiple instances
by removing the global variables(g_n)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:42 +01:00
Xiang Xiao
aec3220fae bt_uart_shim: Correct the prototype of bt_uart_shim_getdevice
1.Add const to the path argument
2.Return the explicit type(struct btuart_lowerhalf_s *)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:42 +01:00
Xiang Xiao
d85cf99a65 bt_uart: Retry the lower half operation if -EINTR is returned
to handle the partial write and read gracefully

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:03 +01:00
Xiang Xiao
1d8397a36d bt_uart: Don't call rxdrain in the successful path
because the physical uart bus may receive the next packet asynchronously

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:03 +01:00
Xiang Xiao
ca5d8d8660 bt_uart: Fix the minor typo in bt_uart driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:03 +01:00
Xiang Xiao
6a30d7ad6b bt_uart: Remove static variables in btuart_rxwork
to support mulitple bluetooth controllers

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:03 +01:00
Xiang Xiao
f992ff37c3 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Xiang Xiao
3dfb897ed1 bluetooth: Remove the unnecessary forward reference
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Masayuki Ishikawa
b67f200636 drivers: wireless: Replace license header with Apache License 2.0
Summary:
- This commit replaces SHES related headers in gs2200m.c

Impact:
- No impact

Testing:
- Build check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-28 08:43:35 +01:00
chao.an
84daee1f76 drivers/netdev: try tcp timer in every txavail call
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-18 14:16:11 +09:00
YAMAMOTO Takashi
e5592b615d drivers/wireless/ieee80211/bcm43xxx/bcmf_core.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
abb10784d9 drivers/wireless/ieee80211/bcm43xxx/bcmf_core.c: Appease nxstyle 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
4fea157642 drivers/wireless/ieee80211/bcm43xxx/mmc_sdio.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
5a57f10b9c drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c: Fix a syslog format 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
2874f613a6 drivers/wireless/ieee80211/bcm43xxx/bcmf_utils.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
b7358e9542 drivers/wireless/ieee80211/bcm43xxx/bcmf_bdc.c: Fix a syslog format 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
7d5259c767 drivers/wireless/ieee80211/bcm43xxx/bcmf_cdc.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
2d892343d9 drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c: Fix syslog formats
The following nxstyle errors are not trivial to fix because
they are parts of the ioctl api.

drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c:1083:34: error: Mixed case identifier found
drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c:1445:7: error: Mixed case identifier found
2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
720e90a7ce drivers/wireless/ieee802154/xbee/xbee.c: Fix a syslog format 2020-12-02 02:53:47 -06:00
YAMAMOTO Takashi
e5b63cddce drivers/wireless/ieee802154/mrf24j40/mrf24j40_getset.c: Fix a syslog format 2020-12-02 02:53:47 -06:00
YAMAMOTO Takashi
d6a562e3e1 drivers/wireless/gs2200m.c: Fix syslog formats 2020-11-27 05:18:57 -06:00
YAMAMOTO Takashi
5706e3851d drivers/wireless/lpwan/sx127x/sx127x.c: Fix syslog formats 2020-11-24 22:31:33 -08:00
YAMAMOTO Takashi
6d2c28e70d drivers/wireless/gs2200m.c: Fix scanf format warnings 2020-11-18 00:44:55 -08:00
YAMAMOTO Takashi
320b7131e0 drivers/wireless/ieee802154/mrf24j40/mrf24j40_regops.c: Fix a printf format warning 2020-11-16 08:29:00 -08:00
YAMAMOTO Takashi
9a7de336d0 drivers/wireless/ieee802154/mrf24j40/mrf24j40_regops.c: Fix a printf format warning 2020-11-16 08:29:00 -08:00
Masatoshi Ueno
04ec9cf989 gs2200m: Add function to get IWNWID / IWFREQ / IWSENS information
Summary:
- This commit enables gs2200m driver to get IWNWID/IWFREQ/IWSENS information

Impact:
- Affects gs2200m only

Testing:
- Tested with spresense:wifi
2020-11-02 19:58:58 +09:00
Masatoshi Ueno
c0b4bd2f85 gs2200m: Check disassociation from AP and enable rejoin
Summary:
- This commit enables gs2200m driver re-associate to the access point when disassociated

Impact:
- Affects gs2200m only

Testing:
- Tested with spresense:wifi
2020-11-02 16:11:13 +09:00