+ currMsg = (p_fapi_api_queue_elem_t)msg;
+ msgLen = currMsg->msg_len + sizeof(fapi_api_queue_elem_t);
+ addWlsBlockToFree(currMsg, msgLen, (slotIndIdx-1));
+ if(currMsg->p_next == NULLP)
+ {
+ DU_LOG("\nERROR --> LWR MAC : There cannot be only one block to send");
+ return RFAILED;
+ }
+
+ /* Sending first block */
+ ret = WLS_Put(wlsHdlr, WLS_VA2PA(wlsHdlr, currMsg), msgLen, currMsg->msg_type, WLS_SG_FIRST);
+ if(ret != 0)
+ {
+ DU_LOG("\nERROR --> LWR MAC : Failure in sending message to PHY");
+ return RFAILED;
+ }
+ currMsg = currMsg->p_next;
+
+ while(currMsg)
+ {
+ /* Sending the next msg */
+ msgLen = currMsg->msg_len + sizeof(fapi_api_queue_elem_t);
+ addWlsBlockToFree(currMsg, msgLen, (slotIndIdx-1));
+ if(currMsg->p_next != NULLP)
+ {
+ ret = WLS_Put(wlsHdlr, WLS_VA2PA(wlsHdlr, currMsg), msgLen, currMsg->msg_type, WLS_SG_NEXT);
+ if(ret != 0)
+ {
+ DU_LOG("\nERROR --> LWR MAC : Failure in sending message to PHY");
+ return RFAILED;
+ }
+ currMsg = currMsg->p_next;
+ }
+ else
+ {
+ /* Sending last msg */
+ ret = WLS_Put(wlsHdlr, WLS_VA2PA(wlsHdlr, currMsg), msgLen, currMsg->msg_type, WLS_SG_LAST);
+ if(ret != 0)
+ {
+ DU_LOG("\nERROR --> LWR MAC : Failure in sending message to PHY");
+ return RFAILED;
+ }
+ currMsg = NULLP;
+ }
+ }