Commit Graph

76 Commits

Author SHA1 Message Date
chao.an
2992b10fbb wireless/bcm43xxx: add more ioctl command support
Support command:
  SIOCGIWFREQ
  SIOCGIWMODE
  SIOCSIWAP
  SIOCGIWAP
  SIOCGIWESSID
  SIOCGIWRATE
  SIOCGIWTXPOW
  SIOCGIWSENS
  SIOCGIWRANGE

Before:                                    After:
 cp> wapi show wlan0                          cp> wapi show wlan0
 wlan0 Configuration:                         wlan0 Configuration:
        IP: 192.168.31.202                           IP: 192.168.31.202
   NetMask: 255.255.255.0                       NetMask: 255.255.255.0
 ioctl(SIOCGIWFREQ): 88                       Frequency: 5785
 ERROR: wapi_get_freq() failed: -88                Flag: WAPI_FREQ_AUTO
 ioctl(SIOCGIWESSID): 88                        Channel: 157
 ERROR: wapi_get_essid() failed: -88          Frequency: 5785
 ioctl(SIOCGIWMODE): 88                           ESSID: archer5
 ERROR: wapi_get_mode() failed: -88                Flag: WAPI_ESSID_ON
 ioctl(SIOCGIWAP): 88                              Mode: WAPI_MODE_MANAGED
 ERROR: wapi_get_ap() failed: -88                    AP: ec:41:18:e0:76:7f
 ioctl(SIOCGIWRATE): 88                         BitRate: 58500
 ERROR: wapi_get_bitrate() failed: -88             Flag: WAPI_BITRATE_FIXED
 ioctl(SIOCGIWTXPOW): 88                        TxPower: 31
 ERROR: wapi_get_txpower() failed: -88             Flag: WAPI_TXPOWER_DBM
 ioctl(SIOCGIWSENS): 25                           Sense: -17

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-17 18:27:12 +08:00
chao.an
9c68064024 wireless/bcm43xxx: add status print on bcmf_wl_auth_event_handler()
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-17 16:17:01 +08:00
chao.an
e2c154dffe wireless/bcm43xxx: configurable buffer size of escan result
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-16 23:36:40 +08:00
chao.an
29dd12283c wireless/bcm43xxx: replace all busy delay to nxsig_usleep
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-16 23:02:09 +08:00
chao.an
b33a709213 wireless/bcm43xxx: improve throughput of net driver
1. Wake up tx if there is data alreay to sent after rx update
2. Try tx queue again after every data frame sent

iperf test:

```
TCP RX  4M->16M
⁣TCP TX  2M->14M
⁣UDP RX 18M->26M
UDP TX  2M->18M
```

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-16 21:08:28 +09:00
Xiang Xiao
f75f100954 bcm43xxx: Remove bcmf_txavail_work and resue bcmf_tx_poll_work
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-16 09:13:16 +03:00
chao.an
6d85e9b320 wireless/bcm43xx: replace sem_wait to uninterruptible version
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-16 02:44:47 +08:00
chao.an
0951d859d3 wireless/bcm43xxx: configurable schedule priority of daemon thread
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-16 01:41:50 +08:00
chao.an
4712307ecc wireless/bcm43xxx: fix typo sq_init() -> dq_init()
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-16 01:40:41 +08:00
chao.an
e75c88df5b wireless/bcm43xxx: load nvram from file system
added an option to load nvram from file system, which will help developers
easily to tuning the firmware parameters without compile firmware.

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-15 22:19:02 +08:00
chao.an
f6b8cc1407 wireless/bcm430xx: rename chip minor id to 'x'
rename 4301x chip minor id to 'x' to compatible more versions of variant of bcm430xx

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-15 02:01:37 +08:00
chao.an
4659e00fac wireless/bcm43xxx: add extended join parameters
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-15 00:56:31 +08:00
chao.an
28b46bd381 wirless/sdio: frame length should with guard bound
some SDIO device will return the larger frames out of bound

error log:
bcmf_sdpcm_readframe: Frame is too large, cancel 1544 1536
bcmf_sdpcm_readframe: Frame is too large, cancel 1544 1536
bcmf_sdpcm_readframe: Frame is too large, cancel 1544 1536

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-14 18:31:22 +03:00
chao.an
c7fd1a113f wireless/bcm43xxx: add support of bcm43013 chip
Reference:
https://www.broadcom.cn/bcm43013

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-13 21:03:05 +08:00
Xiang Xiao
f1236da21c fs: Make the binary(no process) mode as the default
POSIX require file system shouldn't enable the \r and \n conversion by default
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:22:26 +03:00
zhanghongyu
035d925864 devif: remove all devif_timer
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-06-02 20:11:50 -03:00
Xiang Xiao
816ce73ab4 Replace nxsem_timedwait with nxsem_tickwait
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 13:55:58 +03:00
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
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
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
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
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
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
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
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
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
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
Gustavo Henrique Nihei
330eff36d7 sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Alin Jerpelea
e5b6305f4a drivers: Author Gregory Nutt: update 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-03-04 18:32:27 -08:00
chao.an
84daee1f76 drivers/netdev: try tcp timer in every txavail call
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-18 14:16:11 +09:00
YAMAMOTO Takashi
e5592b615d drivers/wireless/ieee80211/bcm43xxx/bcmf_core.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
abb10784d9 drivers/wireless/ieee80211/bcm43xxx/bcmf_core.c: Appease nxstyle 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
4fea157642 drivers/wireless/ieee80211/bcm43xxx/mmc_sdio.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
5a57f10b9c drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c: Fix a syslog format 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
2874f613a6 drivers/wireless/ieee80211/bcm43xxx/bcmf_utils.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
b7358e9542 drivers/wireless/ieee80211/bcm43xxx/bcmf_bdc.c: Fix a syslog format 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
7d5259c767 drivers/wireless/ieee80211/bcm43xxx/bcmf_cdc.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
2d892343d9 drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c: Fix syslog formats
The following nxstyle errors are not trivial to fix because
they are parts of the ioctl api.

drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c:1083:34: error: Mixed case identifier found
drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c:1445:7: error: Mixed case identifier found
2020-12-05 08:13:32 -06:00
Xiang Xiao
acca9fcc3b sched/wdog: Remove MAX_WDOGPARMS and related stuff
since the variable arguments are error prone and seldom used.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-14 08:19:50 -06:00