diff --git a/arch/arm/src/cxd56xx/cxd56_dmac.c b/arch/arm/src/cxd56xx/cxd56_dmac.c index 851065822d..5f1126a7fe 100644 --- a/arch/arm/src/cxd56xx/cxd56_dmac.c +++ b/arch/arm/src/cxd56xx/cxd56_dmac.c @@ -664,7 +664,7 @@ static int dma_stop(int ch) * ****************************************************************************/ -void weak_function up_dmainitialize(void) +void weak_function up_dma_initialize(void) { int i; diff --git a/configs/spresense/wifi/defconfig b/configs/spresense/wifi/defconfig index dfefc6ab1f..7b9d8a5e78 100644 --- a/configs/spresense/wifi/defconfig +++ b/configs/spresense/wifi/defconfig @@ -20,6 +20,8 @@ CONFIG_BOOT_RUNFROMISRAM=y CONFIG_BUILTIN=y CONFIG_CLOCK_MONOTONIC=y CONFIG_CODECS_HASH_MD5=y +CONFIG_CXD56_DMAC_SPI5_RX=y +CONFIG_CXD56_DMAC_SPI5_TX=y CONFIG_CXD56_SDIO=y CONFIG_CXD56_SPI5=y CONFIG_CXD56_SPI=y @@ -38,15 +40,18 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_I2C=y +CONFIG_LIB_SENDFILE_BUFSIZE=1024 CONFIG_MAX_WDOGPARMS=2 CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y +CONFIG_NAME_MAX=256 CONFIG_NET=y CONFIG_NETDB_DNSCLIENT=y CONFIG_NETDEVICES=y CONFIG_NETINIT_NETLOCAL=y CONFIG_NETUTILS_CODECS=y CONFIG_NETUTILS_FTPC=y +CONFIG_NETUTILS_HTTPD_SENDFILE=y CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NETUTILS_WEBSERVER=y @@ -93,3 +98,4 @@ CONFIG_USBMSC_REMOVABLE=y CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_WIRELESS_GS2200M=y CONFIG_WL_GS2200M=y +CONFIG_WL_GS2200M_SPI_FREQUENCY=10000000 diff --git a/drivers/wireless/Kconfig b/drivers/wireless/Kconfig index 0662abcffc..c49988e9c4 100644 --- a/drivers/wireless/Kconfig +++ b/drivers/wireless/Kconfig @@ -29,6 +29,15 @@ config WL_GS2200M select SPI select LIBC_SCANSET +if WL_GS2200M + +config WL_GS2200M_SPI_FREQUENCY + int "SPI frequencey for GS2200M" + default 4000000 + range 4000000 10000000 + +endif + source drivers/wireless/spirit/Kconfig menuconfig DRIVERS_IEEE802154 diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c index 57cc38d9ce..542371623a 100644 --- a/drivers/wireless/gs2200m.c +++ b/drivers/wireless/gs2200m.c @@ -72,7 +72,7 @@ #define GS2200MWORK LPWORK -#define SPI_MAXFREQ (4000000) /* 4MHz. */ +#define SPI_MAXFREQ CONFIG_WL_GS2200M_SPI_FREQUENCY #define NRESPMSG 8 #define MAX_PKT_LEN 1500 @@ -861,7 +861,7 @@ retry: * workaround to avoid realy receiving an invalid frame response */ - usleep(100); + up_udelay(100); /* Read frame response */ @@ -1408,7 +1408,7 @@ static enum pkt_type_e gs2200m_get_mac(FAR struct gs2200m_dev_s *dev) dev->net_dev.d_mac.ether.ether_addr_octet[n] = (uint8_t)mac[n]; } - errout: +errout: _release_pkt_dat(&pkt_dat); return r; } @@ -1868,6 +1868,13 @@ static int gs2200m_ioctl_connect(FAR struct gs2200m_dev_s *dev, break; default: + /* REVISIT: + * TYPE_BULK for other sockets might be received here, + * if the sockets have heavy bulk traffic. + * In this case, the packet should be queued and + * wait for a response to the NCTCP command. + */ + wlerr("+++ error: type=%d \n", type); ASSERT(false); ret = -EINVAL;