Skip to content

Commit 028c846

Browse files
author
Arto Kinnunen
committed
Review corrections
-Update method set_mac_address description -Update EMAC test method return value
1 parent eef0524 commit 028c846

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

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)

features/netsocket/NetworkInterface.h

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

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

0 commit comments

Comments
 (0)