Commit Graph

523 Commits (a1104ca1aaaf3d26e34779be90eb890cb7c0f360)

Author SHA1 Message Date
Arun S 9b87551d40 Remove ethernet interface logic for SoftAP and STA
Issue: The problem is that there is a race condition introduced in that the LWIP thread is relying on the
interface as it is taken down by a application thread while calling disconnect.
In disconnect api called from application context, whd_emac_wifi_link_state_changed() will refer to netif interface
structure in its callback api netif_link_irq(netif). This netif will be cleared by remove_etherent_interface().
whd_emac_wifi_link_state_changed will post message to tcpip_thread. tcpip_thread will process the message and
call the callback api netif_link_irq(netif)
Calling sequence is whd_emac_wifi_link_state_changed -> remove_etherent_interface(). Hence there is a timing issue
that netif might be cleared first before tcpip thread process the message netif_link_irq(netif)

Fix: remove_etherent_interface() will post message to tcpip thread and tcpip:
thread process the message delete_interface()
which will actually remove the inferface from the netif_list.
Calling sequence is whd_emac_wifi_link_state_changed() message post -> remove_etherent_interface() message post.
message processing order netif_link_irq(netif) -> delete_interface().
Since both the processing is handled in single thread, processing of message is handled sequentially.
2020-04-21 22:15:25 +05:30
Kyle Kearney 6554e3951e Revert "Backport #12603: Add CYSBSYSKIT_01"
This reverts commit 4e6692b529.
There are issues with wifi connectivity on this target that mean
it is not ready to ship with 5.15.2.
2020-04-08 14:14:11 -07:00
Martin Kojtal 757f14b807
Merge pull request #12776 from JarkkoPaso/update_stm32_emac_ethernet_driver
Update stm32 emac ethernet driver
2020-04-08 18:35:32 +02:00
Martin Kojtal 3db7cd42da
Merge pull request #12771 from kyle-cypress/pr/cypress-backport-whd-assert
Cypress: Partial backport of #12769
2020-04-08 15:18:31 +02:00
Arto Kinnunen 38f9a09f12 Update STM32 EMAC driver based on review
-Fix len type
-Use ETH_RX_BUF_SIZE instead of hard-coded value 1500
2020-04-08 14:11:50 +03:00
Arto Kinnunen 6d2bc4f144 Update STM32 EMAC driver - limit RX frame length
DISCO_F769NI EMAC driver may return ethernet packet with illegal
length when driver is under heavy load. In one case, the received
bytes indicate frame length of 53 bytes but advertised data length
was 65518 bytes. In another case EMAC driver variable
`EthHandle.RxFrameInfos.length` contained value 0xFFFF FFFC.

As a work-around accept only 1-1500 bytes long ethernet packets.
2020-04-08 14:11:21 +03:00
Martin Kojtal 9929ddd038
Merge pull request #12723 from AnttiKauppila/mbedtls_fixes5.15
Mbedtls fixes for 5.15.2
2020-04-08 08:57:12 +02:00
midd d55117f2aa WHD: Remove an assert from get_rssi()
This assert in WhdSTAInterface.cpp causes rssi greentea test to fail
on Cypress parts. This is because the rssi GT test expects the negative
test case to return 0 and not assert.
2020-04-07 12:25:18 -07:00
Dustin Crossman 4e6692b529 Backport #12603: Add CYSBSYSKIT_01 2020-04-02 15:02:44 -07:00
midd 8199e25f24 Backport #12394: Fix Cypress 1M SDIO + other minor bugs
- Remove wounding for the hardware CRYPTO block. The PSoC 6 MPN CYW9P62S1_43012EVB_01 was revised
  to add the hardware crypto block.
- Add missing error checks for emac power up.
- Add a multiplied by 2 in the SDIO clock divider calculation to account for internal UDB divider.
  Note: Fixes issues with intermittent WiFi firmware load failures on CY8CKIT_062_WIFI_BT,
  CYW943012P6EVB_01, CYW9P62S1_43012EVB_01, CYW9P62S1_43438EVB_01.
