Commit Graph

49 Commits (b15fc6a6b57d9c0538ad9cc81294968e9981ebd1)

Author SHA1 Message Date
adustm ee3faa408d fix for #3387 need to disable the data cache for Ethernet to use the DMA
descriptors if they are located in SRAM1 and SRAM2
2016-12-22 17:57:50 +01:00
Sam Grove 899c5422ac Merge pull request #3436 from ARMmbed/net_echo_test_host_fix
Fix network echo test host scripts for Mac
2016-12-15 10:40:39 -06:00
Bartek Szatkowski b77f663520 Add defined port fallback for network echo tests
The 0 aka 'any' port doesn't for on Mac, but, only, using defined port
may interfere with running multiple tests on CI.
2016-12-15 09:27:02 +00:00
Bartek Szatkowski 859c160ddc Fix network echo test host scripts for Mac
It seems that the 0 aka 'any port' doesn't work well on Mac, causing
[Errno 49] Can't assign requested address errors.
2016-12-15 09:27:02 +00:00
cyliangtw 0053b70d1e [NUC472] Fix LWIP implementation contains printf issue #3441 2016-12-14 15:12:58 +08:00
Mahadevan Mahesh 428e8b23c1 K66F: Enable LWIP feature
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-12-06 12:37:02 -06:00
Martin Kojtal ab46684d5d Merge pull request #3336 from mikaleppanen/lwip_dhcp_parse_corr
Squashed 'features/FEATURE_LWIP/lwip-interface/lwip/' changes from d7…
2016-12-02 15:51:19 +01:00
Martin Kojtal e261e30d05 Merge pull request #3193 from mikaleppanen/lwip_ipv6_eth_down_supp
Added clearing of ipv6 addresses to lwip bringdown function
2016-11-29 18:13:35 +01:00
Mika Leppänen 420d5c3bac Squashed 'features/FEATURE_LWIP/lwip-interface/lwip/' changes from d7a6c6d..cd60f73
cd60f73 Merge branch 'mbed-os-lwip-rc2-maint' into mbed-os-lwip-rc2-maint-prefixed
3a50479 fixed bug #49676 (Possible endless loop when parsing dhcp options) & added unit test for that

git-subtree-dir: features/FEATURE_LWIP/lwip-interface/lwip
git-subtree-split: cd60f73f110829e00df46593fea5db26bcfb1662
2016-11-29 15:00:02 +02:00
Bartek Szatkowski 20b7f05721 WiFi: Make WiFi default networking interface on Odin board
That disables Ethernet by default and makes sure the Ethernet tests are
not failing when it's disabled.
2016-11-16 12:00:09 +00:00
Anna Bridge 405f8937a7 Merge pull request #3191 from tung7970/fix-mbedos
Fix lwip_mac_address buffer overflow and set_ip_bytes out of bound access
2016-11-10 17:05:38 +00:00
Anna Bridge 805af00b87 Merge pull request #3194 from NXPmicro/Update_K64_SDK_Drivers
Update K64 sdk drivers
2016-11-10 17:05:02 +00:00
Mika Leppänen 4babe02b62 Added clearing of ipv6 addresses to lwip bringdown function 2016-11-10 09:07:35 +02:00
Christopher Haster b04a8da574 nsapi - Added test cases for gethostbyname
- test_dns_query
- test_dns_query_pref
- test_dns_literal
- test_dns_literal_pref
2016-11-09 12:11:02 -06:00
andreas.larsson e111810830 Added emac_stack_mem_copy. Needed by the u-blox ODIN-W2 driver. 2016-11-07 15:52:56 +01:00
Martin Kojtal 7eaf32baa0 Merge pull request #3075 from geky/nsapi-error-size-types-2
nsapi - Add standardized return types for size and errors
2016-11-07 11:13:40 +00:00
Tony Wu d039d30abe lwip - Fix lwip_mac_address buffer overflow
Sounds serious, but should be benign.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2016-11-03 20:16:58 +08:00
Mahadevan Mahesh 177eaff847 K64F ENET: Update to remove unused variable. This is no longer available in the updated SDK ENET driver 2016-11-03 07:07:49 -05:00
Sam Grove 8b05a2a02b Merge pull request #3078 from infinnovation/lwip-config
lwip: Allow several configuration macros to be set externally (bis)
2016-11-03 02:15:10 -05:00
Christopher Haster 78b9357c80 nsapi - Adopted standardized return types in lwip 2016-11-02 15:25:22 -05:00
Sam Grove 2a3f4eda19 Merge pull request #3162 from geky/nsapi-warning-cleanup
lwip/nsapi - Clean up warnings in network code
2016-11-01 14:15:08 -05:00
Sam Grove fcfc7b46a7 Merge pull request #3135 from geky/lwip-fix-cyclic-buffer-leak
lwip - Fix memory leak in k64f cyclic-buffer overflow
2016-11-01 14:12:24 -05:00
Christopher Haster 8b7c051d03 lwip - Change k64f emac layer to drop frames on buffer exhaustion
Previously, exhausting hardware buffers would begin blocking the lwip
thread. This patch changes the emac layer to simply drop ethernet
frames, leaving recovery up to a higher level protocol.

This is consistent with the behaviour of the emac layer when unable
to allocate dynamic memory.
2016-10-28 15:22:08 -05:00
Christopher Haster 42105371ef lwip/nsapi - Cleaned up warnings in network code
- cc.h@57,1: "BYTE_ORDER" redefined
- lwip_inet_chksum.c@560,44: passing argument 1 of 'thumb2_checksum'
  discards 'const' qualifier from pointer target type
