Commit Graph

46707 Commits

Author SHA1 Message Date
zhanghongyu
2a6a869962 tcp: Update conn laddr after select device
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-21 18:47:13 +08:00
Zhe Weng
4ac44bc8b5 arch/sim: fix MTU mismatch on TAP device in host route mode
In host route mode (bridge mode disabled), the d_pktsize of TAP device is not initialized and will be set to CONFIG_NET_ETH_PKTSIZE in netdev_register, while the MTU on host side keeps at 1500. Input packets larger than CONFIG_NET_ETH_PKTSIZE will be dropped because 'IP packet shorter than length in IP header'.
This patch fix this issue by reading MTU from host side and set as d_pktsize, just the same as what is done in bridge mode.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-10-21 16:57:36 +08:00
zhanghongyu
ae3e1d8ec5 setsockopt: Change return errno to EFAULT when value is NULL
behavior alignment to Linux for some testsuite

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-21 16:57:20 +08:00
zhanghongyu
dc577b66e4 psock_socket: Add type field check
behavior alignment to Linux
Return EINVAL when type field include nonsupport bit

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-21 16:57:20 +08:00
zhanghongyu
2be529121a socketpair: Add SOCK_NONBLOCK support into type field
behavior alignment to Linux

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-21 16:57:20 +08:00
zhanghongyu
85ffa4bcf3 inet_sockif: errno alignment to Linux
cunittest error case: protocol invalid need return 123(EPROTONOSUPPORT)
now return 106(EAFNOSUPPORT)

inet_setup will check type ande protocol

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-21 16:57:20 +08:00
zhanghongyu
6b955b0ef0 inet_bind: errno alignment to Linux
cunittest error case: addr length is short.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-21 16:57:20 +08:00
chao an
d6b441f141 tools/ci: patch for docker gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022
Fix Wrong Newlib version strings, error when stdlib.h is included

Reference:
https://community.arm.com/support-forums/f/compilers-and-libraries-forum/53470/arm-gnu-toolchain-11-3-rel1-x86_64-arm-none-eabi-wrong-newlib-version-strings-error-when-stdlib-h-is-included
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-21 09:30:36 +02:00
nietingting
8438396f33 ci: add qemu run support
Signed-off-by: nietingting <nietingting@xiaomi.com>
2022-10-21 14:57:43 +08:00
chao an
3f14efa033 wireless/bcm43xxx: Add missing FAR qualifier to bcmf_driver
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-21 14:38:45 +08:00
chao.an
d27129bc35 wireless/bcm43xxx: discard auth event if netdev down
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-21 14:38:45 +08:00
chao an
d861c7bfd9 wireless/bcm43xxx: subscribe only to the events we need
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-21 14:38:45 +08:00
chao.an
1935783392 wireless/bcm43xxx: skip WEP privacy
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-21 14:38:45 +08:00
chao.an
38534e06dd wireless/bcm43xxx: skip bad channel bss
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-21 14:38:45 +08:00
chao an
4fe321b6fb wireless/bcm43xxx: correct auth status if PSK is invaild
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-21 14:38:45 +08:00
chao.an
41c86c526a wireless/bcm43xxx: only report PSK ssid by scan filter
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-21 14:38:45 +08:00
xiangdong6
924c3d8b5f arch/armv7-r: Fix armclang build warning: L6306W
When a function is known to preserve eight-byte alignment of the stack, armclang assigns the build
attribute Tag_ABI_align_preserved to that function. However, the armclang integrated assembler does
not automatically assign this attribute to assembly code.

