Commit Graph

270 Commits

Author SHA1 Message Date
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
Alan C. Assis
1028d5abbe apps/btask: Fix line feed when there is not advertised data
Note the item "4." doesn't appear at right place:

nsh> bt bnep0 scan start
nsh> bt bnep0 scan stop
nsh> bt bnep0 scan get
Scan result:
 1.     addr:           5a:ae:bd:0b:88:b9 type: 1
        rssi:            -96
        response type:   3
        advertiser data: 1e ff 06 00 01 09 20 02 72 36 18 d5 2c 3f 38 e5
                         fd a5 49 f8 3c e8 a9 f8 15 a8 0e 20 ea 51 02
 2.     addr:           f3:d5:9a:7f:79:54 type: 1
        rssi:            -61
        response type:   0
        advertiser data: 02 01 06 05 03 0a 18 e7 fe 0b ff 34 12 fe e7 f3
                         d5 9a 7f 79 54 05 09 44 4b 30 38
 3.     addr:           f3:d5:9a:7f:79:54 type: 1
        rssi:            -61
        response type:   4
        advertiser data: 4.     addr:           e8:b4:9f:83:66:fd type: 1
        rssi:            -96
        response type:   0
        advertiser data: 02 01 1e 0a ff 75 00 01 00 02 00 01 03 02 03 19
                         c0 00
 5.     addr:           38:6d:34:58:86:6d type: 1
        rssi:            -92
        response type:   3
        advertiser data: 1e ff 06 00 01 09 20 02 e7 45 ff 96 96 eb 1a e8
                         aa 18 cf 37 04 d3 f9 00 28 98 67 97 8a ce 84
nsh>
2021-10-21 23:31:41 -05:00
liuyang34
ab3cca4ae1 wapi: add 5g channel map in wapi
Signed-off-by: liuyang34 <liuyang34@xiaomi.com>
2021-09-24 13:48:47 +08:00
Masayuki Ishikawa
21f48846dd wireless: gs2200m: Fix error handling in sendto_request()
Summary:
- This commit returns -errno to the caller

Impact:
- gs2200m only

Testing:
- Tested with spresense:wifi_smp
- NOTE: need to update the gs2200m driver in NuttX

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-28 21:49:21 -05:00
Alin Jerpelea
340c932e94 wireless: fix relative path CI error
error: Path relative to repository other than nuttx must begin with the root directory
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
zhanghu
4808fb4d0d apps warning: add ether_h because Wimplicit-function-declaration
Change-Id: Ic3b86ef2d8f83a80e0cc7badba22006a8fd8b2ee
2021-06-14 14:31:40 -03:00
Alin Jerpelea
087b4da88f wireless: ieee802154: libmac: nxstyle fixes
Fixes for nxstyle errors reported by the tool.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 02:04:01 -05:00
Alin Jerpelea
3e46b14650 wireless: ieee802154: libmac: update licenses to Apache
Gregory Nutt is has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 02:04:01 -05:00
Alin Jerpelea
c726646010 wireless: nxstyle fixes
fixes for the style errors reported by nxstyle

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-09 22:08:10 -05:00
Alin Jerpelea
4cf4aa0bc8 apps: wireless: ieee802154: libutils: update licenses to Apache
Gregory Nutt is 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-06-09 22:08:10 -05:00
Alin Jerpelea
ab60df94a2 wireless: bluetooth: btsak: update licenses to Apache
Gregory Nutt is 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-06-09 22:08:10 -05:00
Alin Jerpelea
59c607c8dc Makefile: Sebastien Lorquet: update licenses to Apache
Gregory Nutt is 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-06-07 21:35:33 -05:00
Alin Jerpelea
6d996882fe Makefile: Anthony Merlino: update licenses to Apache
Gregory Nutt is has submitted the SGA

Anthony Merlino has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05:00
Alin Jerpelea
ec339bc49a Makefiles: Gregory Nutt: 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-06-07 21:35:33 -05:00
Xiang Xiao
1140bebfc0 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 13:56:27 +09:00
Xiang Xiao
602ff0cd76 Include assert.h in necessary place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 13:56:27 +09:00
Xiang Xiao
e9104dbbef Include assert.h in necessary place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 06:36:44 +09:00
Xiang Xiao
34a042aa49 nimble: Update version to cd8ab38c3da91b71dd428979153a408f38d3b02e
which contain the following fix:
commit cd8ab38c3da91b71dd428979153a408f38d3b02e
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Thu May 20 15:43:50 2021 +0800

nuttx: fix error: use of undeclared identifier 'ENOMEM'

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idd832450d98306750ece8307ec7eef5c0c367a48
2021-05-22 12:02:58 -03:00
Nathan Hartman
6d3782c961 Licensing: Move wireless/wapi/LICENSE into top-level LICENSE 2021-05-06 19:14:13 -07:00
Abdelatif Guettouche
fbf5290401 wireless/wapi/src/wapi.c: When executing a command return it's error code on failure.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-04-12 22:29:01 -05:00
chenwen
39c5fa812d wireless/wapi: Fix issue of getting the operating frequency 2021-04-12 03:56:11 -05:00
Anthony Merlino
98c1223746 i8sak: Fixes bug where daemon was being requested again when operation is finished, instead of being released. 2021-04-10 13:08:37 -05:00