Commit Graph

723 Commits

Author SHA1 Message Date
Xiang Xiao
6f6fce95a2 Replace all sprintf with snprintf
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00
Masayuki Ishikawa
8355ab9070 drivers: wireless: Fix mtu info for gs2200m
Summary:
- I noticed that mtu info with ifconfig shows incorrect size.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-04-28 18:25:37 +08:00
Xiang Xiao
51dc67ad5f fs: Add g_ prefix for all global file_operations instances
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-24 16:13:29 +02:00
raiden00pl
b737d410b9 bt_rpmsghci: fix warnings 2023-04-22 01:37:24 +08:00
Fotis Panagiotopoulos
ab1b3c0337 Added missing checks in strdup'ed strings. 2023-04-19 02:49:31 +08:00
chao an
cdcdce16f7 wireless/bcm43xxx: enter power saving only if IEEE80211_BROADCOM_LOWPOWER enabled
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-22 17:26:52 -03:00
chao an
266774939f wireless/bcm43xxx: downgrade log level of allocate frame fail
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-22 17:26:52 -03:00
raiden00pl
a6c1ef3c52 wireless/bluetooth: add RPMSG HCI controller support 2023-03-14 09:51:13 +08:00
chao an
1779433c35 wireless/bcm43xxx/qspi: try tx after rx fails
1. Try tx after rx fails to avoid gspi_thread busy to try rx
2. Add some delay if alloc frame buffer failed

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-07 04:40:38 +08:00
chao an
d5ac2be84f bcm43xxx/bcmf_ioctl.h: pack wl_* structure to avoid unaligned access
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-07 04:40:38 +08:00
chao an
7625126c91 Remove the remain MIN/MAX like macro
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-03 23:22:41 +08:00
chao an
4c8d244fae sched/getpid: replace syscall getpid/tid/ppid() to kernel version
NuttX kernel should not use the syscall functions, especially after
enabling CONFIG_SCHED_INSTRUMENTATION_SYSCALL, all system functions
will be traced to backend, which will impact system performance.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-02 10:33:01 +08:00
Gustavo Henrique Nihei
e6b204f438 nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-01 23:47:44 +08:00
chao an
94db8a9414 wireless/ieee80211: update ieee80211 header
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-29 00:34:26 +08:00
Xiang Xiao
c137abf4b0 drivers/wireless: Remove the duplicated bc_bifup check from bcmf_wl_auth_event_handler
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-28 11:31:28 -03:00
Petro Karashchenko
f952b8456c assert: switch from ASSERT(0/false) to PANIC
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-26 10:15:34 +08:00
chengkai
f864e5f657 wireless/bluetooth: add interrupt_context hander for netsnoop
Signed-off-by: chengkai <chengkai@xiaomi.com>
2023-01-10 18:08:22 +08:00
Xiang Xiao
b0a0ba3ad7 fs: Move mmap callback before truncate in [file|mountpt]_operations
since mmap may exist in block_operations, but truncate may not,
moving mmap beforee truncate could make three struct more compatible

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 17:43:59 +02:00
Xiang Xiao
779a610ca3 Remove the unnecessary NULL fields in global instance definition of file_operations
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 00:32:13 +02:00
Jukka Laitinen
f33dc4df3f Change FIOC_MMAP into file operation call
- Add mmap into file_operations and remove it from ioctl definitions.
- Add mm_map structure definitions to support future unmapping
- Modify all drivers to initialize the operations struct accordingly

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Jukka Laitinen
41e9df2f3e Add ftruncate into file operation calls
- Add truncate into file_operations
- Move truncate to be common for mountpt_operations and file_operations
- Modify all drivers to initialize the operations struct accordingly

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Xiang Xiao
d5689e070b net/arp: Remove nuttx/net/arp.h
1.move ARPHRD_ETHER to netinet/arp.h
1.move arp_entry_s to net/arp/arp.h
2.move arp_input to nuttx/net/netdev.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-16 22:10:59 +02:00
chao an
01eb4d586b mm/iob: iob members are initialized after allocate
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-16 09:51:53 +08:00
Xiang Xiao
c6e9edcbb6 net: Rename arp_arpin to arp_input
align with other similar function(e.g. ipv4_input and ipv6_input)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-04 20:39:21 +08:00
Xiang Xiao
6d30726a1b Remove the unnecessary "return;" at the end of function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 22:23:50 +01:00
chao an
6fa60627eb net/devif/ip: build l2 header on the IP layer
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:13:45 +08:00
chao an
8850dee746 net/devif: move preprocess of txpoll into common code
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:11:12 +08:00
Xiang Xiao
416d7301c4 Fix wireless/ieee80211/bcm43xxx/bcmf_gspi.c:151:20: error: unused function 'bcmf_gspi_write_reg_32'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
b44e743483 Fix Error: wireless/ieee802154/mrf24j40/mrf24j40_radif.c:138:45: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-13 22:35:19 +08:00
chao an
4b5e3ddf51 lpwan/sx127x: correct device unlock interface to nxmutex_unlock()
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-07 18:12:25 +08:00
chao an
ad978e7702 wireless/xbee_mac: transmit lock should in pairs
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-03 14:43:12 +01:00
yinshengkai
85f727f232 tools: replace INCDIR to Makefile variable
In the past, header file paths were generated by the incdir command
Now they are generated by concatenating environment variables

In this way, when executing makefile, no shell command will be executed,
it will improve the speed of executing makfile
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-03 19:59:55 +08:00
anjiahao
d7b4e91dda Call nxsem_destroy or nxmutex_destry in the error path
1.Don't check the return value of nxsem_init or nxmutex_init
2.Fix some style issue

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-30 13:56:52 +01:00
Xiang Xiao
85deafd7bf Fix bcmf_netdev.c:705:7: error: 'strnlen' specified bound 2 exceeds source size 1 [-Werror=stringop-overread]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-22 20:14:38 +02:00
anjiahao
5724c6b2e4 sem:remove sem default protocl
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-10-22 14:50:48 +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
Xiang Xiao
dca5a3483f drivers: Destroy mutex and sem in the error path
also correct the order to ensure the memory free is last step

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:59:46 +09:00
anjiahao
d1d46335df Replace nxsem API when used as a lock with nxmutex API
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:59:46 +09:00
Xiang Xiao
34b05804b0 bluetooth: Remove hcicollecttask from btuart shim driver
monitor POLLIN event through callback mechanism instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-02 18:14:00 -03:00
Xiang Xiao
fe38cb1bad bluetooth: Implement hciuart_ioctl for btuart lowerhalf shim driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-02 18:14:00 -03:00
Xiang Xiao
6ec74d8d36 bluetooth: Forward ioctl to btuart lowerhalf driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-02 18:14:00 -03:00
Xiang Xiao
fab8b081c0 bluetooth: Implement btuart_close for btuart upperhalf driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-02 18:14:00 -03:00
Xiang Xiao
11d083b358 bluetooth: Remove the unnecessary cast in btuart driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-02 18:14:00 -03:00
Xiang Xiao
bdeaea3742 Remove the unnessary empty line after label
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 17:54:56 +02:00