2020-04-02 14:49:22 -07:00
Antti Kauppila 5bdc7314f4 more error handling added for ctr and hmac 2020-03-31 16:04:54 +03:00
Teppo Järvelin 377e363059 Added missing optimizations based on mbedtls/baremetal.h config 2020-03-31 08:26:11 +03:00
Teppo Järvelin c801caf7cf fixed ssl hostname handling 2020-03-31 08:26:01 +03:00
Teppo Järvelin 163e5c90e3 Added new global rng, needed for MbedTLS optimisations 2020-03-31 08:25:47 +03:00
Teppo Järvelin a325320c47 Prepare for upcoming MbedTLS changes 2020-03-31 08:25:05 +03:00
adbridge aa298c0769 Revert "Pairing fails when IPv6 enabled in SoftAP intf"
This reverts commit 18285e1fc1.
2020-02-06 11:27:33 +00:00
Arun S df72637b61 Pairing fails when IPv6 enabled in SoftAP intf Issue: udp_sendto() Fails for multicast IPV6 packet when interface is switched from SoftAP to STA mode. When SoftAP start is called, add_ethernet_interface() will be called internally to add interface details into netif_list. When switching from SoftAP to STA mode, add_ethernet_interface() will be called again to append the interace details into netif_list. When udp_sendto() is called, ip6_route() will return interface as NULL since it consider device as single interface. Fix: SoftAP mode Stop, call remove_ethernet_interface() to remove the interface from the netif_list. 2020-02-05 15:25:11 +00:00
jeromecoutant e7988b0541 STM EMAC: compilation issue with ARMC5 2020-02-05 14:40:24 +00:00
Hamza Rizwan aec9ed2be5 Fixes for Network WiFi Test Crashes 2019-12-11 10:45:56 +00:00
Michal Paszta ea04c4f85e Remove internal usage of deprecated APIs in IPCore
Updated:
* netsocket classes,
* unittests, stubs and mocks,
* greentea tests
2019-11-27 20:02:20 +02:00
Martin Kojtal 38a8c0e28f
Merge pull request #11914 from michalpasztamobica/refactor_string_based_apis
Deprecate string-based APIs in IPCore
2019-11-22 12:00:56 +01:00
Michal Paszta fd5b4b9119 Deprecate string-based APIs in IPCore
MBED_DEPRECATE macros is added to string-based APIs.
New, non-string-based APIs are added in their place.
Wiced binaries rebuilt
Any existing stubs or mocks are adjusted to compile and run with the newly added non-string based functions.
2019-11-22 11:31:12 +02:00
Balaji Subramanyam f51cc6494e Cypress Target update to support Manufacturing Test. (#11868)
Cypress Target update to support WiFi Manufacturing Test

Adding IOCTLS in WhdSTAInterface for MFG Test.
Fix WHD EMAC interface to release buffer when emac is not powered up or callback
is not registered.
2019-11-21 10:12:35 +01:00
fred.li cef6aba55e RESET for each connect operation 2019-11-19 12:08:06 +08:00
fred.li 18fa28db77 Disable UNISOC Reconnect patch, Optimize workaround for LWIP issue 2019-11-19 12:08:05 +08:00
fred.li 88cf7df286 1, Restrict access to 1st 4K of flash
2, Merge UNISOC change for auto reconnect patch
2019-11-19 12:08:05 +08:00
Martin Kojtal 609612c1f2
Merge pull request #11840 from morser499/pr/whd1.50
Update Cypress WifiHostDriver to version 1.50
2019-11-12 13:56:35 +01:00
Martin Kojtal f61979ab31
Merge pull request #11843 from kapi90/master
Fix ethernet memory handling issues on CM3DS
2019-11-12 13:56:13 +01:00
Bence Kaposzta 4dd7712ac7 Fix ethernet memory handling issues on CM3DS
Signed-off-by: Bence Kaposzta <bence.kaposzta@arm.com>
2019-11-12 10:57:20 +01:00
Ryan Morse 799146ba2f Move WHD from being a Target to being a Component 2019-11-11 15:12:02 -08:00
Martin Kojtal 4f6ca1512a
Merge pull request #11827 from ABOSTM/DISCO_H747I_ETHERNET_READY
DISCO STM32H747I ETHERNET support, but disabled.
2019-11-11 16:56:36 +01:00
Bence Kaposzta 647216299f Fix ethernet memory handling issues on CM3DS
Signed-off-by: Bence Kaposzta <bence.kaposzta@arm.com>
2019-11-11 15:32:50 +01:00
Bence Kaposzta d5e89a25c6 Fix ethernet memory handling issues on CM3DS
Signed-off-by: Bence Kaposzta <bence.kaposzta@arm.com>
2019-11-11 14:39:08 +01:00
jeromecoutant 7fcedd20e1 DISCO STM32H747I ETHERNET support, but disabled.
Ethernet is disabled by default,
because some hardware modifications are required on the board DISCO_H747I.
see https://os.mbed.com/teams/ST/wiki/DISCO_H747I-modifications-for-Ethernet
2019-11-08 16:05:00 +01:00
Michal Paszta 4e5ea38d14 nsapi_dns: use delete[] for array alloc'd with new[] 2019-11-05 22:39:58 +02:00
Martin Kojtal 0d0120a812
Merge pull request #11808 from michalpasztamobica/api_hardening
Document Socket API functions return values.
2019-11-05 09:46:54 +01:00
Martin Kojtal fe940924cc
Merge pull request #11683 from AnttiKauppila/baremetal_support
Baremetal profile fixes
2019-11-04 15:53:57 +01:00
Martin Kojtal 412b0ae5d5
Merge pull request #11375 from tymoteuszblochmobica/nsapi_dns
NSAPI DNS query IP version check for non LWIP stacks.
2019-11-04 15:30:28 +01:00
Martin Kojtal f27aec3377
Merge pull request #11279 from cy-jayasankar/pr/added-ipv6-link-local-address-api
Add API to get ipv6 link local address
2019-11-04 15:28:41 +01:00
Michal Paszta 87211e9158 Document Socket API functions return values.
Describe the return values with as much detail as possible, to let user only check the relevant return codes, instead of all nsapi_error_t. Refer to underlying APIs wherever possible.
2019-11-04 11:55:19 +02:00
Antti Kauppila 0b8cd38dcd Baremetal profile fixes 2019-11-01 15:12:19 +02:00
Jayasankar Nara cb51fa57e2 Add API to get ipv6 link local address.
Protocols like mdns requires IPv6 link local address to be advertised in its
records (AAAA record). LWIP::Interface::bringup() API is creating IPv6 link
local address;But as of now there is no API exposed by mbed-os to get the
IPv6 link local address.

This new API is required to deliver mDNS library support on mbed-os for Cypress
platforms. Unit tested it by invoking get_ipv6_link_local_address with a simple
application.
2019-11-01 03:43:36 +05:30
Martin Kojtal da6b336391
Merge pull request #10978 from vmedcy/lwip-rawsocket
LwIP: add ICMPv4 Socket support
2019-10-31 11:50:21 +01:00
Martin Kojtal 419556b84a
Merge pull request #11735 from michalpasztamobica/dns_unittest_preparation
Dns unittest preparation
2019-10-30 11:04:19 +01:00
Martin Kojtal 98072b24c8
Merge pull request #11748 from cydriftcloud/pr-dev/fix-spurious-link-down-up
Fix spurious link up/down when AP IP address range change
2019-10-28 09:28:54 +01:00
Balaji 6905b1b547 Incorporate review comments from @kjbracey-arm 2019-10-25 10:51:50 -07:00
Balaji 5168bbdcd0 Add InternetDatagram Base Class 2019-10-25 10:48:13 -07:00
Balaji ab883350a0 Incorporate review comments from @kjbracey-arm 2019-10-25 10:48:12 -07:00
Balaji 90e188b23a fix a style convention 2019-10-25 10:48:12 -07:00
Balaji 0b5dea5f99 Changes to the PR 10978 (LWIP: Add RAWIPSocket support) 2019-10-25 10:48:12 -07:00