Commit Graph

21131 Commits (54f53e09d8b8bda9a5644bdbfa93661348a71c41)

Author SHA1 Message Date
Deepika 09f4d0bb85 Add stats stub functions to rest of the cmake files 2018-11-26 11:04:37 -06:00
Vincent Coubard ac47736259 BLE: Enable cordio extended modules if available. 2018-11-26 16:57:47 +00:00
paul-szczepanek-arm bf535af159 check feature support before calling extended functnions 2018-11-26 16:57:07 +00:00
paul-szczepanek-arm bed7677c81 stop advertising before reseting 2018-11-26 16:51:28 +00:00
bcostm 08f9e80770 STM32L4 TRNG:Remove trng clock setting for L4 devices
This will be done in the system_clock.c file instead.
2018-11-26 17:36:20 +01:00
paul-szczepanek-arm 6f3a9ca107 legacy handle starts off present in _existing_sets 2018-11-26 16:29:33 +00:00
paul-szczepanek-arm f4a560dace reset advertising sets on reset 2018-11-26 16:25:33 +00:00
deepikabhavnani 2df0289ae9 Resolve build issue for unittest
Error Resolved here is:
SingletonPtr.h:93:13: error: ‘NULL’ was not declared in this scope
2018-11-26 09:53:19 -06:00
deepikabhavnani c272377a81 Make sure no memory overhead if statistics are disabled 2018-11-26 09:42:45 -06:00
deepikabhavnani fa6b3d2783 Corrected TCPServer reporting as per review comments 2018-11-26 09:42:45 -06:00
deepikabhavnani 068f2d14c0 Resolve IAR build issue
IAR not able to assign default zero value in array and complaints of
internal error as below:

[ERROR] Internal error: [Front end]: assertion failed at:
"..\..\Translator\compiler_core\src\parser\edg\decl_inits.c", line 2031
2018-11-26 09:42:45 -06:00
Amanda Butler 81fc940a8e Edit SocketStats.h
Edit file.
2018-11-26 09:42:45 -06:00
deepikabhavnani 117eb0bc87 Add socketstats stub functions for unittest and addressed reviews 2018-11-26 09:42:50 -06:00
Deepika f6c1a40b29 Add config options for socket statistics
1. MBED_CONF_NSAPI_SOCKET_STATS_ENABLE to enable the statistics
2. MBED_CONF_NSAPI_SOCKET_STATS_MAX_COUNT max sockets statistics cached
2018-11-26 09:42:45 -06:00
Deepika a851df66e3 Code/bug after testing
1. Fixing astyle and docs
2. Extra mutex lock was removed
3. Bytes are updated when send/recv > 0 and not in case of -ve error
4. Review comments
5. Guard statistics implementation in test with MBED_NW_STATS_ENABLED
2018-11-26 09:42:45 -06:00
Deepika eec54a0fc9 Update tcp test cases to verify network socket statistics
Cases Updated are:
1. TCPSOCKET_ECHOTEST_NONBLOCK
2. TCPSOCKET_OPEN_CLOSE_REPEAT
3. TCPSOCKET_OPEN_LIMIT
2018-11-26 09:42:45 -06:00
Deepika e7ea2927fc Update udp test cases to verify network socket statistics
Cases Updated are:
1. UDPSOCKET_ECHOTEST_NONBLOCK
2. UDPSOCKET_OPEN_CLOSE_REPEAT
3. UDPSOCKET_OPEN_LIMIT
2018-11-26 09:42:45 -06:00
Deepika 09b4bc07ce This is the initial version of stats implementation in network layer.
SocketStats Class is added to collect and provide the statistics information.
In this phase only socket information is collected and max sockets that can
be recorded at any time are configurable through 'MBED_CONF_NSAPI_SOCKET_STATS_MAX_COUNT'

Network statistics can be enabled through a macro MBED_NW_STATS_ENABLED

More information on design is captured in #8743
2018-11-26 09:42:39 -06:00
paul-szczepanek-arm 2b94b66fd2 deprecate services that are not useless 2018-11-26 15:42:12 +00:00
paul-szczepanek-arm e54e3eaee0 cast no longer needed 2018-11-26 15:42:12 +00:00
deepikabhavnani d5da9eb636 Resolved warning "call_in inherits implicit virtual" 2018-11-26 09:41:15 -06:00
Martin Kojtal 3c0d6f0b0c
Merge pull request #8790 from AriParkkila/cell-urc-cb
Cellular: Fix ATHandler URC processing
2018-11-26 16:36:54 +01:00
Vincent Coubard f71e08ccf1 BLE: tag API uses in GenericGap. 2018-11-26 15:26:24 +00:00
Vincent Coubard 2d63714f2e BLE: Implement connection parameter management in GAP. 2018-11-26 15:25:46 +00:00
Vincent Coubard 89355b9fb0 BLE: Check supervision timeout value in connect. 2018-11-26 15:24:42 +00:00
Vincent Coubard d1b5c8cbb5 BLE: Mark LEGACY_ADVERTISING_HANDLE as active in initialization. 2018-11-26 15:23:53 +00:00
Vincent Coubard 93b6ecfa7e BLE: initialize properly deprecated and non deprecated flags. 2018-11-26 15:23:24 +00:00
deepikabhavnani b6e381b701 MBED_NO_GLOBAL_USING_DIRECTIVE is added to remove auto-addition of namespace
Macro guard `MBED_NO_GLOBAL_USING_DIRECTIVE` is added around namespace, to avoid
polluting users namespace.
2018-11-26 09:23:16 -06:00
Vincent Coubard 3aa91ecbba BLE: return phy_set_t in ConnectionParameters::getPhySet 2018-11-26 15:22:50 +00:00
Jimmy Brisson 38d8bb64fa Migrate old memap file handling into toolchains
### Description

