Commit Graph

291 Commits

Author SHA1 Message Date
zhangyuan21
4454c8d02f apps: remove unnecessary sem_setprotocol code
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-03-17 11:58:03 -03:00
raiden00pl
832b160cb1 bluetooth/nimble: update to bc7828341226d860429c63994065f8f1b8b8d7b0
which fix https://github.com/apache/mynewt-nimble/pull/1472
2023-03-02 22:21:37 +08:00
chao.an
ba030e5843 wireless/wapi: correct check of return value
VELAPLATFO-2999

----------------------
 * Name: ioctl
...
 * Returned Value:
 *   >=0 on success (positive non-zero values are cmd-specific)
 *   -1 on failure with errno set properly:

Signed-off-by: chao.an <anchao@xiaomi.com>
2023-02-23 12:56:11 -03:00
lilei19
41f60bd669 change strcpy to strlcpy
Change-Id: I8b9429a3c225a82842fce136bdb14b8b135066d3
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-22 23:09:55 +08:00
Xiang Xiao
6a686ba93d bluetooth/nimble: Update to 17a8e61fdec48d579df3bc5af59a9cff5edee674
which contain the fix:
https://github.com/apache/mynewt-nimble/pull/1462
https://github.com/apache/mynewt-nimble/pull/1459
https://github.com/apache/mynewt-nimble/pull/1457
https://github.com/apache/mynewt-nimble/pull/1161

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-21 23:39:51 +02:00
Nathan Hartman
8e77b79f78 Kconfig: Make indent consistent with TABS 2023-02-10 14:11:48 +08:00
chao an
8ad4ae5508 net: fix compiler warning
sixlowpan_assocresp.c: In function ‘sixlowpan_assoc_resp’:
sixlowpan_assocresp.c:48:3: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
   48 |   strncpy(arg.ifr_name, ifname, IFNAMSIZ);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-08 00:35:39 +08:00
Xiang Xiao
a29d9ea9da fsutils/examples: Include unistd.h explicitly
to get the prototypes or macros are defined in it

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-05 08:46:59 +02:00
Gustavo Henrique Nihei
b0da60e498 apps: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-02 00:35:14 +02:00
田昕
b1e6583246 wireless/wapi:rework wapi error print in util.h
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2023-01-14 14:01:28 +08:00
Xiang Xiao
cfc005a460 arp: Remove the unnecessary inclusion of nuttx/net/arp
and change the remain inclusion to netinet/arp.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-16 22:11:10 +02:00
zhanghongyu
dc90c52413 wapi: fix passphrase can not update if prefix is same
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-11-20 07:45:15 +01:00
Xiang Xiao
bf03439d1b Fix Error: src/wapi.c:1050:14: error: implicit conversion from enumeration type 'enum wapi_mode_e' to different enumeration type 'enum wapi_pta_prio_e' [-Werror,-Wenum-conversion]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-13 14:55:30 +01:00
yinshengkai
ee4d8b738f Makefile: replace INCDIR to INCDIR_PREFIX
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-10 02:38:58 +08:00
SPRESENSE
2717ba4f88 wireless: gs2200m: Change usrsock xid from uint64_t to uint32_t
Fix the type to match usrsock.h has been changed.
2022-10-24 09:04:31 +02:00
zhanghongyu
31ad585611 gs2200m: fix usrsock_bind error in gs2200m module
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-21 08:33:50 +09:00
Xiang Xiao
b659f0fbdf Remove the unnecessary cast for main_t, NULL and argv
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 18:40:23 +02:00
Xiang Xiao
893387b2c5 Fix the minor style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 19:07:16 +02:00
Xiang Xiao
4941182cc6 Make.defs: Change "ifeq ($(XXX),y)" to "ifneq ($(XXX),)
to support the tristate option correctly and unify the usage

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 14:59:08 +02:00
Alan Carvalho de Assis
abbe022894 wapi: Verify if password size if valid 2022-10-11 14:35:43 +08:00
Xiang Xiao
9291d07a87 Fix the coding style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-06 12:20:32 +02:00
Xiang Xiao
0dc5e9f469 Replace #include <queue.h> with #include <nuttx/queue.h>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-26 08:04:51 +02:00
Masayuki Ishikawa
3837091582 wireless: gs2200m: Add SIOCGIFFLAGS support to gs2200m_main.c
Summary:
- I noticed that the latest ifconfig command shows nothing
- Finally, I found that gs2200m_main.c needs to handle SIOCGIFFLAGS
- This commit fixes this issue

Impact:
- gs2200m only

