Skip to content

Commit 2f61034

Browse files
author
Arto Kinnunen
committed
Review corrections
-Update method set_mac_address description -Update EMAC test method return value
1 parent d001b7a commit 2f61034

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

connectivity/netsocket/include/netsocket/NetworkInterface.h

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,21 @@ class NetworkInterface: public DNS {
103103

104104
/** Set the MAC address to the interface.
105105
*
106-
* Provided MAC address is set the the network interface. Address must be
107-
* set before calling the interface connect() method. EUI-48 MAC addresses
108-
* are used for Ethernet while Mesh interface is using 8-byte EUI-64 address.
106+
* Set the provided MAC address on the network interface. The address must
107+
* be unique globally. The address must be set before calling the interface
108+
* connect() method.
109109
*
110-
* All interfaces are not supporting MAC address set. A call to connect()
111-
* will fail if MAC address is provided but not possible to use.
110+
* Not all interfaces are supporting MAC address set. A call to connect()
111+
* method will fail if MAC address is provided but not possible to use.
112112
*
113-
* @param mac_addr Buffer containing the MAC address
114-
* @param addr_len Length of provided buffer in bytes (6 or 8 bytes)
113+
* 6-byte EUI-48 MAC addresses are used for Ethernet while Mesh interface is
114+
* using 8-byte EUI-64 address.
115+
*
116+
* More information about obtaining MAC address can be found from:
117+
* https://standards.ieee.org/products-services/regauth/index.html
118+
*
119+
* @param mac_addr Buffer containing the MAC address in hexadecimal format.
120+
* @param addr_len Length of provided buffer in bytes (6 or 8)
115121
* @retval NSAPI_ERROR_OK on success
116122
* @retval NSAPI_ERROR_UNSUPPORTED if this feature is not supported
117123
* @retval NSAPI_ERROR_PARAMETER if address is not valid

connectivity/netsocket/tests/TESTS/network/emac/emac_TestNetworkStack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ char *EmacTestNetworkStack::Interface::get_mac_address(char *buf, nsapi_size_t b
157157

158158
nsapi_error_t EmacTestNetworkStack::Interface::set_mac_address(uint8_t *buf, nsapi_size_t buflen)
159159
{
160-
return NSAPI_ERROR_OK;
160+
return NSAPI_STATUS_ERROR_UNSUPPORTED;
161161
}
162162

163163
nsapi_error_t EmacTestNetworkStack::Interface::get_ip_address(SocketAddress *address)

0 commit comments

Comments
 (0)