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

Commit a4b31421 authored by Ashish Kumar Dhanotiya's avatar Ashish Kumar Dhanotiya
Browse files

wlan: Enable channels 12 and 13 when SET_FCC_CHANNEL is set

Currently Ch 12/13 are disabled when SET_FCC_CHANNEL is issued by
framework. To meet FCC rules and to meet requirement for
other countries regulatory reduce TxPower for channel 12/13.

This reverts I3f4e835320e61ae72821d89b3bed9924d2f40292.

Change-Id: I476ec7fcb08160e20d7f2baffe45921c34422cce
CRs-Fixed: 2757788
parent bc6d87c5
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -112,6 +112,9 @@
static tANI_BOOLEAN bRoamScanOffloadStarted = VOS_FALSE;
#endif
#define MAX_PWR_FCC_CHAN_12 8
#define MAX_PWR_FCC_CHAN_13 2
#define LE_READ_4(p) \
        ((uint32_t)\
        ((((const uint8_t *)(p))[0]) |\
@@ -660,6 +663,21 @@ eHalStatus csrUpdateChannelList(tpAniSirGlobal pMac)
        pChanList->chanParam[num_channel].pwr =
          cfgGetRegulatoryMaxTransmitPower(pMac,
                                           pScan->defaultPowerTable[i].chanId);
        if (pMac->scan.fcc_constraint)
        {
            if (pChanList->chanParam[num_channel].chanId == 12)
            {
                pChanList->chanParam[num_channel].pwr = MAX_PWR_FCC_CHAN_12;
                smsLog(pMac, LOG1,
                      "fcc_constraint is set, txpower for channel 12 is 8db ");
            }
            if (pChanList->chanParam[num_channel].chanId == 13)
            {
                pChanList->chanParam[num_channel].pwr = MAX_PWR_FCC_CHAN_13;
                smsLog(pMac, LOG1,
                      "fcc_constraint is set, txpower for channel 13 is 2db ");
            }
        }
        if (!pChanList->chanParam[num_channel].pwr)
        {
+0 −25
Original line number Diff line number Diff line
@@ -4218,31 +4218,6 @@ void csrApplyChannelPowerCountryInfo( tpAniSirGlobal pMac, tCsrChannel *pChannel
    csrSetCfgCountryCode(pMac, countryCode);
}

void csrUpdateFCCChannelList(tpAniSirGlobal pMac)
{
    tCsrChannel ChannelList;
    tANI_U8 chnlIndx = 0;
    int i;

    for ( i = 0; i < pMac->scan.base20MHzChannels.numChannels; i++ )
    {
        if (pMac->scan.fcc_constraint &&
            ((pMac->scan.base20MHzChannels.channelList[i] == 12) ||
            (pMac->scan.base20MHzChannels.channelList[i] == 13)))
        {
                    VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
                        FL("removing channel %d"),
                        pMac->scan.base20MHzChannels.channelList[i]);
            continue;
        }
        ChannelList.channelList[chnlIndx] =
        pMac->scan.base20MHzChannels.channelList[i];
        chnlIndx++;
    }
    csrSetCfgValidChannelList(pMac, ChannelList.channelList, chnlIndx);
    csrScanFilterResults(pMac);
}

void csrResetCountryInformation( tpAniSirGlobal pMac, tANI_BOOLEAN fForce, tANI_BOOLEAN updateRiva )
{
    if( fForce || (csrIs11dSupported( pMac ) && (!pMac->scan.f11dInfoReset)))
+0 −1
Original line number Diff line number Diff line
@@ -458,7 +458,6 @@ eCsrCfgDot11Mode csrGetCfgDot11ModeFromCsrPhyMode(tCsrRoamProfile *pProfile, eCs
tANI_U32 csrTranslateToWNICfgDot11Mode(tpAniSirGlobal pMac, eCsrCfgDot11Mode csrDot11Mode);
void csrSaveChannelPowerForBand( tpAniSirGlobal pMac, tANI_BOOLEAN fPopulate5GBand );
void csrApplyChannelPowerCountryInfo( tpAniSirGlobal pMac, tCsrChannel *pChannelList, tANI_U8 *countryCode, tANI_BOOLEAN updateRiva);
void csrUpdateFCCChannelList(tpAniSirGlobal pMac);
void csrApplyPower2Current( tpAniSirGlobal pMac );
void csrAssignRssiForCategory(tpAniSirGlobal pMac, tANI_S8 bestApRssi, tANI_U8 catOffset);
tANI_BOOLEAN csrIsMacAddressZero( tpAniSirGlobal pMac, tCsrBssid *pMacAddr );
+1 −1
Original line number Diff line number Diff line
@@ -14402,7 +14402,7 @@ tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal, tANI_U8 fcc_constraint,
            pMac->scan.defer_update_channel_list = true;
        } else {
            /* update the channel list to the firmware */
            csrUpdateFCCChannelList(pMac);
            csrUpdateChannelList(pMac);
        }
    }