+ CmLList *node;
+ WlsBlockToFree *block;
+ if(wlsBlockToFreeList[idx].count)
+ {
+ CM_LLIST_FIRST_NODE(&wlsBlockToFreeList[idx], node);
+ while(node)
+ {
+ block = (WlsBlockToFree *)node->node;
+ cmLListDelFrm(&wlsBlockToFreeList[idx], node);
+ WLS_MEM_FREE(block->ptr, block->size);
+ MAC_FREE(block, sizeof(WlsBlockToFree));
+ MAC_FREE(node, sizeof(CmLList));
+ node = NULL;
+ CM_LLIST_FIRST_NODE(&wlsBlockToFreeList[idx], node);
+ }
+ }
+}
+
+/*******************************************************************
+ *
+ * @brief Receives msg from L1
+ *
+ * @details
+ *
+ * Function :LwrMacRecvPhyMsg
+ *
+ * Functionality:
+ * Receives L1 Msg and enqueues memort for UL msg
+ *
+ * @params[in]
+ * @return
+ * ****************************************************************/
+void LwrMacRecvPhyMsg()
+{
+ uint32_t numL1Msg; /* Number of L1 messaes received */
+ uint32_t numToGet; /* Number of Memory blocks to get */
+ void *wlsHdlr; /* WLS handler */
+ uint64_t l1Msg; /* Message received */
+ void *l1MsgPtr;
+ uint32_t msgSize;
+ uint16_t msgType;
+ uint16_t flag;
+
+ wlsHdlr = mtGetWlsHdl();
+ if(WLS_Ready(wlsHdlr))
+ {
+ numToGet = WLS_Wait(wlsHdlr);
+
+ numL1Msg = numToGet;
+
+ while(numToGet)
+ {
+ l1Msg = (uint64_t) NULL;
+ l1Msg = WLS_Get(wlsHdlr, &msgSize, &msgType, &flag);
+ if(l1Msg)
+ {
+ l1MsgPtr = WLS_PA2VA(wlsHdlr, l1Msg);
+ handlePhyMessages(msgType, msgSize, l1MsgPtr);
+ }
+ numToGet--;
+ }
+
+ if(numL1Msg)
+ {
+ enqueueNBlocks(numL1Msg);
+ }
+
+ }
+} /* LwrMacRecvPhyMsg */
+
+#endif /* INTEL_WLS */
+
+/*******************************************************************
+ *
+ * @brief Sends message to PHY
+ *
+ * @details
+ *
+ * Function : LwrMacSendToPhy
+ * Functionality:
+ * -Sends message to PHY
+ *
+ * @params[in] Message Type
+ * Message Length
+ * Messaga Pointer
+ *
+ * @return void
+ *
+ * *****************************************************************/