Commit Graph

6034 Commits

Author SHA1 Message Date
Zhe Weng
acbddd11d5 net/netdev: Add periodic log for netdev statistics
Work for every network device using `CONFIG_NETDEV_STATISTICS`.

Log style:
<interface>:T{done}/{total},R({v4}+{v6})/{total} {Protocol}:T{tx},R{rx},D{drop}
Example:
wlan0:T10/10,R(10+20)/31 TCP:T0,R0,D0 UDP:T0,R10,D0 ICMP:T0,R0,D0 ICMP6:T0,R0,D0

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-08-22 16:17:56 +08:00
jianglianfang
4d42fdf195 video/fb: changed circbuf_write assert to warning
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-22 15:33:56 +08:00
zhanghongyu
3a25286862 usbdev/cdcncm: fix notify overwrite issue
we need to wait until the previous notify message is done to
send a new notify message

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-22 01:56:26 +08:00
zhanghongyu
9f9075c48c usbdev/cdcncm: fix ndpsign mismatch after NCM_SET_NTB_FORMAT
Otherwise, the NCM_SET_NTB_FORMAT message from the host may cause
subsequent parsing exceptions.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-22 01:56:26 +08:00
zhanghongyu
418b692e21 usbdev/cdcmbim: add response notify
when the host is needed to read the data, RESPONSE_AVAILABLE must first
be sent.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-22 01:56:26 +08:00
zhanghongyu
5b24917bb9 usb_cdcmbim: add mbim device driver
./build.sh sim:usbdev -j12
sudo gdb nuttx/nuttx -ex "source nuttx/tools/gdb/__init__.py"

below command to create mbim NIC on host
nsh> conn 3

NuttX's MBIM device implementation adds an additional MBIM network
card to the NuttX system, which can debug the data communication with
the host, but this network card is unnecessary and needs to be removed
when the business actually uses this driver, And the cdcncm_receive
method needs to be re-implemented.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-22 01:56:26 +08:00
chenrun1
cfcf347515 nuttx/atomic.h:replace ALL stdatomic.h with nuttx/stdatomic.h in nuttx/
Summary:
 1. use nuttx/atomic.h instead of stdatomic
 2. remove CONFIG_HAVE_ATOMIC,because we now support atomic on all platforms

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-22 01:44:29 +08:00
chenrun1
667e92390b nuttx/atomic.h:replace ALL stdatomic.h with nuttx/stdatomic.h in nuttx/
Summary:
  1. Add nuttx/atomic.h in include
  2. Use nuttx/atomic.h instead of stdatomic.h in the nuttx directory

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-22 01:44:29 +08:00
liqinhui
4fa5451595 simwifi: Fix the error of the return value in wifidriver_set_txpower.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 23:36:26 +08:00
liqinhui
d99717765e bcm43xxx: Fix the warnings.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 23:30:49 +08:00
shizhenghui
04dfae545c video/v4l2_cap: fix sign extension
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-08-21 23:29:47 +08:00
buxiasen
ed572174e1 pm_runtime: fix header missing, up_interrupt_context may undeclared
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-21 13:38:50 +08:00
buxiasen
eae0dfd641 pm_runtime: fix missing header
if the sched.h not included by header already inside .c will cause
sched_idletask not defined

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-21 13:38:50 +08:00
liqinhui
ae2ebce42b qemuwifi: Support the ioctl SIOCGIWENCODEEXT.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
liqinhui
e04aa9ac51 wifisim: Support the setting of the number of simulated WiFi interfaces.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
liqinhui
f1a566f7f6 wifisim: Fix the problem of scan crash.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
liqinhui
10eaf1eafe wifisim:Modify the problem of password verification.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
liqinhui
2e9f00d0db wifisim:Fix an assignment error.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
liqinhui
f53f4fb32f wifisim: set carrier on only when wifidriver_start_connect returns OK.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
liqinhui
e9ba55818f wifisim:Modify the down operation logic of the wlan interface.
Align with the linux ifconfig down behavior.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
liqinhui
c3df7c5b00 wifisim: Modify the connection logic based on BSSID.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
liqinhui
06c1db81ff wifisim: Open the bss file with O_RDONLY.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 13:25:53 +08:00
buxiasen
47b2e00d51 pm: irq should disable before sched locked
If sched lock before irq save, and irq handler do post, scheduler will
be delayed after WFI until next sched unlock. which is not acceptable.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-21 10:53:33 +08:00
buxiasen
317afc5ab7 pm: add pm_idle, up_idle only handle pm state execution
pm process should be done by chip specific, but we can provide a standard
flow, then vendor & chip can only focus on handle different state change.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-21 10:53:33 +08:00
buxiasen
a18e4e85e9 pm_activity: fix deadlock with spinlock and critcal_section
critical_section is not compatible with irq disabled, have to delay the
wd_start after spin_unlock_irqrestore.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-20 17:01:48 -03:00
jianglianfang
1e29b8de1d driver/fb:remove overlay from fb_notify_vsync
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-21 02:57:08 +08:00
jianglianfang
468617096e goldfish_fb: add notify vsync
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-21 02:57:08 +08:00
jianglianfang
8122cbd5d2 drivers/video: add fb_vsync_pollnotify
when the vsync comes, fb drivers should call fb_vsync_pollnotify to notify POLLPRI, so that users can catch the synchronization time of vsync and do something.

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-21 02:57:08 +08:00
wanggang26
a2662bd369 mmcsd: add support of getting ext_csd reg data
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-08-21 02:53:54 +08:00
zhanghongyu
ccf60a7bab netdev_upperhalf: add polling mode support for tx/rx
support more work modes to support more scenarios

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 02:31:53 +08:00
SPRESENSE
eea5f98bca drivers/modem/alt1250: Disable the PIN feature in ALT1250
Disable the PIN feature in ALT1250 because the SIM may
accidentally become unusable.
2024-08-21 02:11:02 +08:00
zhanghongyu
640b766d2b usbdev/cdcncm: fix some issues
1. increase CDCECM_MXDESCLEN to avoid memory overrun when sending
configuration description(mkcfmdesc) information

