ccflags-y += -D_HIF_SDIO=1
+ccflags-y += -DRSSI_ENHANCE=0
+
ccflags-y += -DDBG=0
ccflags-y += -I$(src)/os -I$(src)/os/linux/include -I$(src)/os/linux/hif/sdio/include
ccflags-y += -I$(src)/include -I$(src)/include/nic -I$(src)/include/mgmt
kalMemCopy(prBssidEx,
&(prAdapter->rWlanInfo.arScanResult[i]),
OFFSET_OF(PARAM_BSSID_EX_T, aucIEs));
+
+#if RSSI_ENHANCE
+ BOOLEAN bInitial = FALSE;
+
+ if (!(prBssidEx->AvgRssiX8 | prBssidEx->AvgRssi))
+ {
+ bInitial = TRUE;
+ }
+
+ if (bInitial)
+ {
+ prBssidEx->AvgRssiX8 = prBssidEx->rRssi << 3;
+ prBssidEx->AvgRssi = prBssidEx->rRssi;
+ } else {
+ prBssidEx->AvgRssiX8 = (prBssidEx->AvgRssiX8 - prBssidEx->AvgRssi) + prBssidEx->rRssi;
+ //DBGLOG(REQ, WARN, ("%s:: prBssidEx->AvgRssiX8 = %d, prBssidEx->AvgRssi = %d, prBssidEx->rRssi= %d\n", __func__, prBssidEx->AvgRssiX8, prBssidEx->AvgRssi, prBssidEx->rRssi));
+ }
+ prBssidEx->AvgRssi = prBssidEx->AvgRssiX8 >> 3;
+ prBssidEx->AvgRssi +=10;
+ prBssidEx->rRssi = prBssidEx->AvgRssi;
+#endif
/*For WHQL test, Rssi should be in range -10 ~ -200 dBm*/
if(prBssidEx->rRssi > PARAM_WHQL_RSSI_MAX_DBM) {
prBssidEx->rRssi = PARAM_WHQL_RSSI_MAX_DBM;
* \retval WLAN_STATUS_ADAPTER_NOT_READY
*/
/*----------------------------------------------------------------------------*/
+#if RSSI_ENHANCE
+static int ORssi = 0;time = 2; // add by gwl
+#endif
WLAN_STATUS
wlanoidSetBssid (
IN P_ADAPTER_T prAdapter,
PARAM_RSSI rRssi;
rRssi = (PARAM_RSSI)prAdapter->rLinkQuality.cRssi; // ranged from (-128 ~ 30) in unit of dBm
-
+#if RSSI_ENHANCE
+ // add by gwl
+ rRssi += 10;
+ if (ORssi == 0) ORssi = rRssi;
+ else if ((ORssi - rRssi) > 8) {
+ if (time > 0) {
+ rRssi = ORssi;
+ time--;
+ } else {
+ time = 2;
+ ORssi = rRssi;
+ }
+ }else {
+ time = 2;
+ ORssi = rRssi;
+ }
+#endif
if(rRssi > PARAM_WHQL_RSSI_MAX_DBM)
rRssi = PARAM_WHQL_RSSI_MAX_DBM;
else if(rRssi < PARAM_WHQL_RSSI_MIN_DBM)
PARAM_SSID_T rSsid; /*!< SSID */
UINT_32 u4Privacy; /*!< Need WEP encryption */
PARAM_RSSI rRssi; /*!< in dBm */
+ PARAM_RSSI AvgRssiX8;
+ PARAM_RSSI AvgRssi;
ENUM_PARAM_NETWORK_TYPE_T eNetworkTypeInUse;
PARAM_802_11_CONFIG_T rConfiguration;
ENUM_PARAM_OP_MODE_T eOpMode;
else{
if (TRUE == fgMissing &&
CHECK_FOR_TIMEOUT(rCurrentTime, (*prMissTimeout),
- MSEC_TO_SEC(QM_RX_BA_ENTRY_MISS_TIMEOUT_MS))) {
- //DBGLOG(QM, TRACE, ("RX BA timeout, next tid %d, SSN %d\n",
- // prReorderQueParm->ucTid, prReorderedSwRfb->u2SSN));
- fgDequeuHead == TRUE;
+ //MSEC_TO_SEC(QM_RX_BA_ENTRY_MISS_TIMEOUT_MS))) {
+ MSEC_TO_SYSTIME(QM_RX_BA_ENTRY_MISS_TIMEOUT_MS))) {
+ DBGLOG(QM, TRACE, ("RX BA timeout, next tid %d, SSN %d\n",
+ prReorderQueParm->ucTid, prReorderedSwRfb->u2SSN));
+ fgDequeuHead = TRUE;
prReorderQueParm->u2WinStart = (((prReorderedSwRfb->u2SSN) + 1) % MAX_SEQ_NO_COUNT);
fgMissing = FALSE;
//DBGLOG(QM, TRACE, ("qmHandleEventBssAbsencePresence (ucNetTypeIdx=%d, fgIsAbsent=%d, FreeQuota=%d)\n",
// prEventBssStatus->ucNetTypeIdx, prBssInfo->fgIsNetAbsent, prBssInfo->ucBssFreeQuota));
- //DBGLOG(QM, TRACE, ("NAF=%d,%d,%d\n",
- // prEventBssStatus->ucNetTypeIdx, prBssInfo->fgIsNetAbsent, prBssInfo->ucBssFreeQuota));
+ DBGLOG(QM, TRACE, ("NAF=%d,%d,%d\n",
+ prEventBssStatus->ucNetTypeIdx, prBssInfo->fgIsNetAbsent, prBssInfo->ucBssFreeQuota));
if(!prBssInfo->fgIsNetAbsent) {
QM_DBG_CNT_INC(&(prAdapter->rQM),QM_DBG_CNT_27);
/*
* Marvell MV8686 driver version.
*/
-#define MT5931_DRV_VERSION "2.04"
+#define MT5931_DRV_VERSION "2.07"
#endif /* WIFI_VERSION_H */