Commit Graph

607 Commits

Author SHA1 Message Date
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
98976176e1 drivers/wireless/gs2200m: Fix compiler warning
wireless/gs2200m.c: In function 'gs2200m_send_cmd':
Error: wireless/gs2200m.c:1555:32: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
 1555 |       memset(pkt_dat, 0, sizeof(pkt_dat));
      |                                ^
Error: wireless/gs2200m.c:1570:36: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
 1570 |           memset(pkt_dat, 0, sizeof(pkt_dat));
      |                                    ^
wireless/gs2200m.c: In function 'gs2200m_ioctl':
Error: wireless/gs2200m.c:318:25: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
  318 |   snprintf(str, 5, "%04d", num);
      |                         ^
wireless/gs2200m.c:318:3: note: 'snprintf' output between 5 and 6 bytes into a destination of size 5
  318 |   snprintf(str, 5, "%04d", num);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-10 19:46:01 +02:00
Alin Jerpelea
32401a0adb drivers: wireless: spirit: exclude BSD components from build
Unless ALLOW_BSD_COMPONENTS is enabled support will not be built

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-24 22:48:47 +08:00
Alin Jerpelea
bbfed12fd9 drivers: wireless: bluetooth: exclude BSD components from build
Unless ALLOW_BSD_COMPONENTS is enabled support will not be built

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-24 22:48:47 +08:00
Xiang Xiao
d7fe0127b0 Replece clock_gettime(CLOCK_REALTIME) with clock_systime_timespec if suitable
it's better to call the kernrel api insteaad user space api in kernel

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-24 01:06:36 +08:00
Masayuki Ishikawa
0258968abd drivers: wireless: Fix gs2200m_ioctl_accept()
Summary:
- I received an issue report that multiwebcam in Spresense SDK 2.4.0
  has a problem with the Chrome browser
- Actually, the browser tries to establish 2 connections but
  the multiwebcam can handle only 1 connection. And if accept() for
  the second connection is delayed, the connection no longer exists
  in the gs2200m hardware
- This commit fixes this issue by checking if the cid is valid or not.

Impact:
- gs2200m driver only

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-02-15 10:22:42 +08:00
Alexander Lunev
a597e66070 bcm43xxx: fixed several warnings:
warning: ISO C forbids 'return' with expression, in function returning void [-Wpedantic]
warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint8_t * {aka unsigned char *}' [-Wformat=]
warning: too many arguments for format [-Wformat-extra-args]
2022-02-04 15:26:42 -03:00
Petro Karashchenko
08043fb5bc net: unify FAR keyword usage for all net buffer memory mapped buffers
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-20 01:42:56 +08:00
Petro Karashchenko
9551de7115 net: use HTONS, NTOHS, HTONL, NTOHL macro in kernel code
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-18 10:59:47 +01:00
Petro Karashchenko
8d3bf05fd2 include: fix double include pre-processor guards
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-16 11:11:14 -03:00
Petro Karashchenko
a743fed63d file_operations: get back C89 compatible initializer
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-11 02:14:00 +08:00
Xiang Xiao
828f04f0e5 sdio: Move sdio utils functions to drivers/mmcsd
so all sdio client driver can reuse them

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-04 17:44:24 +01:00
Alexander Lunev
76bb5f5a61 bcm43xxx: supported ARM CR4 core and bcm43455 chip in particular 2021-12-30 01:33:13 +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
Juha Niskanen
422ceec99b Fix typos in comments and Kconfig files
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-12-21 03:26:16 -06:00
Alexander Lunev
02e2b33c1c bcm43xxx: corrected SDIO_CCCR_HIGHSPEED_SHS bit handling 2021-11-03 01:12:53 -05:00
Alexander Lunev
6bdc737f5c bcm43xxx: supported high-speed timing mode with a clock rate up to 50MHz 2021-10-18 21:58:03 -05:00
Alexander Lunev
df40531a07 bcm43xxx: fixed an issue with wrong devif_timer() invocations
on bcmf_netdev_notify_tx_done events
that provoked massive TCP spurious retransmissions;

bcm43xxx: fixed an issue with sporadic stalls of TX poll timer.
2021-10-03 17:36:09 -03:00
Alexander Lunev
e5af7766bb bcm43xxx: fixed an issue with abrupt stall of receiving new credits (via sdpcm header)
from bcm43362 chip/firmware as soon as a high network traffic started
2021-09-16 21:59:25 -05:00
Alexander Lunev
51c185b3b5 bcm43xxx/Kconfig: added SDPCM frame pool size parameter.
Also I have set the parameter to 8 instead of 4 by default
because there were many "alloc failed" messages in debug log
even during initialization / automatic IP address assignment
via DHCP negotiation.
2021-09-16 21:59:12 -05:00
Alin Jerpelea
42ae36dd7f drivers: wireless: spirit: update licenses to Apache
Gregory Nutt has submitted the SGA
as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-13 22:43:36 +08:00
Alin Jerpelea
aa8a8df07c LICENSE: add license for wireless/spirit
The license for wireless/spirit is added to the LICENSE file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-13 22:43:36 +08: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
24aa7e6278 author: Matt Poppe: update licenses to Apache
Matt Poppe 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-01 21:02:34 +08:00
Alin Jerpelea
acf22d6c42 drivers: wireless: bluetooth: revert 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
Masayuki Ishikawa
af57d04433 Revert "drivers: wireless: Fix ASSERT() in _read_data_len() in gs2200m.c"
We found that the change caused a problem when running a VPN application.
and also confirmed that reverting the commit fixed the issue.