2. correct the request structure used in the notify phase

3. disable unused configuration options

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 02:01:01 +08:00
zhanghongyu
7aa3e2ebd6 cdcncm: switch net driver to netdev_lowerhalf
optimize the interaction flow associated with network drivers to reduce
the amount of code and improve compatibility

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 02:01:01 +08:00
zhanghongyu
4e79741e7d usbdev: add ncm driver
The compilation and verification commands are shown below:
./tools/configure.sh sim:usbdev
make -j
sudo ./nuttx
nsh> conn 2
nsh> dhcpd_start eth1

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 02:01:01 +08:00
Zhe Weng
648c52fc4b drivers/virtio-net: Use reclaim in ops to finish TODO
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-08-21 01:39:34 +08:00
zhanghongyu
d740a8e73c netdev_lowerhalf: add reclaim callback in netdev_ops_s
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 01:39:34 +08:00
wangchen
a18aebc2c6 wifi_sim.c:fix compile warning
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-08-20 14:46:15 +08:00
Zhe Weng
4b5585a316 netdev/upper: Delay replied packets to prevent TX quota become negated
When our netstack is replying packets when processing RX, the replied
packets will be sent without considering of TX quota because we don't
want to drop them. Now we may delay them by pushing them to a queue and
send them later, which can always keep quota working.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-08-20 06:37:46 +08:00
liuhongchao
fb37391ea6 drivers/input: enable touch/kbd/mouse for virtio input
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-19 20:08:50 +08:00
meijian
580f7387a1 [driver][bcm43xxx] reset tx_seq of sido-bus when ifdown wlan-if
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-19 19:56:40 +08:00
Windrow14
5c8adefc67 drivers/mmcsd/Kconfig|mmcsd_sdio.c: check ready without sleep
If per tick is set to 10ms, it will cause nxsig_usleep(1000) in the
sdio driver to sleep for 19ms, which is much longer than the
expected 1ms, resulting in very low write performance. Add option to
reduce CPU hogging by using sched_yield(), though it may also affect
write performance when the CPU is busy.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14
c96a33a12f drivers/mmcsd/mmcsd_sdio.c: enable clock before issue CMD0
In mmcsd_cardidentify(), the clock is not enabled before issuing
CMD0, and the clock has been disabled in mmcsd_removed(). It makes
no sense to enable the clock after issuing CMD0, because when CMD0
is issued, it will exit with error due to the clock is not enabled.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14
d07e73e684 drivers/mmcsd/mmcsd_sdio.c: show eMMC information after initialization is completed
Prompts for capacity, speed mode and bus width after eMMC
initialization is completed.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14
49cbcfb5e6 drivers/mmcsd/mmcsd.h|mmcsd_sdio.c|mmcsd_sdio.h: support MMC high speed SDR mode
According to the eMMC specification, in Backwards Compatibility
with legacy MMC card mode, the frequency of the SD clock must be
0-26 MHZ; in high speed SDR mode, it must be 0-52MHZ. So we should
switch to high speed SDR mode if the clock frequency is higher than
26MHZ.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14
08ce36d292 drivers/mmcsd/mmcsd_sdio.c|h: optimize macros for setting EXT_CSD
CMD6 can use these macros to set any writable EXT_CSD field, not
just the bus width, so optimize these macro definitions to make
them general.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14
4f7f751d2a drivers/mmcsd/mmcsd_sdio.c: fix unable to switch eMMC device to 4-bit bus width mode
All eMMC devices support 4-bit bus width, so we should mark the
device as supporting 4-bit bus width after detecting that the
device type is eMMC.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
cuiziwei
6071102c90 nuttx/note:fix missing the last character when printing custom labels.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-08-19 14:04:50 +08:00
jianglianfang
db78cc9c0f input: fix goldfish input and lvgl input device name mismatch problem
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-19 14:03:32 +08:00
rongyichang
1676206651 drivers/input: enable touch/kbd/mouse for goldfish event
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2024-08-18 10:54:22 -03:00
liuhongchao
0b541be56a drivers/input: Fix build goldfish events warning
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-18 10:54:22 -03:00