Signed-off-by: xiangdong6 <xiangdong6@xiaomi.com>
2022-10-21 13:58:23 +08:00
Gustavo Henrique Nihei
ae8ea29379 xtensa: Save SCOMPARE1 on context switches
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-10-21 11:10:51 +08:00
Xiang Xiao
942513cd37 time: Typedef time_t to int64_t if CONFIG_SYSTEM_TIME64 is defined
to handle 2038 problem correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-20 22:17:52 +02:00
Xiang Xiao
1e6a8f56d3 sched/spawn: Fix the minor typo error
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-20 21:51:40 +02:00
SPRESENSE
62c98d4187 boards: cxd56xx: Remove unnecessary i2c uninitialize process
Remove unnecessary i2c uninitialize process to fix an issue that
i2c tool does not work well.
2022-10-20 21:49:07 +02:00
SPRESENSE
0d87694024 arch: cxd56xx: Fix duplicate definitions in battery_ioctl.h
Fix duplicate definitions of arch/arm/include/cxd56xx/battery_ioctl.h
with include/nuttx/power/battery_ioctl.h.
2022-10-20 21:49:07 +02:00
SPRESENSE
2060f7be60 arch: cxd56xx: hostif: Remove -Wformat-truncation warnings
Remove -Wformat-truncation warnings in cxd56_hostif.c.
2022-10-20 21:49:07 +02:00
SPRESENSE
52cbfcf3bd arch: cxd56xx: Remove -Wmissing-braces warning
Remove -Wmissing-braces warning in cxd56_cpu1signal.c.
2022-10-20 21:49:07 +02:00
SPRESENSE
d3ed469f00 arch: cxd56xx: Fix compile warning in cxd56_pwm.c 2022-10-20 21:49:07 +02:00
Javier Casas
663bf4d968 Add support for stm32h7b3xx MCU's flash 2022-10-21 01:37:23 +08:00
nietingting
81ff16c675 install qemu-system-misc in dockerw
Signed-off-by: nietingting <nietingting@xiaomi.com>
2022-10-20 17:44:22 +08:00
Alan Carvalho de Assis
11ca921b71 esp32s2-saola-1: Add SPI example using max6675 2022-10-20 10:11:26 +08:00
Alan Carvalho de Assis
0e4c2fed93 esp32s2: Add DMA support to SPI 2022-10-20 10:11:26 +08:00
Alan Carvalho de Assis
a0a7375911 Fix esp32s2_spi.h offset 2022-10-20 10:11:26 +08:00
Lucas Saavedra Vaz
b0f96fc204 esp32/i2c: Add macros to conform with other peripherals and fix typos
Fix coding style

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-19 20:31:29 -03:00
Hidenori Matsubayashi
544552c305 arch/arm64/arm64_arch_timer: delete unused includes
Delete unnecessary includes.

Signed-off-by: Hidenori Matsubayashi <hidenori.matsubayashi@gmail.com>
2022-10-19 23:15:00 +02:00
Lucas Saavedra Vaz
cc04e2137a esp32/i2s: Reduce MCLK multiple to support existing boards 2022-10-20 00:40:24 +08:00
raiden00pl
0646ae92ff nucleo-144/f722: add CAN and SocketCAN configurations 2022-10-20 00:08:36 +08:00
raiden00pl
a3db5fe24b stm32f7: add SocketCAN support 2022-10-20 00:08:36 +08:00
raiden00pl
0d8b8ce5e2 stm32f7/nucleo-144: refactor bringup logic 2022-10-20 00:08:36 +08:00
raiden00pl
0954b60df6 stm32f7/nucleo-144: add CAN1 pins selection 2022-10-20 00:08:36 +08:00
SPRESENSE
56e3053b1a mtd/smart: Fix a compile error in smart_fsck
Fix a compile error caused by below commit.
9ad75fd95d Added SMART flash filesystem to RP2040
Add some macro functions for smartfs driver.
2022-10-19 23:37:39 +08:00
SPRESENSE
10a5c660f2 tools: Fix an issue that libboard.a is not exported
If CONFIG_ARCH_BOARD_COMMON is enabled, libboard.a should be generated.
Fix an issue it is not built with make export.
2022-10-19 16:59:21 +02:00
YAMAMOTO Takashi
a31316cab5 group_kill_children_handler: use nxtask_delete as this is in-kernel 2022-10-19 21:32:30 +08:00
YAMAMOTO Takashi
8a972817e0 sched.h: Simplify HAVE_GROUP_MEMBERS logic
After the retirement of CONFIG_SCHED_EXIT_KILL_CHILDREN, [1]
the behavior is now effectively controlled by
CONFIG_SCHED_CHILD_STATUS, which is IMO confusing.
(It was even surprising me.)

This commit solves it by making HAVE_GROUP_MEMBERS
a synonym of !CONFIG_DISABLE_PTHREAD. I guess this change aligns
the intention of the CONFIG_SCHED_EXIT_KILL_CHILDREN retirement.
That is, always tries to be similar to the standard behavior.

Another option would be to revive CONFIG_SCHED_EXIT_KILL_CHILDREN
and make the HAVE_GROUP_MEMBERS logic aware of it.
It might be a good idea if we want a finer-grained control of
code to build. (One can argue his application uses pthread
but does never _exit. In that case, it might be a waste to maintain
group membership. I suspect it might not be too rare in embedded
world.)

