Commit Graph

192 Commits (25b23a9286262ee3778cd48b57f2926d85473750)

Author SHA1 Message Date
Steven 9a0fc98bdc Hotfix for PR #7778
TB_SENSE_12 would have been left behind by the changes in #7778. This commit implements the changes in mbed to allow targets to provide a default network interface for Silicon Labs targets.
2018-09-19 12:30:21 +02:00
Cruz Monrreal c356f1f9d4
Merge pull request #7883 from juhaylinen/fix-netsocket-warning
netsocket: Fix compiler warning
2018-09-18 11:42:21 -05:00
Cruz Monrreal 8475477ca7
Merge pull request #7992 from SeppoTakalo/fix-tcpsocket-accept
Fix TCPSocket::accept()
2018-09-14 11:49:06 -05:00
Juha Ylinen 4ea49f5580 Fix TCPServer::accept()
Missing lock caused Mutex unlock failure
2018-09-07 10:46:25 +03:00
Cruz Monrreal 06106297a4
Merge pull request #6293 from Taiki-San/patch-1
Reduce .text footprint of the network stack
2018-09-05 10:16:04 -05:00
Seppo Takalo 451852d19f Fix TCPSocket::accept()
This one was actually always return NULL, and unsted because we only
have tests with one device.

We will add the testcase for this soon
2018-09-05 12:00:59 +03:00
Martin Kojtal 44925d8527
Merge pull request #7579 from u-blox/ublox_odin_driver_os_5_v3.0.0_rc1
Updated ODIN drivers to v3.0.0 RC1
2018-09-03 09:25:32 +02:00
Seppo Takalo 1ef04796ee On KW24D and NCS36510 default to smaller Nanostack configuration
These boards do not fit the full Nanostack, so we need to select
6LoWPAN-ND as a default.
2018-09-01 12:37:46 -05:00
Ammad Rehmat b934632653 Access Point API 2018-08-31 11:33:30 +05:00
Taiki 758f6d2e83 Switch the IPv4 parser to the one recently introduced in libservice. Return a bool value on wether parsing of the IPv4 address string was successful 2018-08-28 14:00:54 +02:00
Seppo Takalo c5064a8e33 Fix *MeshInterface::get_default_instance()
This was returning object, instead of pointer.
Also it was trying to call lowpan(reference), instad of lowpan(ptr).
2018-08-28 11:02:58 +03:00
Juha Ylinen b8b39ac3ab netsocket: Fix compiler warning
[Warning] InternetSocket.h@237,10: 'InternetSocket::_factory_allocated' will be initialized after [-Wreorder]
[Warning] InternetSocket.h@236,23:   'volatile unsigned int InternetSocket::_pending' [-Wreorder]
[Warning] InternetSocket.cpp@22,1:   when initialized here [-Wreorder]
2018-08-24 13:26:53 +03:00
Steven 1cfddb73b7 Fix stack size for LwIP on EFM32GG11
Typo in the config file made the LwIP stack way too small on EFM32GG11 STK3701 target. Additionally, the EMAC thread stack was slightly too small when debug printing is on.
2018-08-19 14:39:58 +02:00
Martin Kojtal 88a7416941 nsapi: astyle block fix 2018-08-06 09:59:08 +01:00
Martin Kojtal b46aa6108d netsocket: astyle fix 2018-08-03 13:34:33 +01:00
Cruz Monrreal 63f62165d8
Merge pull request #7565 from OpenNuvoton/nuc472_emac_rst
Nuvoton: Fix NUC472 SD-Host HW IP reset definition
2018-07-31 11:44:01 -05:00
cyliangtw 2fcbcf1789
Initialized return value of numaker_emac link-out 2018-07-31 12:01:43 +08:00
Seppo Takalo 96a90c2f2f Allow legacy TCPServer::accept() to override inherited Socket::accept() 2018-07-24 18:06:04 +03:00
cyliangtw 7ea02d95a3 Add error handling for getting null tx buffer 2018-07-20 18:23:54 +08:00
Steven Cooreman da377c6ed3 Add EFM32GG11 Ethernet driver 2018-07-11 18:13:04 +02:00
Cruz Monrreal 93233c4f5d
Merge pull request #7364 from 0xc0170/fix_storage_rtos
Fix storage rtos types - remove including internal header file
2018-07-05 14:29:46 -05:00
Tero Jääskö 2e89fa22a5 netsocket: dns: make dns-cache-size:0 remove whole DNS cache code
Setting ""nsapi.dns-cache-size": 0" still left some of the DNS
caching code in. Add crude #if to remove all of it.
This allows one to save 429 bytes of flash and 48 bytes of RAM on
ARMC5 builds.
2018-06-29 18:17:19 +03:00
Martin Kojtal 4d8baa7451 emac targets: fix thread cb type 2018-06-29 08:35:20 +01:00
Cruz Monrreal cb000ceeab
Merge pull request #7336 from SeppoTakalo/fix_udp_filtering
Fix connected UDPSocket filtering
2018-06-28 10:06:52 -05:00
Martin Kojtal 82b490b0cf kinetis: fix rtos storage type for thread 2018-06-28 15:11:00 +01:00
jeromecoutant 6391b7f2fa TARGET_STM_EMAC astyle 2018-06-27 15:00:51 +02:00
Seppo Takalo f2c0c4e248 Fix connected UDPSocket filtering
Was dropping all packets from connected peer
2018-06-26 17:01:19 +03:00
Seppo Takalo 1ca9ccda73 Filter incoming UDP packets based on connected peer address. 2018-06-20 12:38:07 +03:00
Seppo Takalo e7cb4752fa Fix small issues from the review 2018-06-20 12:38:07 +03:00
Seppo Takalo 2b60e42756 Close Doxygen group at the end of file 2018-06-20 12:38:07 +03:00
Seppo Takalo 96ef8e345d Move string allocation to a point where get_ip_address() is called
This saves RAM/stack on typical socket usage where human readable
format is not exchanged so often.
2018-06-20 12:38:07 +03:00
Seppo Takalo 407b2f275d Move accept() to abstract socket class and implement in TCPSocket
Deprecate TCPServer in favor of just TCPSocket::accept()
2018-06-20 12:38:07 +03:00
Seppo Takalo cdbe43c0d5 Refactor Sockets by moving functions up into common base.
* Move IP Socket stuff to InternetSocket class which is inherited by TCP/UDP
* Implement sendto() and recvfrom() on TCP socket
* Implement connect() call on UDP
* Implement send() and recv() calls on UDP socket
2018-06-20 12:38:06 +03:00
Cruz Monrreal e8005f6d72
Merge pull request #7206 from mikaleppanen/k64f_async_powerup
K64f non-blocking powerup
2018-06-19 21:49:37 -05:00
Cruz Monrreal 2bb686ff1e
Merge pull request #7245 from SeppoTakalo/fix-default-interface
Fix default interface selection by using correct macro names.
2018-06-19 08:46:28 -05:00
Martin Kojtal 0658544cb6
Merge pull request #7207 from mikaleppanen/dns_singletons
Change DNS global class definitions to singletons
2018-06-19 14:14:21 +02:00
Seppo Takalo 384fc7e778 Fix typo: WifiInterface -> WiFiInterface and add missing return.
Default WiFiInterface did not even build. And when it was fixed to build,
it was always returning NULL.
2018-06-19 10:47:12 +03:00
Seppo Takalo 412f654c8d Fix default interface selection by using correct macro names.
Code was written using MBED_CONF_DEFAULT_* but the mbed_lib.json file
that created these values is prefixed with "nsapi" and therefore
final macros are MBED_CONF_NSAPI_DEFAULT_*
2018-06-18 18:59:43 +03:00
Mika Leppänen 9b0cbe064d Disabled STM ethernet driver hardware checksum calculation
No need for driver level hardware IPv4/TCP/UDP/ICMP checksum insertion
since LWIP and nanostack handles those already.

Related to issue: https://github.com/ARMmbed/mbed-os/issues/7227
2018-06-15 14:24:05 +03:00
Mika Leppänen b7627e823b K64F, K66F: Update the ENET PHY driver
PHY init and autonegotation is split into own functions.
2018-06-15 10:41:31 +03:00
Mika Leppänen 9457bd13b0 Changed DNS global class definitions to singletons
This saves memory on platforms without network interface.
2018-06-13 15:50:22 +03:00
Mika Leppänen 5e8ed3364a Added delay to K64F/K66F ethernet TX when all descriptors are in use
Currently, if all TX descriptors are in use and IP stack calls K64F/K66F
ethernet driver link out, link out drops the packet. Added 10ms delay
to link out to wait for a descriptor to become available before dropping
the packet.
2018-06-13 10:02:13 +03:00
Mika Leppänen db672b36c5 Non-blocking K64F/K66F ethernet power up
Changed K64F/K66F power up to return without waiting for link up i.e. for
the ethernet cable to be connected. This is needed for non-blocking use
of driver e.g. for using the driver from event queue.
2018-06-13 09:53:32 +03:00
Cruz Monrreal ed9a1f1327
Merge pull request #7161 from kjbracey-arm/ppp-gateway
Correct PPPCellularInterface::get_gateway()
2018-06-11 22:11:18 -05:00
Cruz Monrreal 0eac433a66
Merge pull request #7119 from kjbracey-arm/nsapi-ip6string
NSAPI: Use IPv6 conversion routines from frameworks
2018-06-11 21:27:21 -05:00
Cruz Monrreal 8c6a664380
Merge pull request #7086 from mikaleppanen/nxp_lpc17xx_emac
NXP lpc17xx emac driver
2018-06-11 08:43:43 -05:00
Cruz Monrreal 2ac81de533
Merge pull request #7141 from kjbracey-arm/kinetis-mem-conf
Kinetis EMAC: Make number of buffers configurable
2018-06-11 08:41:14 -05:00
Kevin Bracey 45e24d4682 Correct PPPCellularInterface::get_gateway()
Two cascading copy-paste errors stopped this working:

  * PPPCellularInterface::get_gateway() called
    nsapi_ppp_get_ip_address();
  * nsapi_ppp_get_gateway() called the interface's get_netmask().

First bug has always been there - second one was introduced in 5.9.

AT_CellularNetwork currently lacks calls to get both netmask and gateway
- this patch would be needed for that when added.
2018-06-07 14:28:19 +03:00
Mika Leppänen 97de145adf Added missing license to header of the file 2018-06-06 14:29:49 +03:00
Mika Leppänen a8402256a3 Corrected TX buffer reclaim error
When all TX descriptors were reserved in a row so that TX buffer
reclaim interrupt did not happen during reservation sequence, after
the interrupt occurred, TX buffer reclaim did no longer free buffers.

This happened because when all descriptors were in use, last free
index pointed to consumed index.
2018-06-06 14:29:49 +03:00