Skip to content

Commit

Permalink
Make iwconfig channel switch cmd work.
Browse files Browse the repository at this point in the history
  • Loading branch information
maage committed Sep 21, 2015
1 parent b11a41c commit 764acc2
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions sta/sta_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -5634,12 +5634,18 @@ RtmpIoctl_rt_ioctl_siwfreq(

if (ChannelSanity(pAd, chan) == TRUE)
{
pAd->CommonCfg.Channel = chan;
/* Save the channel on MlmeAux for CntlOidRTBssidProc used. */
pAd->MlmeAux.Channel = pAd->CommonCfg.Channel;
/*save connect info*/
pAd->StaCfg.ConnectinfoChannel = pAd->CommonCfg.Channel;
DBGPRINT(RT_DEBUG_ERROR, ("==>rt_ioctl_siwfreq::SIOCSIWFREQ(Channel=%d)\n", pAd->CommonCfg.Channel));
STRING ChStr[5] = {0};
pAd->CommonCfg.Channel = chan;
/* Save the channel on MlmeAux for CntlOidRTBssidProc used. */
pAd->MlmeAux.Channel = pAd->CommonCfg.Channel;
/*save connect info*/
pAd->StaCfg.ConnectinfoChannel = pAd->CommonCfg.Channel;
DBGPRINT(RT_DEBUG_ERROR, ("==>rt_ioctl_siwfreq::SIOCSIWFREQ(Channel=%d)\n", pAd->CommonCfg.Channel));

//Update channel setting to hw
snprintf(ChStr, sizeof(ChStr), "%d", chan);
Set_Channel_Proc(pAd, ChStr);
DBGPRINT(RT_DEBUG_ERROR, ("==>rt_ioctl_siwfreq::SIOCSIWFREQ(Channel=%d) Set_Channel_Proc\n", pAd->CommonCfg.Channel));
}
else
return NDIS_STATUS_FAILURE;
Expand Down

0 comments on commit 764acc2

Please sign in to comment.