|
@@ -1133,6 +1133,20 @@ VOID LinkUp(
|
|
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_ADHOC_ON);
|
|
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_ADHOC_ON);
|
|
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_INFRA_ON);
|
|
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_INFRA_ON);
|
|
|
|
|
|
|
|
+#ifdef RT30xx
|
|
|
|
+ if ((pAd->CommonCfg.HtCapability.HtCapInfo.ChannelWidth == BW_40) &&
|
|
|
|
+ (pAd->CommonCfg.AddHTInfo.AddHtInfo.ExtChanOffset == EXTCHA_ABOVE))
|
|
|
|
+ {
|
|
|
|
+ pAd->CommonCfg.CentralChannel = pAd->CommonCfg.Channel + 2;
|
|
|
|
+ }
|
|
|
|
+ else if ((pAd->CommonCfg.Channel > 2) &&
|
|
|
|
+ (pAd->CommonCfg.HtCapability.HtCapInfo.ChannelWidth == BW_40) &&
|
|
|
|
+ (pAd->CommonCfg.AddHTInfo.AddHtInfo.ExtChanOffset == EXTCHA_BELOW))
|
|
|
|
+ {
|
|
|
|
+ pAd->CommonCfg.CentralChannel = pAd->CommonCfg.Channel - 2;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
if (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED)
|
|
if (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED)
|
|
AdhocTurnOnQos(pAd);
|
|
AdhocTurnOnQos(pAd);
|
|
|
|
|
|
@@ -1514,6 +1528,9 @@ VOID LinkUp(
|
|
pAd->MacTab.Size = 1; // infra mode always set MACtab size =1.
|
|
pAd->MacTab.Size = 1; // infra mode always set MACtab size =1.
|
|
pAd->MacTab.Content[BSSID_WCID].Sst = SST_ASSOC;
|
|
pAd->MacTab.Content[BSSID_WCID].Sst = SST_ASSOC;
|
|
pAd->MacTab.Content[BSSID_WCID].AuthState = SST_ASSOC;
|
|
pAd->MacTab.Content[BSSID_WCID].AuthState = SST_ASSOC;
|
|
|
|
+#ifdef RT30xx
|
|
|
|
+ pAd->MacTab.Content[BSSID_WCID].AuthMode = pAd->StaCfg.AuthMode;
|
|
|
|
+#endif
|
|
pAd->MacTab.Content[BSSID_WCID].WepStatus = pAd->StaCfg.WepStatus;
|
|
pAd->MacTab.Content[BSSID_WCID].WepStatus = pAd->StaCfg.WepStatus;
|
|
NdisReleaseSpinLock(&pAd->MacTabLock);
|
|
NdisReleaseSpinLock(&pAd->MacTabLock);
|
|
|
|
|
|
@@ -1637,8 +1654,15 @@ VOID LinkUp(
|
|
// Txop can only be modified when RDG is off, WMM is disable and TxBurst is enable
|
|
// Txop can only be modified when RDG is off, WMM is disable and TxBurst is enable
|
|
//
|
|
//
|
|
// if 1. Legacy AP WMM on, or 2. 11n AP, AMPDU disable. Force turn off burst no matter what bEnableTxBurst is.
|
|
// if 1. Legacy AP WMM on, or 2. 11n AP, AMPDU disable. Force turn off burst no matter what bEnableTxBurst is.
|
|
|
|
+#ifdef RT30xx
|
|
|
|
+ if (!((pAd->CommonCfg.RxStream == 1)&&(pAd->CommonCfg.TxStream == 1)) &&
|
|
|
|
+ (((pAd->StaActive.SupportedPhyInfo.bHtEnable == FALSE) && OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED))
|
|
|
|
+ || ((pAd->StaActive.SupportedPhyInfo.bHtEnable == TRUE) && (pAd->CommonCfg.BACapability.field.Policy == BA_NOTUSE))))
|
|
|
|
+#endif
|
|
|
|
+#ifndef RT30xx
|
|
if (((pAd->StaActive.SupportedPhyInfo.bHtEnable == FALSE) && (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED)))
|
|
if (((pAd->StaActive.SupportedPhyInfo.bHtEnable == FALSE) && (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED)))
|
|
|| ((pAd->StaActive.SupportedPhyInfo.bHtEnable == TRUE) && (pAd->CommonCfg.BACapability.field.Policy == BA_NOTUSE)))
|
|
|| ((pAd->StaActive.SupportedPhyInfo.bHtEnable == TRUE) && (pAd->CommonCfg.BACapability.field.Policy == BA_NOTUSE)))
|
|
|
|
+#endif
|
|
{
|
|
{
|
|
RTMP_IO_READ32(pAd, EDCA_AC0_CFG, &Data);
|
|
RTMP_IO_READ32(pAd, EDCA_AC0_CFG, &Data);
|
|
Data &= 0xFFFFFF00;
|
|
Data &= 0xFFFFFF00;
|
|
@@ -1977,6 +2001,22 @@ VOID LinkDown(
|
|
memset(wrqu.ap_addr.sa_data, 0, MAC_ADDR_LEN);
|
|
memset(wrqu.ap_addr.sa_data, 0, MAC_ADDR_LEN);
|
|
wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
|
|
wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+#ifdef RT30xx
|
|
|
|
+ if (IS_RT3090(pAd))
|
|
|
|
+ {
|
|
|
|
+ UINT32 macdata;
|
|
|
|
+ // disable MMPS BBP control register
|
|
|
|
+ RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &ByteValue);
|
|
|
|
+ ByteValue &= ~(0x04); //bit 2
|
|
|
|
+ RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, ByteValue);
|
|
|
|
+
|
|
|
|
+ // disable MMPS MAC control register
|
|
|
|
+ RTMP_IO_READ32(pAd, 0x1210, &macdata);
|
|
|
|
+ macdata &= ~(0x09); //bit 0, 3
|
|
|
|
+ RTMP_IO_WRITE32(pAd, 0x1210, macdata);
|
|
|
|
+ }
|
|
|
|
+#endif // RT30xx //
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|