This PR moves the old memap file handling required for differential
memap from within memap to the toolchain object. This has the
advantage that we can do the `mv <app>.map <app>.map.old` the moment
before it is overwritten by the linker. This should allow multiple
reruns of memap without modifying your build directory.

### Pull request type

    [ ] Fix
    [x] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change
2018-11-26 08:47:40 -06:00
Vincent Coubard a915748cbe BLE: Fallback to legacy connect when required. 2018-11-26 14:13:07 +00:00
Vincent Coubard 190b9bc125 BLE: Fix address type in ::ble::Gap::connect 2018-11-26 14:13:07 +00:00
Ron Eldor 5e0223f78f Add the platform generic errors
Replace the module specific errors with the `MBEDTLS_ERR_PLATFORM_XXX`
errors.
2018-11-26 15:33:17 +02:00
Ron Eldor 5ed3a64527 Return MBEDTLS_ERR_CCM_BAD_INPUT on invalid key
Return `MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE` only for valid key lengths,
that are not supported by Cryptocell 310. For other key sizes, return
`MBEDTLS_ERR_CCM_BAD_INPUT`
2018-11-26 15:33:16 +02:00
Ron Eldor 1b34927e83 Style fixes
1. Change camelcase variables to Mbed OS style.
2. Remove functions declarations from the `_alt` header, since they
are now added from the module header regardless whether an alternative
implementation exists.
3. Remove the `extern "c"` declaration from the `_alt` headers.
4. Remove whitespaces before opening parenthesis.
5. Fix alignment of function parameters.
6. Fix indentations.
7. Limit lines to 80 characters.
2018-11-26 15:32:46 +02:00
Michal Paszta e101943cce Fix compilation warnings (apart from nanostack) 2018-11-26 14:27:48 +01:00
Ron Eldor c948eaad21 Fix issues in CC310 cc_internal discovered by OTT
Return `MBEDTLS_ERR_ECP_INVALID_KEY` when Cryptocell returns
`CRYS_ECPKI_BUILD_KEY_INVALID_PRIV_KEY_SIZE_ERROR`
or `CRYS_ECPKI_BUILD_KEY_INVALID_PUBL_KEY_SIZE_ERROR`,
When the key size is invalid. Found by the "ECDSA zero private parameter"
tests.
2018-11-26 15:09:00 +02:00
Arto Kinnunen bf6b90431f Sync with v1.0.0
Sync application and testcases with v1.0.0 of the master copy.
2018-11-26 15:03:39 +02:00
Ron Eldor d487c80d76 Additional fix for ccm_alt from On Target Testings
An additional fix for ccm_alt, when the message length is too big.
Check for specific error returned from CC310, and return
`MBEDTLS_ERR_CCM_BAD_INPUT`.
2018-11-26 15:02:19 +02:00
Ron Eldor 53c02d7457 Zeroize output buffer, upon authentication faliure.
Clear output buffer upon failure.
2018-11-26 15:01:02 +02:00
Ron Eldor 1aaff0e389 Return `MBEDTLS_ERR_CCM_AUTH_FAILED` where needed.
On authentication decryption, when the driver returns the relevant error,
return `MBEDTLS_ERR_CCM_AUTH_FAILED`.
2018-11-26 15:01:01 +02:00
Ron Eldor 4e7e0548d5 Fix memory overflow
Fix memory overflow, by adding a local buffer of type
`CRYS_AESCCM_Mac_Res_t `for the tag result, and copy to the input
parameter `tag`.
2018-11-26 14:59:59 +02:00
Ron Eldor 93e0f6493d Use mbedtls_platform_zeroize
Rplace calls to `mbedtls_zeroize()` to `mbedtls_platform_zeroize()`.
2018-11-26 14:57:43 +02:00
Ron Eldor 8cc8481a71 Add unsupported functions for CCM*.
Implement the CCM* functions, by returning `MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE`
2018-11-26 14:57:43 +02:00
Mikhail Maltsev 5c351dc6ae Fix C++11 build with Arm Compiler 6
Currently there are two issues which prevent building Mbed OS with
-std=gnu++11 when using Arm Compiler 6:
* NanostackRfPhys2lp.cpp contains a narrowing conversion in a braced
  initializer list
* ns_types.h includes <stdalign.h> which Arm Compiler 6 currently
  does not provide

This patch fixes both issues. The first one is fixed by changing the
underlying type of the corresponding enumeration when the code is
compiled as C++11. The second issue is worked around by avoiding the
use of <stdalign.h> header for Arm Compiler versions prior to 6.12.
2018-11-26 12:54:51 +00:00
paul-szczepanek-arm c9e8501b22 make PHY case consistent 2018-11-26 12:30:57 +00:00
Vincent Coubard d3d93e1ef9 BLE: Improve ble::Gap documentation. 2018-11-26 11:51:00 +00:00
paul-szczepanek-arm bee115c39e replace magic numbers 2018-11-26 11:31:03 +00:00
paul-szczepanek-arm f3a64feaf1 replace magic numbers 2018-11-26 11:26:26 +00:00
paul-szczepanek-arm a03aaa2342 simplify and explain swapping 2018-11-26 11:26:13 +00:00