Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6334d0bd authored by Sourav Mohapatra's avatar Sourav Mohapatra
Browse files

wlan: Serialize OLPC mode before sending to FW

Currently the driver sends OLPC mode to the FW without serializing
which can cause out of sync issues with the firmware. Also the FW needs
to come out of power saving mode before processing this request.

Serialize the command and bring device out of power saving mode before
sending the command.

Change-Id: I6f0ee7cdef1f841c6ee3e1db2b92e9714cd25cb6
CRs-Fixed: 2699024
parent 5cbf9dae
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -888,13 +888,7 @@ static int hdd_parse_setrmcactionperiod_command(tANI_U8 *pValue,
 */
void hdd_set_olpc_mode(tHalHandle hHal, bool low_power)
{
    tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
    if (!pMac) {
	    hddLog(LOGE, "pMac is NULL");
	    return;
    }
    sme_set_olpc_mode(pMac, low_power);
    sme_update_olpc_mode(hHal, low_power);
}
+1 −0
Original line number Diff line number Diff line
@@ -210,6 +210,7 @@ typedef struct tagSmeCmd
        struct csr_set_tx_max_pwr_per_band set_tx_max_pwr_per_band;
        tpSirUpdateChanList chan_list;
        tpRoamParams RoamParams;
        bool olpc_mode_enable;
    }u;
}tSmeCmd;

+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ typedef enum eSmeCommandType
    eSmeCommandSetMaxTxPower,
    eSmeCommandSetMaxTxPowerPerBand,
    eSmeCommandUpdateChannelList,
    eSmeCommandOlpcMode,
#ifdef FEATURE_WLAN_TDLS
    //eSmeTdlsCommandMask = 0x80000,  //To identify TDLS commands <TODO>
    //These can be considered as csr commands. 
+10 −0
Original line number Diff line number Diff line
@@ -4165,4 +4165,14 @@ struct roam_ext_params {
 */
eHalStatus sme_UpdateBlacklist(tHalHandle hHal, uint8_t session_id,
                               struct roam_ext_params *roam_params);

/**
 * sme_update_olpc_mode() - Send OLPC mode command received from user space
 * @hal: The handle returned by mac_open
 * @enable: OLPC mode enable/disable
 *
 * Return: HAL_STATUS
 */
eHalStatus sme_update_olpc_mode(tHalHandle hHal, bool enable);

#endif //#if !defined( __SME_API_H )
+5 −0
Original line number Diff line number Diff line
@@ -18969,6 +18969,11 @@ eHalStatus csrIsFullPowerNeeded( tpAniSirGlobal pMac, tSmeCmd *pCommand,
            fNeedFullPower = eANI_BOOLEAN_TRUE;
        }
        else if (pCommand->command == eSmeCommandOlpcMode)
        {
            fNeedFullPower = eANI_BOOLEAN_TRUE;
        }
        break;
    case REQUEST_STOP_UAPSD:
    case REQUEST_EXIT_WOWL:
Loading