Testing:
- Tested with spresense:wifi
- NOTE: gs2200m driver needs to be updated as well

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-09-07 11:21:29 +08:00
Xiang Xiao
0d85084741 wireless/gs2200m: Rename usrsock_request to usrsock_handle_request
fix the conflict after usrsock reconstruct:
https://github.com/apache/incubator-nuttx/pull/6949

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-29 22:17:29 +09:00
Huang Qi
2e2630e838 Don't download tarballs if a local git repo found
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-08-28 17:20:47 +08:00
zhanghongyu
8fe295de32 wireless: Add ioctl cmd to setting PTA prio
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-08-18 11:48:23 +08:00
zhanghongyu
a25f640e54 wapi: Make the initial scan buffer configurable through Kconfig
The default value is 4KB which is same as IW_SCAN_MAX_DATA

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-08-15 22:27:59 +08:00
zhanghongyu
a755cb72da wapi: correct scan return value
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-08-15 22:27:59 +08:00
zhanghongyu
8c8ebf4503 wapi: fix coverity warning
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-08-15 22:27:59 +08:00
chao.an
451f528bbb wireless/wapi: correct check of return value
1. correct check of return value
----------------------
 * Name: ioctl
...
 * Returned Value:
 *   >=0 on success (positive non-zero values are cmd-specific)
 *   -1 on failure with errno set properly:

2. country code length should contain LF

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-08-15 10:51:55 +03:00
Peter van der Perk
dcd60a2abe Use thread-safe ntoa functions
NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

API fixes and NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Use thread-safe ntoa functions

NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

API fixes and NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-08-04 23:18:06 +08:00
Takayoshi Koizumi
cfa5af51cd wireless/gs2200m: Release all blocking socket
When dis-associtaion happens, the socket is destroyed. And all blocking
sockets are released for that error handling can be performed.
2022-08-02 16:54:35 +09:00
chao.an
61250d5516 wireless/wapi: add get country code support
Country command with no args to get the ccode:

Get country code:
cp> wapi country wlan0
CN

Set country code:
cp> wapi country wlan0 JP

Get country code:
cp> wapi country wlan0
JP

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-23 23:40:20 +08:00
chao.an
92c001bbc0 wapi/utils: add SIOCGIWSENS into string name list
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-17 16:44:01 +08:00
chao.an
be516e4c5e wireless/wapi: authentication parameters should update before key set
set authentication parameters before key set on command mode

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-17 08:34:51 +03:00
Masayuki Ishikawa
7663f993f7 wireless: gs2200m: Fix recvfrom_request() in gs2200m_main.c
Summary:
- I noticed that wget causes ASSERT in gs2200m_main.c recently.
- Finally, I found that it sends a wrong ack message in
  recvfrom_request() when the socket is closed passively
- This commit fixes this issue.

Impact:
- gs2200m only

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-04-15 10:36:52 +03:00
zhanghongyu
16c1fec99d usrsock: Move event field to usrsock_message_common_s
Zero the events field for all response message

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-04-03 11:39:19 +09:00
Xiang Xiao
2fc7c67031 wireless/wapi: Fix warning: 'strncpy' specified bound 16 equals destination size
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-22 08:35:58 +02:00
Petro Karashchenko
566be8c7b1 definitions: unify MAX and MIN macro definitions
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-16 23:20:17 +08:00
zhanghongyu
e0e41c5d7f feature: wapi add encode parse when scan
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-03-15 18:01:04 +08:00
Petro Karashchenko
f9baa422c1 style: unify path to files in comment section
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-09 10:37:33 +08:00
Alin Jerpelea
73258b3b39 apps: wireless: ieee802154: nxstyle fixes
fix for errors reported by the nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 01:44:49 +08:00
Alin Jerpelea
c7c556ebae apps: wireless: ieee802154: update licenses to Apache
Gregory Nutt has submitted the SGA
Verge Inc 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>
2022-03-08 01:44:49 +08:00
Xiang Xiao
c7e96dbe32 Fix the nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-17 07:57:22 +01:00
Petro Karashchenko
9480c0ec12 include: fix double include pre-processor guards
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-16 17:36:21 +08:00
chao.an
a1857b9258 wireless/gs2200m: replace the preamble scratch to union
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-05 19:08:43 +09:00
chao.an
df53de1d68 net/usrsock: replace usrsock xid type to uint64_t
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-05 13:25:21 +08:00
Petro Karashchenko
5ac15130db apps: remove space befone newline in logs
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-27 20:52:08 -06:00
Xiang Xiao
66dbaa4539 Replace self defined macros with NET_SOCK_[FAMILY|TYPE|PROTOCOL]
NET_SOCK_* is defined by nuttx/net/netconfig.h and then can be shared

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-20 16:04:29 -03:00
raiden00pl
2db90a8be5 wireless/bluetooth/nimble: make stacksize configurable 2021-12-18 20:24:02 -06:00