diff options
author | Evan Lojewski <github@meklort.com> | 2020-02-24 19:15:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-24 19:15:50 -0700 |
commit | 3e7384db84d3874da1803fe3cced6cf3a87a5c63 (patch) | |
tree | f11ec180efccc7f56f88abcec7f94fb67236afcd /libs/NCSI | |
parent | 386395007c279216b0f5cfe24649e3b9ade5e393 (diff) | |
download | bcm5719-ortega-3e7384db84d3874da1803fe3cced6cf3a87a5c63.tar.gz bcm5719-ortega-3e7384db84d3874da1803fe3cced6cf3a87a5c63.zip |
ncsi: Record MAC addresses to SHM. (#40)
Diffstat (limited to 'libs/NCSI')
-rw-r--r-- | libs/NCSI/ncsi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/NCSI/ncsi.c b/libs/NCSI/ncsi.c index da90346..f29a13d 100644 --- a/libs/NCSI/ncsi.c +++ b/libs/NCSI/ncsi.c @@ -536,6 +536,13 @@ static void setMACAddressHandler(NetworkFrame_t *frame) // TODO: Handle AT. + // NC-SI has the mac starting at 1, reindex based at 0. + if(frame->setMACAddr.MACNumber > 0) + { + frame->setMACAddr.MACNumber--; + } + + uint32_t low = (frame->setMACAddr.MAC32 << 16) | frame->setMACAddr.MAC10; Network_SetMACAddr(port, frame->setMACAddr.MAC54, low, frame->setMACAddr.MACNumber, frame->setMACAddr.Enable); |