Commit Graph

132 Commits (9cb039144a86f61f42cd83ed87b33fc78e6afd51)

Author SHA1 Message Date
Marcelo Salazar 4083469d09 Remove Ublox targets 2020-05-06 16:39:29 +01:00
MarceloSalazar 5dcfe57c41 Remove LPC4088 based targets 2020-04-30 09:56:32 +01:00
Martin Kojtal 4f9d21b16a
Merge pull request #12694 from kivaisan/remove_netsocket_icetea_and_tcpserver
Remove netsocket icetea tests and TCPServer
2020-04-29 13:46:44 +02:00
Martin Kojtal 27405bff31
Merge pull request #12671 from hugueskamba/hk-netsocket-remove-armc5-support
Netsocket/lwIP Stack: Remove support for ARM Compiler 5
2020-04-20 14:16:20 +02:00
Martin Kojtal ac21ee90a8
Merge pull request #12791 from cy-arsm/cy-arsm/pr/IPv6_Dual_stack_fix
Fix for IPv6 Dual Stack support
2020-04-16 12:10:40 +02:00
Kimmo Vaisanen 236054175b Netsocket: Remove deprecated TCPServer
TCPSocket should be used instead.
2020-04-14 12:13:08 +03:00
Kimmo Vaisanen 09fe16618a Netsocket: Implement set_ip_address to enable setting second address
set_ip_address API can be used to set a static IPv4 address or IPv6 link-local
address to network stack.

This is needed for example in cellular use cases where device gets multiple IP
addresses from cellular context.
2020-04-14 12:04:03 +03:00
Arun S cfcfd11049 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-13 16:45:23 +05:30
MarceloSalazar a15f6a43ad General clean-up of unsupported targets 2020-04-09 15:36:21 +01:00
Antti Kauppila 7904ff05b3 more error handling added for ctr and hmac 2020-03-31 15:59:56 +03:00
Teppo Järvelin c5d5d21f05 Added missing optimizations based on mbedtls/baremetal.h config 2020-03-31 14:21:45 +03:00
Teppo Järvelin 17e513891b Added new global rng, needed for MbedTLS optimisations 2020-03-31 14:21:44 +03:00
Hugues Kamba 209f1e6a71 Netsocket/lwIP Stack: Remove support for ARM Compiler 5
ARM Compiler 5 is no longer actively supported and was superseded in
Mbed OS by ARM Compiler 6.
2020-03-31 10:54:36 +01:00
Michal Paszta dc142979d8 LWIP: propagate the apimsg->err out of netconn_apimsg() 2020-03-26 13:45:50 +02:00
Arun S 19cbfd7c15 Reverting #12312 as it breaking current WiFI
connect()->Disconnect() sequence

This reverts commit 18285e1fc1
2020-03-05 16:44:59 +05:30
Kevin Bracey aa9058a293 C++11-ify virtualisation in lwIP classes
Use `override` and `final` where appropriate, and eliminate unnecessary
`virtual`.

Some other C++11 simplifications.
2020-02-25 10:09:10 +02:00
Kevin Bracey b4c1f7f3da Correct LWIP::get_ip_address
Previous change that removed string-based APIs missed
`LWIP::get_ip_address`. Remove string-based method (which is not
overriding anything in `NetworkInterface`) and add missing binary form
to implement `NetworkInterface::get_ip_address`.
2020-02-25 09:57:56 +02:00
Michal Paszta f21b8c7fc1 Remove remaining string-based API functions
This removes any compiler warnings.
2020-02-06 11:27:50 +02:00
Martin Kojtal 8b829e5c41
Merge pull request #12312 from cy-arsm/cy-arsm/pr/ipv6-fix-SoftAPmode
Fix to sending IPV6 UPD packet fails IPv6 enabled in SoftAP intf
2020-02-03 16:55:09 +00:00
Arun S 18285e1fc1 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-01-29 15:07:52 +05:30
Kevin Bracey 988ef099c7 LWIP: don't pbuf_free(NULL) on socket close
`pbuf_free(NULL)` causes an `LWIP_ASSERT`. Make the call conditional.

Fixes #12184
2020-01-07 13:20:14 +02:00
Anna Bridge 5bef46b71a
Merge pull request #12063 from michalpasztamobica/get_ip_address_if_fixed
Move get_ip_address_if() to NetworkStack and include it in multihoming test
2019-12-24 11:04:59 +00:00
Michal Paszta 02a23e50ba LWIP: Remove unused MBOX configs
The configs have never been used and LWIP just uses its own settings.
2019-12-18 12:27:07 +02:00
Michal Paszta c2856ef710 Remove deprecated string-based get_ip_address_if 2019-12-12 09:22:32 +02:00
Michal Paszta d5d04ebb90 Move get_ip_address_if to the right class
get_ip_address_if was wrongly added to OnboardNetworkStack::Interface, while it should in fact be placed directly in OnboardNetworkStack.
2019-12-12 09:20:27 +02:00
Piotr Stolarz 9a70621507 Review fixes 2019-12-03 18:04:15 +01:00
Piotr Stolarz feb6a46619 [BUGFIX] LWIP system mailbox overflow fix 2019-11-28 14:32:36 +01:00
Martin Kojtal 1a2ecebc62
Merge pull request #11881 from hugueskamba/hk-UBLOX_EVK_ODIN_W2-enable-baremetal
UBLOX_EVK_ODIN_W2: Fix baremetal build and greentea tests
2019-11-25 08:40:33 +01: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
Hugues Kamba 157d126769 UBLOX_EVK_ODIN_W2: Fix baremetal build and greentea tests
Remove lwIP reliant networking and BLE tests for baremetal

Mbed OS 5 ported lwIP in its OS mode and uses threads. Networking
that rely on lwIP needs to be removed so it can be compiled with the
baremetal profile.

The BLE cordio Greentea tests are also disabled given that the feature
is not supported without an RTOS.
2019-11-22 10:55:39 +00: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
Martin Kojtal 784b03b8b4
Merge pull request #11877 from cy-arsm/cy-arsm/topic/dualstack-ipv6-linklocal-fix
Fix for sending IPv6 UDP packet over link local interface
2019-11-21 14:27:43 +01:00
Arun S dc7178f176 Modified LwIP stack and LwIP mbed-os wrapper to support sending IPv6
UDP packets when IPv4 and IPv6 dual mode stack is enabled and the IPv6
packet is sent over link-local inerface.
2019-11-18 17:18:50 +05:30
Anna Bridge 7cfa6faa5b
Merge pull request #11714 from tymoteuszblochmobica/linklocal
LWIP::get_ipv6_addr for link-local only
2019-11-15 12:32:54 +00:00
Tymoteusz Bloch 6514433b68 LWIP::get_ipv6_addr fixed to avoid returning NULL even if only linklocal adress exits. 2019-11-14 17:19:54 +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
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
Balaji 5b9291628e rebase mbed_lib.json to upstream/master 2019-10-25 12:39:27 -07:00
Balaji 948e989d27 fix mbed_lib.json add , 2019-10-25 12:14:31 -07:00
Balaji d9045b4840 index on lwip-rawsocket: 6905b1b547 Incorporate review comments from @kjbracey-arm 2019-10-25 11:00:55 -07:00
Balaji 6905b1b547 Incorporate review comments from @kjbracey-arm 2019-10-25 10:51:50 -07:00
Balaji ab883350a0 Incorporate review comments from @kjbracey-arm 2019-10-25 10:48:12 -07:00
Balaji b91836a94d fix astyle convention 2019-10-25 10:48:12 -07:00
Balaji 1a7288d220 fix astyle convention 2019-10-25 10:48:12 -07:00
Balaji d92a946b78 fix astyle 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
Martin Kojtal f6c28e54b6
Merge pull request #11586 from AnttiKauppila/lwip_improvements
Cleaned up Mbed LWIP configurations
2019-10-21 09:35:52 +02:00
Sathish Kumar Mani 5b791a4345 Fixes IPv6 multicast join issue
Problem Statement:
During multicast join sequence, InternetSocket::join_multicast_group() calls InternetSocket::modify_multicast_group(). modify_multicast_group() sets up the multicast group address (i.e., mreq.imr_multiaddr) to be joined and the interface address (i.e., mreq.imr_interface) to be used for the multicast join request. The interface address is initialized with the default value, which sets the version of interface address to NSAPI_UNSPEC. This results in LWIP::setsockopt() API to attempt IPv6 multicast join on the IPv4 interface address, hence IPv6 multicast join always fails with the protocol error.

Fix:
Initialize interface address version based on the multicast address version in LWIP::setsockopt(), before attempting multicast join operation.
2019-10-14 17:41:27 +05:30
Antti Kauppila 691fc5525d Fix build issue 2019-10-11 15:25:50 +03:00
Antti Kauppila d34a40a745 Cleaned up Mbed LWIP configurations 2019-09-27 15:52:40 +03:00