[1] commit 6982eb35fe
2022-10-19 21:32:30 +08:00
YAMAMOTO Takashi
f100a4bb92 Implement fdopendir 2022-10-19 21:20:35 +08:00
YAMAMOTO Takashi
4eee9af668 file_vopen: Retry as a directory in case of EISDIR
This allows you to open() a directory without O_DIRECTORY.
2022-10-19 21:20:35 +08:00
YAMAMOTO Takashi
aa67e0a0f4 inode_stat: handle INODE_IS_PSEUDODIR case
If you open() a directory and fstat() it, you come here.
This commit fixes the file type in that case.
2022-10-19 21:20:35 +08:00
SPRESENSE
c48feac0e9 arch: cxd56xx: gnss: Fix compile error
Fix a compile error caused by
d1d4633 Replace nxsem API when used as a lock with nxmutex API
2022-10-19 14:10:51 +02:00
Fotis Panagiotopoulos
ec93385dfa strftime: Added support for the %w format specifier. 2022-10-19 12:43:28 +08:00
Fotis Panagiotopoulos
f9fd53cda1 gmtimer: Fixed range of tm_yday. 2022-10-19 12:39:04 +08:00
dongjiuzhu1
55106685fa libc/localtime: Update to consistent with mainline
https://github.com/eggert/tz

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-10-19 10:27:52 +08:00
dongjiuzhu1
7b2371f0ed libc/localtime: fix timegm return error when tz with isdst
testcase:
set TZ CEST
time_t t = time(NULL);
struct tm *ts = localtime(&t);
t = timegm(ts);
t will return (time_t)-1;

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-10-19 10:27:52 +08:00
Jiuzhu Dong
1b9ed5725b libc/time: Return failed when lock is already held to avoid deadlock
when enable LIBC_LOCALTIME and SYSLOG_TIMESTAMP_LOCALTIME
and zoneinfo/posixrulesi isn't exist

[ EMERG] [ap] backtrace:
[ EMERG] [ap] [20] [<0xc1cc3c4>] arm_switchcontext+0xc/0x10
[ EMERG] [ap] [20] [<0xc1ac67a>] sem_wait+0x5a/0xc0
[ EMERG] [ap] [20] [<0xc1c4588>] tzset.part.0+0x8/0x160
[ EMERG] [ap] [20] [<0xc1c58de>] localtime_r+0xc6/0x114
[ EMERG] [ap] [20] [<0xc1a910a>] clock_gettime+0x16/0xa8
[ EMERG] [ap] [20] [<0xc1b7622>] nx_vsyslog+0x9e/0xc0
[ EMERG] [ap] [20] [<0xc4ba7e0>] romfs_stat+0xa4/0xf4
[ EMERG] [ap] [20] [<0xc4b47bc>] inode_semtake+0x24/0x5c
[ EMERG] [ap] [20] [<0xc1c0102>] bsearch+0x26/0x6c
[ EMERG] [ap] [20] [<0xc1c265a>] vsyslog+0x16/0x24
[ EMERG] [ap] [20] [<0xc1c2676>] syslog+0xe/0x1c
[ EMERG] [ap] [20] [<0xc4bae12>] romfs_open+0xee/0x178  <--- err log
[ EMERG] [ap] [20] [<0xc4b68ae>] file_vopen+0x116/0x144
[ EMERG] [ap] [20] [<0xc4b6ac8>] open+0x20/0x60
[ EMERG] [ap] [20] [<0xc1c3df4>] tzload+0x84/0x810
[ EMERG] [ap] [20] [<0xc1c6ef4>] mm_zalloc+0x10/0x18
[ EMERG] [ap] [20] [<0xc4bb426>] romfs_checkmount+0x22/0x58
[ EMERG] [ap] [20] [<0xc4bad74>] romfs_open+0x50/0x178
[ EMERG] [ap] [20] [<0xc1c392c>] tzparse+0x2c/0x470
[ EMERG] [ap] [20] [<0xc1ac5da>] nxsem_wait_uninterruptible+0x8a/0xd0
[ EMERG] [ap] [20] [<0xc1ac690>] sem_wait+0x70/0xc0
[ EMERG] [ap] [20] [<0xc4b47bc>] inode_semtake+0x24/0x5c
[ EMERG] [ap] [20] [<0xc4b481c>] inode_semgive+0x28/0x58
[ EMERG] [ap] [20] [<0xc4b58b4>] file_close+0x18/0x44
[ EMERG] [ap] [20] [<0xc4b4690>] close+0x80/0xb4
[ EMERG] [ap] [20] [<0xc1c43f4>] tzload+0x684/0x810
[ EMERG] [ap] [20] [<0xc1c4616>] tzset.part.0+0x96/0x160
[ EMERG] [ap] [20] [<0xc1c58de>] localtime_r+0xc6/0x114
[ EMERG] [ap] [20] [<0xc1a910a>] clock_gettime+0x16/0xa8
[ EMERG] [ap] [20] [<0xc1ea692>] cmd_date+0x276/0x37c

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-10-19 10:27:52 +08:00