Commit Graph

624 Commits (f39da5ebaf90cb10588446fae56cbac2f58ea6ed)

Author SHA1 Message Date
Arto Kinnunen f39da5ebaf Remove unnecessary casts from stagger/RTT API 2020-04-27 10:22:25 +03:00
Arto Kinnunen b081411fb7 Corrections from review meeting
-Rename get_latency_estimate_to_address, use rtt instead of latency
-Update descriptions of added methods
2020-04-22 21:38:12 +03:00
Arto Kinnunen a14ccad485 Review corrections
-Check pointer before writing to it. It allows application to ask
 only some of the  stagger values.
-Change type of data_amount in get_stagger_estimate_to_address to be
 uint16_t.
2020-04-17 08:55:48 +03:00
Arto Kinnunen a7d3a981b7 Add getsockopt option to reading network property
Add getsockopt options NSAPI_LATENCY and NSAPI_STAGGER to read
network specific timing constraints from socket.
-NS_LATENCY returns estimated latency to given address.
-NSAPI_STAGGER returns estimated initial delay that application
 should wait before transmitting data to network.

Application can use the new options to avoid network congestion by
adjusting transmission delays and retry timeouts.
2020-04-17 08:55:48 +03: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
Martin Kojtal 90db09ed9f
Merge pull request #12745 from JojoS62/add-eth-MI-config
add config option for phy media interface
2020-04-15 09:21:44 +02:00
Martin Kojtal fef75b3b52
Merge pull request #12731 from kivaisan/fix_socketaddress_verification
Testing: Fix multihoming test compilation issues
2020-04-15 09:21:18 +02:00
Martin Kojtal 05dd4ce633
Merge pull request #12769 from miteshdedhia7/pr/rssi-gt-fix
Fix WIFI-GET-RSSI test case failure and remove extra label from CYW9P62S1_43438EVB_01 in target.json
2020-04-15 09:19:22 +02:00
Kimmo Vaisanen e776a9bb72 Netsocket: Add get_dns_server API for NetworkInterface
With get_dns_server DNS servers can be queried from NetworkInterface object
2020-04-14 12:04:03 +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
Rajkumar Kanagaraj 9739b565b2 Fix the CI build issue 2020-04-08 10:35:07 +01:00
midd 0504873255 Remove an assert from get_rssi() in WhdSTAInterface.cpp which causes rssi greentea test to fail in Cypress parts. This is because the rssi GT test expect the negative test case to return 0 and not assert. 2020-04-07 10:42:17 -07:00
Martin Kojtal b1ce678d30
Merge pull request #12728 from jeromecoutant/PR_ETHERNET_THREADSIZE
STM32 EMAC : increase thread-stacksize
2020-04-05 19:57:44 +02:00
Martin Kojtal 74ace63eaa
Merge pull request #12729 from AnttiKauppila/mbedtls_fixes
Mbedtls fixes
2020-04-03 08:59:14 +02:00
Martin Kojtal ded879daed
Merge pull request #12603 from dustin-crossman/pr/add-cysbsyskit_01
Add target CYSBSYSKIT_01
2020-04-02 18:18:11 +02:00
JojoS62 a4d5186f39 add config option for phy media interface 2020-04-02 12:16:57 +02:00
Kimmo Vaisanen 949856d967 Replace unique_ptr::reset() call with "= nullptr"
This is a workaround for IAR library bug.
2020-04-01 12:13:49 +03:00
Martin Kojtal 0eca8d38d0
Merge pull request #12715 from RyoheiHagimoto/rza1-eth-deprecation
RZ_A1H remove usage of ethernet hal API
2020-04-01 08:54:31 +02:00
Martin Kojtal dba3962f16
Merge pull request #12570 from kjbracey-arm/nsapics
Improve nsapi_create_stack
2020-03-31 16:34:20 +02: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 0f889c3764 fixed ssl hostname handling 2020-03-31 14:21:44 +03:00
Teppo Järvelin 17e513891b Added new global rng, needed for MbedTLS optimisations 2020-03-31 14:21:44 +03:00
Teppo Järvelin 793837cafe Prepare for upcoming MbedTLS changes 2020-03-31 14:21:44 +03:00
jeromecoutant dfeeb821dc STM32 EMAC : increase thread-stacksize 2020-03-31 11:41:51 +02:00
Martin Kojtal fea7c1abef
Merge pull request #12472 from praveenCY/pr/wpa3_support_merge
Add WPA3 support in mbed-os for green tea tests
2020-03-31 08:32:27 +02:00
RyoheiHagimoto 7794221c69 [RZ_A1H] remove usage of ethernet hal API 2020-03-30 14:54:35 +09:00
Anna Bridge 009ff7adf3
Merge pull request #12036 from kjbracey-arm/callback_fiddle
Callback extension and optimisation
2020-03-27 14:07:20 +00:00
Anna Bridge 1bbcaec04a
Merge pull request #12683 from kivaisan/socketaddress_refactor
SocketAddress rework
2020-03-27 11:30:12 +00:00
Dustin Crossman 56099951b5 Ran astyle on COMPONENT_SCL. 2020-03-26 11:50:58 -07:00
Martin Kojtal b62fdaed1f
Merge pull request #12685 from kivaisan/remove_deprecated_netsocket_methods
Remove deprecated netsocket methods
2020-03-25 10:12:55 +01:00
Kimmo Vaisanen 619a5a7bcc Netsocket: Remove deprecated constructor with open
Default constructor with separate open call should be used instead.
2020-03-24 12:46:30 +02:00
Kimmo Vaisanen 4918bc6aad TCPSocket: Remove deprecated contructor with open
Default constructor and separate open call should be used instead.
2020-03-24 12:46:30 +02:00
Kimmo Vaisanen 2cfee7be71 Netsocket: Remove deprecated InternetSocket::attach methods
InternetSocket::sigio should be used instead.
2020-03-24 12:46:30 +02:00
Kevin Bracey 4eda58893e SocketAddress rework
* Add optimised constexpr default constructor. Default construction
  was previously by a heavyweight defaulted `nsapi_addr_t` parameter.
