Skip to content

[mbed-os-5.15] Network interface MAC address set/get #13920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jan 25, 2021

Conversation

artokin
Copy link
Contributor

@artokin artokin commented Nov 18, 2020

Summary of changes

Add method set_mac_address that Application can use to set MAC address to the interface.
Update get_mac_address to return MAC address correctly from EMAC.

This PR is copied from: #13902

Impact of changes

Migration actions required

Documentation


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[x] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@juhhei01 , @JarkkoPaso , @mikaleppanen , @mikter


@ciarmcom ciarmcom requested review from mikaleppanen and a team November 18, 2020 15:00
@ciarmcom
Copy link
Member

@artokin, thank you for your changes.
@mikaleppanen @ARMmbed/mbed-os-maintainers please review.

@0xc0170 0xc0170 requested a review from a team November 19, 2020 15:06
Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No tests

@mergify mergify bot added needs: CI and removed needs: review labels Nov 19, 2020
0xc0170
0xc0170 previously approved these changes Nov 19, 2020
@mergify mergify bot dismissed 0xc0170’s stale review November 20, 2020 10:28

Pull request has been modified.

@artokin
Copy link
Contributor Author

artokin commented Nov 20, 2020

Unit tests fixed and set_mac_address signature updated.

mikter
mikter previously approved these changes Nov 20, 2020
/** Set the MAC address to the interface.
*
* Provided MAC address is set the the network interface. Address must be
* set before calling the interface connect() method. EUI-48 MAC addresses
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only question here is should we mention that this must be unique globally and there are places where to get these and also that some interfaces already have an unique MAC address written in HW and this should not be called on those interfaces

Sort of own chapter on the possible hazards if this API is called without proper knowledge

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method description updated, please re-review.

@mergify mergify bot dismissed mikter’s stale review November 23, 2020 08:47

Pull request has been modified.

@artokin artokin requested a review from mikter November 23, 2020 08:47
mikter
mikter previously approved these changes Nov 23, 2020
@mergify mergify bot dismissed mikter’s stale review November 24, 2020 09:21

Pull request has been modified.

@mergify mergify bot added needs: work and removed needs: CI labels Nov 24, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Jan 20, 2021

Travis fix is on 5.15 branch, once you rebase we shall start CI

Arto Kinnunen added 13 commits January 21, 2021 10:14
Add method set_mac_address to set network interface MAC address.
Add support to set and get MAC address from EMAC interface.
Remove unnecessary method: add_ethernet_interface_ns
Use nsapi_size_t instead of size_t.
Update missing method description.
-Update method set_mac_address description
-Update EMAC test method return value
Do not fail EMAC interface during connect if MAC address change is
not supported in the selected interface.
Use path in "mbed-trace/mbed_trace.h" to keep unittest happy.
-Uncomment get_mac_address
-Document set_mac_address
-Remove Nanostack::add_ethernet_interface API change
-Add get_mac_address to MeshEthernetInterface
A new method has been added to the NetworkInterface. Therfore WICED
library needs to be rebuild for ARMC6.

Update WICED binaries for:
-MTB_ADV_WISE_1530
-MTB_MXCHIP_EMW3166
-MTB_USI_WM_BN_BM_22
@artokin artokin force-pushed the mac_address_set_get_mbed_os_5_15 branch from 1ba0f97 to 7199a3a Compare January 21, 2021 08:15
@artokin
Copy link
Contributor Author

artokin commented Jan 21, 2021

@0xc0170 , rebase is now made, would you please start the CI run.

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 21, 2021

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 21, 2021

Test run: FAILED

Summary: 1 of 10 test jobs failed
Build number : 3
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_example-test-lts

@ciarmcom ciarmcom removed the stale Stale Pull Request label Jan 21, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented Jan 22, 2021

CI restarted

@mbed-ci
Copy link

mbed-ci commented Jan 22, 2021

Test run: SUCCESS

Summary: 10 of 10 test jobs passed
Build number : 4
Build artifacts

Copy link
Collaborator

@andypowers andypowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@0xc0170 0xc0170 merged commit 9454bb0 into ARMmbed:mbed-os-5.15 Jan 25, 2021
@mergify mergify bot removed the ready for merge label Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants