How to Demultiplex Management Frames
NetDev_MgmtDemux()
is called by μC/TCP-IP’s Receive task after the device’s receive function has returned a management frame. NetDev_MgmtDemux()
requires that the device driver analyses management frames received and it must performs all necessary operations. It performs the following actions:
- Determine if the management frame is a response of a previous management command sent or if it is a management frame which require the driver to update driver’s state.
- If the management frame is a response, the device’s Wireless Manager must be signaled using the function pointer
NetWiFiMgr_Signal()
. No other steps are required in that case. - If the management frame is a state update, the driver should update device’s data or interface’s link state or perform transmit complete operations.
NetDev_MgmtDemux()
setsp_err
toNET_DEV_ERR_NONE
and return from the demultiplex function.
If the management frame is only used within NetDev_MgmtDemux()
(i.e., device’s Wireless Manager not signaled), the network buffer must be freed by calling NetBuf_Free()
.