* Remove deprecated resolving constructor.
* Take `nsapi_addr_t` inputs by constant reference rather than value.
* Inline the trivial getters and setters.
* Use `unique_ptr` to manage the text buffer.
* Make `operator bool` explicit.
* Optimise some methods.
* Update to C++11 style (default initialisers, nullptr etc)
2020-03-24 11:05:33 +02:00
Dustin Crossman 89c70fbd9a Fix licenses in COMPONENT_SCL. 2020-03-16 09:40:34 -07:00
jeromecoutant 488c9db81e STM32 EMAC : remove TIMEOUT issue when cablke is not plugged yet 2020-03-13 16:58:47 +01:00
Kevin Bracey bb733f1ee8 Callback updates
* Optimise clearing by adding `nullptr` overload. This overload means
  `Callback(NULL)` or `Callback(0)` will no longer work; users must
  use `Callback(nullptr)` or `Callback()`.
* Optimise clearing by not clearing storage - increases code size of
  comparison, but that is extremely rare.
* Reduce ROM used by trivial functors - share copy/destroy code.
* Config option to force trivial functors - major ROM saving by
  eliminating the "operations" table.
* Config option to eliminate comparison altogether - minor ROM saving by
  eliminating zero padding.
* Conform more to `std::function` API.
2020-03-11 15:46:03 +02:00
Anna Bridge da9f85b6af
Merge pull request #12580 from cy-arsm/cy-arsm/pr/PR_SoftAP_STA_Fix_revert
Reverting #12312 as it breaking current WiFI connect()->Disconnect() sequence
2020-03-10 12:50:27 +00:00
Dustin Crossman 05776d6f88 Update COMPONENT_SCL. 2020-03-09 10:07:12 -07:00
Dustin Crossman 6b6db89434 Improve documentation. 2020-03-09 10:07:12 -07:00
Dustin Crossman e754510cce Add COMPONENT_SCL. 2020-03-09 10:07:11 -07:00
Martin Kojtal 0692fc65bc
Merge pull request #12567 from jeromecoutant/PR_EMAC_TRACE
STM32 EMAC : increase thread size when mbed-trace is enabled
2020-03-09 15:01:20 +00:00
Kevin Bracey 4759e9d667 Remove unnecessary friends of NetworkInterface 2020-03-05 16:45:36 +02:00
Kevin Bracey 70a6701006 Improve nsapi_create_stack
Use tag dispatch to better handle both NetworkInterface and NetworkStack
pointers.

The previous design was intended to avoid ambiguities when presented
with a scenario like

    class MyDevice : public NetworkInterface, public NetworkStack {
    };

    TCPSocket(&MyDevice);
    // Need NetworkStack *: use NetworkInterface::get_stack or
    // cast to NetworkStack?

But the previous solution didn't actually work as intended. The overload
pair

    nsapi_create_stack(NetworkStack *);
    // versus
    template <class IF>
    nsapi_create_stack(IF *);

would only select the first form if passed an exact match -
`NetworkStack *`. If passed a derived class pointer, like `MyDevice *`,
it would select the template.

This meant that an ambiguity for MyDevice was at least avoided, but
in the wrong direction, potentially increasing code size.

But in other cases, the system just didn't work at all - you couldn't
pass a `MyStack *` pointer, unless you cast it to `NetworkStack *`.
Quite a few bits of test code do this.

Add a small bit of tag dispatch to prioritise the cast whenever the
supplied pointer is convertible to `NetworkStack *`.
2020-03-05 16:45:36 +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
Martin Kojtal 6137c98d6a
Merge pull request #12543 from kivaisan/remove_deprecated_connect
TLSSocket: Remove deprecated connect
2020-03-04 08:20:23 +00:00
jeromecoutant 3a02671028 STM32 EMAC : increase thread size when mbed-trace is enabled 2020-03-04 09:14:41 +01:00
Martin Kojtal 6677249a08
Merge pull request #12506 from kivaisan/fix_socketaddress_regression
Fix 2 string based IP address removal regressions
2020-03-04 07:52:31 +00:00