lr-wpan: Fixes issues during MAC scan

This MR fixes some bugs found during a MLME-SCAN.request.

  • 1 issue involves an incorrect cast which causes the scanDuration to get rounded during an operation ScanDurationSymbols/SymbolRate.
  • The second issue is only visible when connecting multiple scans (For example, An energy scan followed by an Active scan)

When initiating an MLME-SCAN.request (Active scan) after the reception of an MLME-SCAN.confirm (Energy scan) the active scan will fail because the energy scan has not concluded (its control variables have not been initialized before the confirm callback).

MLME-SCAN.request(Energy)---->MLME-SCAN.confirm(energy)----->MLME-SCAN.request(active)--->MLME-SCAN.confirm(active)

See the changes in position for values:

 m_pendPrimitive = MLME_NONE;
 m_channelScanIndex = 0;
 m_scanParams = {};

Merge request reports

Loading