- lwip_pbuf.c@1172,9: variable 'err' set but not used
- SocketAddress.cpp@293,1: control reaches end of non-void function
2016-10-28 14:24:52 -05:00
Martin Kojtal ba47aa546b Merge pull request #2897 from geky/nsapi-consistent-unspec
nsapi - Standardize support of NSAPI_UNSPEC
2016-10-27 10:26:00 +02:00
Christopher Haster 2fd15f4f44 lwip - Fixed memory leak in k64f cyclic-buffer overflow
This was actually several bugs colluding together.

1. Confusion on the buffer-semaphore paradigm used led to misuse of the
tx semaphore and potential for odd behaviour.

2. Equality tests on tx_consume_index and tx_produce_index did not
handle overflow correctly. This would allow tx_consume_index to catch
up to tx_produce_index and trick the k64f_rx_reclaim function into
forgetting about a whole buffer of pbufs.

3. On top of all of that, the ENET_BUFFDESCRIPTOR_TX_READ_MASK was not
correctly read immediately after being set due to either a compiler
optimization or hardware delays. This caused k64f_low_level_output
to eagerly overrun existing buff-descriptors before they had been
completely sent. Adopting the counting-semaphore paradigm for 1 avoided
this concern.

As pointed out by @infinnovation, the overflow only occurs in the rare
case that the 120MHz CPU can actually generate packets faster than the
ENET hardware can transmit on a 100Mbps link.
2016-10-25 13:22:17 -05:00
Colin Hogben b516503fcb lwip: Expose principal socket limits as configuration parameters.
Allow the limits on numbers of sockets to be changed via the
configuration system.  The help texts show the RAM penalty from
increasing each value.
2016-10-19 21:37:52 +01:00
Colin Hogben 55485ae61e lwip: Annotate with memory used by config parameters 2016-10-19 14:49:04 +01:00
Colin Hogben b7a48b1220 lwip: Allow several configuration macros to be set externally.
Manually rebasing after the monster restructuring.
2016-10-19 14:49:03 +01:00
Mika Leppänen 61c7f9821b Corrected lwip TCP socket accept ipv6 address conversion 2016-10-17 15:30:09 +03:00
adustm ff4fca6747 ADD NEW TARGET : NUCLEO_F756ZG, based on existing NUCLEO_F746ZG 2016-10-13 18:29:09 +02:00
adustm a07a271fe5 ADD NEW TARGET : NUCLEO_F439ZI, based on existing NUCLEO_F429ZI 2016-10-13 18:29:09 +02:00
Sam Grove 44dcb5f21f Merge pull request #2994 from 0xc0170/fix_issue#2993
lwip-interface: fix issue #2993
2016-10-13 11:14:10 -05:00
Martin Kojtal f8b682c943 lwip-interface: fix issue #2993
DEVICE_ are passed as command line -D, thus no inclusion is required.
``platform.h`` is C++ header file, should not be pulled in C files
2016-10-13 11:42:31 +01:00
cyliangtw 1c1257dcb1 EMAC buffer address word alignment 2016-10-11 10:55:08 +08:00
cyliangtw 82ef4ef047 remove warnings 2016-10-11 10:55:08 +08:00
Christopher Haster 6d9ac9fa8f lwip - Added support for NSAPI_UNSPEC to lwip 2016-10-05 12:48:15 -05:00
Sam Grove 683d7b7d74 Merge pull request #2874 from 0xc0170/feature_wifi_ublox
emac HAL API, WiFiInterface additions
2016-10-04 22:46:09 -05:00
andreas.larsson 26eb5f19f2 Fixed mbed_lwip_get_netmask amd mbed_lwip_get_gateway 2016-10-04 16:40:15 +02:00
andreas.larsson f5675cc822 Increased the stack size for the lwIP thread from 1024 to 1200. Needed for the u-blox ODIN-W2 driver. The actually needed size has not been measured. 2016-10-04 15:52:56 +02:00
andreas.larsson b418fce8ac Added function for increasing ref count. 2016-10-04 15:52:55 +02:00
Bartek Szatkowski 1e7ba5fe79 Fix merge issues 2016-10-04 14:38:28 +01:00
Bartek Szatkowski ae11b51b26 Split lwip initialisation and interface bringup
Split IP stack initialisation from mbed_lwip_bringup to mbed_lwip_init.
2016-10-04 14:32:44 +01:00
Bartek Szatkowski 98eb50f592 Refactor lwip_stack function names to include mbed prefix
Mbed function names, prefixed with lwip are confusing, as the name
suggest that they are part of lwip ip stack.
2016-10-04 14:22:24 +01:00
Bartek Szatkowski d0be5733db EMAC: Fix LWIP_IPV4 and DEVICE_EMAC flag usage 2016-10-03 17:46:39 +01:00
andreas.larsson 1d3c63d9bb Changed name for the target UBLOX_C029 to UBLOX_EVK_ODIN_W2 2016-10-03 12:10:50 +02:00
Christopher Haster 5cd2d7869e Merge remote-tracking branch 'upstream/master' into feature_wifi_ublox_merge 2016-10-02 07:29:07 -05:00
Sam Grove 04a2af7395 Update net tests to use feature name LWIP and not IPv4 2016-10-01 02:21:04 -05:00
Christopher Haster ba99a1f31d restructure - Restructured features/net directory
features/net/network-socket -> features/netsocket
features/net/FEATURE_IPV4 -> features/FEATURE_LWIP
features/net/nanostack-binaries -> features/nanostack
features/net/FEATURE_NANOSTACK -> features/nanostack/FEATURE_NANOSTACK
2016-09-30 19:18:09 -05:00