This reverts commit 11a842333f.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-08-25 12:25:39 +08:00
Alexander Lunev
ff2dd12c3c bcm43xxx: fixed issues with unaligned buffers for DMA transfers.
This fixes the following errors:
- "stm32_dmacapable: stm32_dmacapable: burst crosses 1KiB
up_assert: Assertion failed at file:chip/stm32_sdio.c line: 2890 task: init"

- "stm32_dmacapable: stm32_dmacapable: burst crosses 1KiB
up_assert: Assertion failed at file:chip/stm32_sdio.c line: 2808 task: bcmf"

bcm43xxx: replaced all occurrences of "__attribute__((packed))" by
compiler independent "begin_packed_struct / end_packed_struct".
2021-07-28 13:47:04 -03:00
Masayuki Ishikawa
b63fe511bb drivers: wireless: Fix to set the address family for recvfrom() in gs2200m.c
Summary:
- I noticed that the ntpclient does not work with gs2200m
- Finally, I found that the address family for recvfrom() is not
  set correctly
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with ntpclient

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-07-26 07:32:42 -07: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
Alexander Lunev
9e27888938 bcm43xxx: supported IW_AUTH_CIPHER_NONE mode 2021-07-09 21:34:05 -07:00
Alexander Lunev
ace43936c1 bcm43xxx: nxstyle fixes ("error: Mixed case identifier found") 2021-07-09 21:34:05 -07:00
Masayuki Ishikawa
c89c11a078 drivers: wireless: Fix error handling in gs2200m_ioctl_send()
Summary:
- I noticed that NFS over TCP does not work correctly when
  it tried to reconnect to the NFS server.
- This commit fixes this issue

Impact:
- gs2200m only

Testing:
- Tested with spresense:wifi_smp
- NOTE: need to update gs2200m_main.c

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-28 21:48:47 -05:00
Alexander Lunev
f7c8875fd7 sdio,stm32h7: fixed an issue with not starting IDMA data transfer in case of IO_RW_EXTENDED command (CMD53);
corrected setting SDMMC_DCTRL.DTMODE field for block data transfers ending on block count
and for block data transfers ending with STOP_TRANSMISSION command;
stm32_sdio: added more debug messages
2021-06-21 02:47:46 -05:00
Xiang Xiao
5b2a17b892 Include assert.h in necessary place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-08 13:06:08 -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
Masayuki Ishikawa
ab7ceb26e0 drivers: wireless: Remove ASSERT() in _check_pkt_q_empty() in gs2200m.c
Summary:
- During Wi-Fi stress test, sometimes ASSERT() happens in gs2200m.c
- This commit removes the ASSERT() but calls _remove_all_pkt()
  for a workaround.

Impact:
- None

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-05-31 21:27:28 -05: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
Alin Jerpelea
13e4f9b6b2 drivers: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-05-31 02:58:08 -05: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
Masayuki Ishikawa
97e6d35c3a drivers: wireless: Fix AT command response handling in gs2200m.c
Summary:
- When sending an AT command during receiving a bulk packet,
  the bulk packet might be put in the AT command response.
- To handle such the case, gs2200m_send_cmd2() is newly
  introduced instead of using gs2200m_send_cmd(dev, cmd, NULL)

Impact:
- All use cases that send an AT command in gs2200m.c

Testing:
- Tested with renew and nxplayer with spresense:wifi

Reported-by: Masatoshi Ueno <Masatoshi.Ueno@sony.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-04-15 21:28:25 -05:00
Masayuki Ishikawa
fa5daea3d9 drivers: wireless: Fix to receive a UDP packet partially in gs2200m.c
Summary:
- When receiving a UDP packet partially, the rest of the packet
  must be discarded.

Impact:
- None

Testing:
- Tested with a UDP sample program

Reported-by: Masatoshi Ueno <Masatoshi.Ueno@sony.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-04-13 10:37:15 -05:00
Xiang Xiao
3f9908f7d1 Remove the unnecessary math.h inclusion
or move from header file to source file since math.h doesn't always exist

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-12 22:58:23 -04:00
Anthony Merlino
b21cb3308a Fixes race condition in event wait logic of SDMMC driver.
This change makes it so that the timeout is set as part of the SDIO_WAITENABLE call instead of the SDIO_EVENTWAIT call. By doing so, you eliminate all opportunity for a race condition.

stm32h7:sdmmc Check if busy ended early
2021-04-05 23:08:45 -05:00
Alin Jerpelea
e1d361eddf drivers: nxstyle fixes
Fixes for errors reported by nxstyle

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-05 07:31:45 -05:00
Alin Jerpelea
0fc329d814 driver: Ales Verbic: update licenses to Apache
Ales Verbic has submitted the ICLA and we can migrate the licenses
 to Apache.

Uros Platise has submitted the ICLA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-05 06:13:17 -05: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
Alin Jerpelea
08e5378b11 NuttX: Gregory Nutt: update licenses to Apache
Several licenses were missed in the initial work

David Sidrane has submitted the ICLA and we can migrate the 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-04-03 04:20:31 -07:00
Alin Jerpelea
d2c4d4c543 drivers: wireless: fix Mixed Case errors
Fix Mixed Case errors reported by nxstyle

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-01 12:13:12 -05:00
Alin Jerpelea
7a29e1f5fb drivers: Nxstyle fixes
Nxstyle fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-01 12:13:12 -05:00