| .. | .. |
|---|
| 5 | 5 | * |
|---|
| 6 | 6 | ******************************************************************************/ |
|---|
| 7 | 7 | |
|---|
| 8 | | -/* include files */ |
|---|
| 9 | | - |
|---|
| 10 | 8 | #include "odm_precomp.h" |
|---|
| 11 | 9 | #include "phy.h" |
|---|
| 12 | 10 | |
|---|
| .. | .. |
|---|
| 107 | 105 | {0x0a, 0x0a, 0x09, 0x07, 0x05, 0x03, 0x02, 0x01}, /* 29, -14.5dB */ |
|---|
| 108 | 106 | {0x0a, 0x09, 0x08, 0x07, 0x05, 0x03, 0x02, 0x01}, /* 30, -15.0dB */ |
|---|
| 109 | 107 | {0x09, 0x09, 0x08, 0x06, 0x05, 0x03, 0x01, 0x01}, /* 31, -15.5dB */ |
|---|
| 110 | | - {0x09, 0x08, 0x07, 0x06, 0x04, 0x03, 0x01, 0x01} /* 32, -16.0dB */ |
|---|
| 108 | + {0x09, 0x08, 0x07, 0x06, 0x04, 0x03, 0x01, 0x01} /* 32, -16.0dB */ |
|---|
| 111 | 109 | }; |
|---|
| 112 | 110 | |
|---|
| 113 | 111 | u8 CCKSwingTable_Ch14[CCK_TABLE_SIZE][8] = { |
|---|
| .. | .. |
|---|
| 193 | 191 | odm_DIG(pDM_Odm); |
|---|
| 194 | 192 | odm_CCKPacketDetectionThresh(pDM_Odm); |
|---|
| 195 | 193 | |
|---|
| 196 | | - if (*(pDM_Odm->pbPowerSaving)) |
|---|
| 194 | + if (*pDM_Odm->pbPowerSaving) |
|---|
| 197 | 195 | return; |
|---|
| 198 | 196 | |
|---|
| 199 | 197 | odm_RefreshRateAdaptiveMask(pDM_Odm); |
|---|
| .. | .. |
|---|
| 209 | 207 | |
|---|
| 210 | 208 | void ODM_CmnInfoPtrArrayHook(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def CmnInfo, u16 Index, void *pValue) |
|---|
| 211 | 209 | { |
|---|
| 212 | | - /* Hook call by reference pointer. */ |
|---|
| 213 | | - switch (CmnInfo) { |
|---|
| 214 | | - /* Dynamic call by reference pointer. */ |
|---|
| 215 | | - case ODM_CMNINFO_STA_STATUS: |
|---|
| 210 | + if (CmnInfo == ODM_CMNINFO_STA_STATUS) |
|---|
| 216 | 211 | pDM_Odm->pODM_StaInfo[Index] = (struct sta_info *)pValue; |
|---|
| 217 | | - break; |
|---|
| 218 | | - /* To remove the compiler warning, must add an empty default statement to handle the other values. */ |
|---|
| 219 | | - default: |
|---|
| 220 | | - /* do nothing */ |
|---|
| 221 | | - break; |
|---|
| 222 | | - } |
|---|
| 223 | 212 | } |
|---|
| 224 | 213 | |
|---|
| 225 | 214 | void odm_CommonInfoSelfInit(struct odm_dm_struct *pDM_Odm) |
|---|
| .. | .. |
|---|
| 238 | 227 | u8 i; |
|---|
| 239 | 228 | struct sta_info *pEntry; |
|---|
| 240 | 229 | |
|---|
| 241 | | - if (*(pDM_Odm->pBandWidth) == ODM_BW40M) { |
|---|
| 242 | | - if (*(pDM_Odm->pSecChOffset) == 1) |
|---|
| 243 | | - pDM_Odm->ControlChannel = *(pDM_Odm->pChannel) - 2; |
|---|
| 244 | | - else if (*(pDM_Odm->pSecChOffset) == 2) |
|---|
| 245 | | - pDM_Odm->ControlChannel = *(pDM_Odm->pChannel) + 2; |
|---|
| 230 | + if (*pDM_Odm->pBandWidth == ODM_BW40M) { |
|---|
| 231 | + if (*pDM_Odm->pSecChOffset == 1) |
|---|
| 232 | + pDM_Odm->ControlChannel = *pDM_Odm->pChannel - 2; |
|---|
| 233 | + else if (*pDM_Odm->pSecChOffset == 2) |
|---|
| 234 | + pDM_Odm->ControlChannel = *pDM_Odm->pChannel + 2; |
|---|
| 246 | 235 | } else { |
|---|
| 247 | | - pDM_Odm->ControlChannel = *(pDM_Odm->pChannel); |
|---|
| 236 | + pDM_Odm->ControlChannel = *pDM_Odm->pChannel; |
|---|
| 248 | 237 | } |
|---|
| 249 | 238 | |
|---|
| 250 | 239 | for (i = 0; i < ODM_ASSOCIATE_ENTRY_NUM; i++) { |
|---|
| .. | .. |
|---|
| 260 | 249 | |
|---|
| 261 | 250 | void odm_CmnInfoInit_Debug(struct odm_dm_struct *pDM_Odm) |
|---|
| 262 | 251 | { |
|---|
| 263 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("odm_CmnInfoInit_Debug==>\n")); |
|---|
| 252 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("%s==>\n", __func__)); |
|---|
| 264 | 253 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("SupportPlatform=%d\n", pDM_Odm->SupportPlatform)); |
|---|
| 265 | 254 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("SupportAbility=0x%x\n", pDM_Odm->SupportAbility)); |
|---|
| 266 | 255 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("SupportInterface=%d\n", pDM_Odm->SupportInterface)); |
|---|
| .. | .. |
|---|
| 278 | 267 | |
|---|
| 279 | 268 | void odm_CmnInfoHook_Debug(struct odm_dm_struct *pDM_Odm) |
|---|
| 280 | 269 | { |
|---|
| 281 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("odm_CmnInfoHook_Debug==>\n")); |
|---|
| 282 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pNumTxBytesUnicast=%llu\n", *(pDM_Odm->pNumTxBytesUnicast))); |
|---|
| 283 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pNumRxBytesUnicast=%llu\n", *(pDM_Odm->pNumRxBytesUnicast))); |
|---|
| 284 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pWirelessMode=0x%x\n", *(pDM_Odm->pWirelessMode))); |
|---|
| 285 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pSecChOffset=%d\n", *(pDM_Odm->pSecChOffset))); |
|---|
| 286 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pSecurity=%d\n", *(pDM_Odm->pSecurity))); |
|---|
| 287 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pBandWidth=%d\n", *(pDM_Odm->pBandWidth))); |
|---|
| 288 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pChannel=%d\n", *(pDM_Odm->pChannel))); |
|---|
| 270 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("%s==>\n", __func__)); |
|---|
| 271 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pNumTxBytesUnicast=%llu\n", *pDM_Odm->pNumTxBytesUnicast)); |
|---|
| 272 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pNumRxBytesUnicast=%llu\n", *pDM_Odm->pNumRxBytesUnicast)); |
|---|
| 273 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pWirelessMode=0x%x\n", *pDM_Odm->pWirelessMode)); |
|---|
| 274 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pSecChOffset=%d\n", *pDM_Odm->pSecChOffset)); |
|---|
| 275 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pSecurity=%d\n", *pDM_Odm->pSecurity)); |
|---|
| 276 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pBandWidth=%d\n", *pDM_Odm->pBandWidth)); |
|---|
| 277 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pChannel=%d\n", *pDM_Odm->pChannel)); |
|---|
| 289 | 278 | |
|---|
| 290 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pbScanInProcess=%d\n", *(pDM_Odm->pbScanInProcess))); |
|---|
| 291 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pbPowerSaving=%d\n", *(pDM_Odm->pbPowerSaving))); |
|---|
| 279 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pbScanInProcess=%d\n", *pDM_Odm->pbScanInProcess)); |
|---|
| 280 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pbPowerSaving=%d\n", *pDM_Odm->pbPowerSaving)); |
|---|
| 292 | 281 | } |
|---|
| 293 | 282 | |
|---|
| 294 | 283 | void odm_CmnInfoUpdate_Debug(struct odm_dm_struct *pDM_Odm) |
|---|
| 295 | 284 | { |
|---|
| 296 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("odm_CmnInfoUpdate_Debug==>\n")); |
|---|
| 285 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("%s==>\n", __func__)); |
|---|
| 297 | 286 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("bWIFI_Direct=%d\n", pDM_Odm->bWIFI_Direct)); |
|---|
| 298 | 287 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("bWIFI_Display=%d\n", pDM_Odm->bWIFI_Display)); |
|---|
| 299 | 288 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("bLinked=%d\n", pDM_Odm->bLinked)); |
|---|
| .. | .. |
|---|
| 350 | 339 | u8 dm_dig_max, dm_dig_min; |
|---|
| 351 | 340 | u8 CurrentIGI = pDM_DigTable->CurIGValue; |
|---|
| 352 | 341 | |
|---|
| 353 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG()==>\n")); |
|---|
| 354 | | - if ((!(pDM_Odm->SupportAbility&ODM_BB_DIG)) || (!(pDM_Odm->SupportAbility&ODM_BB_FA_CNT))) { |
|---|
| 342 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s()==>\n", __func__)); |
|---|
| 343 | + if ((!(pDM_Odm->SupportAbility & ODM_BB_DIG)) || (!(pDM_Odm->SupportAbility & ODM_BB_FA_CNT))) { |
|---|
| 355 | 344 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, |
|---|
| 356 | | - ("odm_DIG() Return: SupportAbility ODM_BB_DIG or ODM_BB_FA_CNT is disabled\n")); |
|---|
| 345 | + ("%s() Return: SupportAbility ODM_BB_DIG or ODM_BB_FA_CNT is disabled\n", __func__)); |
|---|
| 357 | 346 | return; |
|---|
| 358 | 347 | } |
|---|
| 359 | 348 | |
|---|
| 360 | | - if (*(pDM_Odm->pbScanInProcess)) { |
|---|
| 361 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG() Return: In Scan Progress\n")); |
|---|
| 349 | + if (*pDM_Odm->pbScanInProcess) { |
|---|
| 350 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s() Return: In Scan Progress\n", __func__)); |
|---|
| 362 | 351 | return; |
|---|
| 363 | 352 | } |
|---|
| 364 | 353 | |
|---|
| 365 | 354 | /* add by Neil Chen to avoid PSD is processing */ |
|---|
| 366 | 355 | if (!pDM_Odm->bDMInitialGainEnable) { |
|---|
| 367 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG() Return: PSD is Processing\n")); |
|---|
| 356 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s() Return: PSD is Processing\n", __func__)); |
|---|
| 368 | 357 | return; |
|---|
| 369 | 358 | } |
|---|
| 370 | 359 | |
|---|
| .. | .. |
|---|
| 394 | 383 | else |
|---|
| 395 | 384 | DIG_Dynamic_MIN = pDM_Odm->RSSI_Min; |
|---|
| 396 | 385 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, |
|---|
| 397 | | - ("odm_DIG() : bOneEntryOnly=true, DIG_Dynamic_MIN=0x%x\n", |
|---|
| 398 | | - DIG_Dynamic_MIN)); |
|---|
| 386 | + ("%s() : bOneEntryOnly=true, DIG_Dynamic_MIN=0x%x\n", |
|---|
| 387 | + __func__, DIG_Dynamic_MIN)); |
|---|
| 399 | 388 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, |
|---|
| 400 | | - ("odm_DIG() : pDM_Odm->RSSI_Min=%d\n", |
|---|
| 401 | | - pDM_Odm->RSSI_Min)); |
|---|
| 389 | + ("%s() : pDM_Odm->RSSI_Min=%d\n", |
|---|
| 390 | + __func__, pDM_Odm->RSSI_Min)); |
|---|
| 402 | 391 | } else if (pDM_Odm->SupportAbility & ODM_BB_ANT_DIV) { |
|---|
| 403 | 392 | /* 1 Lower Bound for 88E AntDiv */ |
|---|
| 404 | 393 | if (pDM_Odm->AntDivType == CG_TRX_HW_ANTDIV) { |
|---|
| 405 | 394 | DIG_Dynamic_MIN = (u8)pDM_DigTable->AntDiv_RSSI_max; |
|---|
| 406 | 395 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_ANT_DIV, ODM_DBG_LOUD, |
|---|
| 407 | | - ("odm_DIG(): pDM_DigTable->AntDiv_RSSI_max=%d\n", |
|---|
| 408 | | - pDM_DigTable->AntDiv_RSSI_max)); |
|---|
| 396 | + ("%s(): pDM_DigTable->AntDiv_RSSI_max=%d\n", |
|---|
| 397 | + __func__, pDM_DigTable->AntDiv_RSSI_max)); |
|---|
| 409 | 398 | } |
|---|
| 410 | 399 | } else { |
|---|
| 411 | 400 | DIG_Dynamic_MIN = dm_dig_min; |
|---|
| .. | .. |
|---|
| 413 | 402 | } else { |
|---|
| 414 | 403 | pDM_DigTable->rx_gain_range_max = dm_dig_max; |
|---|
| 415 | 404 | DIG_Dynamic_MIN = dm_dig_min; |
|---|
| 416 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG() : No Link\n")); |
|---|
| 405 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s() : No Link\n", __func__)); |
|---|
| 417 | 406 | } |
|---|
| 418 | 407 | |
|---|
| 419 | 408 | /* 1 Modify DIG lower bound, deal with abnormally large false alarm */ |
|---|
| 420 | 409 | if (pFalseAlmCnt->Cnt_all > 10000) { |
|---|
| 421 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("dm_DIG(): Abnornally false alarm case.\n")); |
|---|
| 410 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("dm_DIG(): Abnormally false alarm case.\n")); |
|---|
| 422 | 411 | |
|---|
| 423 | 412 | if (pDM_DigTable->LargeFAHit != 3) |
|---|
| 424 | 413 | pDM_DigTable->LargeFAHit++; |
|---|
| .. | .. |
|---|
| 428 | 417 | } |
|---|
| 429 | 418 | |
|---|
| 430 | 419 | if (pDM_DigTable->LargeFAHit >= 3) { |
|---|
| 431 | | - if ((pDM_DigTable->ForbiddenIGI+1) > pDM_DigTable->rx_gain_range_max) |
|---|
| 420 | + if ((pDM_DigTable->ForbiddenIGI + 1) > pDM_DigTable->rx_gain_range_max) |
|---|
| 432 | 421 | pDM_DigTable->rx_gain_range_min = pDM_DigTable->rx_gain_range_max; |
|---|
| 433 | 422 | else |
|---|
| 434 | 423 | pDM_DigTable->rx_gain_range_min = (pDM_DigTable->ForbiddenIGI + 1); |
|---|
| .. | .. |
|---|
| 441 | 430 | pDM_DigTable->Recover_cnt--; |
|---|
| 442 | 431 | } else { |
|---|
| 443 | 432 | if (pDM_DigTable->LargeFAHit < 3) { |
|---|
| 444 | | - if ((pDM_DigTable->ForbiddenIGI-1) < DIG_Dynamic_MIN) { /* DM_DIG_MIN) */ |
|---|
| 433 | + if ((pDM_DigTable->ForbiddenIGI - 1) < DIG_Dynamic_MIN) { /* DM_DIG_MIN) */ |
|---|
| 445 | 434 | pDM_DigTable->ForbiddenIGI = DIG_Dynamic_MIN; /* DM_DIG_MIN; */ |
|---|
| 446 | 435 | pDM_DigTable->rx_gain_range_min = DIG_Dynamic_MIN; /* DM_DIG_MIN; */ |
|---|
| 447 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): Normal Case: At Lower Bound\n")); |
|---|
| 436 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s(): Normal Case: At Lower Bound\n", __func__)); |
|---|
| 448 | 437 | } else { |
|---|
| 449 | 438 | pDM_DigTable->ForbiddenIGI--; |
|---|
| 450 | 439 | pDM_DigTable->rx_gain_range_min = (pDM_DigTable->ForbiddenIGI + 1); |
|---|
| 451 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): Normal Case: Approach Lower Bound\n")); |
|---|
| 440 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s(): Normal Case: Approach Lower Bound\n", __func__)); |
|---|
| 452 | 441 | } |
|---|
| 453 | 442 | } else { |
|---|
| 454 | 443 | pDM_DigTable->LargeFAHit = 0; |
|---|
| .. | .. |
|---|
| 456 | 445 | } |
|---|
| 457 | 446 | } |
|---|
| 458 | 447 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, |
|---|
| 459 | | - ("odm_DIG(): pDM_DigTable->LargeFAHit=%d\n", |
|---|
| 460 | | - pDM_DigTable->LargeFAHit)); |
|---|
| 448 | + ("%s(): pDM_DigTable->LargeFAHit=%d\n", |
|---|
| 449 | + __func__, pDM_DigTable->LargeFAHit)); |
|---|
| 461 | 450 | |
|---|
| 462 | 451 | /* 1 Adjust initial gain by false alarm */ |
|---|
| 463 | 452 | if (pDM_Odm->bLinked) { |
|---|
| 464 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): DIG AfterLink\n")); |
|---|
| 453 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s(): DIG AfterLink\n", __func__)); |
|---|
| 465 | 454 | if (FirstConnect) { |
|---|
| 466 | 455 | CurrentIGI = pDM_Odm->RSSI_Min; |
|---|
| 467 | 456 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("DIG: First Connect\n")); |
|---|
| .. | .. |
|---|
| 474 | 463 | CurrentIGI = CurrentIGI - 2;/* pDM_DigTable->CurIGValue =pDM_DigTable->PreIGValue-1; */ |
|---|
| 475 | 464 | } |
|---|
| 476 | 465 | } else { |
|---|
| 477 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): DIG BeforeLink\n")); |
|---|
| 466 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s(): DIG BeforeLink\n", __func__)); |
|---|
| 478 | 467 | if (FirstDisConnect) { |
|---|
| 479 | 468 | CurrentIGI = pDM_DigTable->rx_gain_range_min; |
|---|
| 480 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): First DisConnect\n")); |
|---|
| 469 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s(): First DisConnect\n", __func__)); |
|---|
| 481 | 470 | } else { |
|---|
| 482 | 471 | /* 2012.03.30 LukeLee: enable DIG before link but with very high thresholds */ |
|---|
| 483 | 472 | if (pFalseAlmCnt->Cnt_all > 10000) |
|---|
| .. | .. |
|---|
| 486 | 475 | CurrentIGI = CurrentIGI + 1;/* pDM_DigTable->CurIGValue = pDM_DigTable->PreIGValue+1; */ |
|---|
| 487 | 476 | else if (pFalseAlmCnt->Cnt_all < 500) |
|---|
| 488 | 477 | CurrentIGI = CurrentIGI - 1;/* pDM_DigTable->CurIGValue =pDM_DigTable->PreIGValue-1; */ |
|---|
| 489 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): England DIG\n")); |
|---|
| 478 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s(): England DIG\n", __func__)); |
|---|
| 490 | 479 | } |
|---|
| 491 | 480 | } |
|---|
| 492 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): DIG End Adjust IGI\n")); |
|---|
| 481 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s(): DIG End Adjust IGI\n", __func__)); |
|---|
| 493 | 482 | /* 1 Check initial gain by upper/lower bound */ |
|---|
| 494 | 483 | if (CurrentIGI > pDM_DigTable->rx_gain_range_max) |
|---|
| 495 | 484 | CurrentIGI = pDM_DigTable->rx_gain_range_max; |
|---|
| .. | .. |
|---|
| 497 | 486 | CurrentIGI = pDM_DigTable->rx_gain_range_min; |
|---|
| 498 | 487 | |
|---|
| 499 | 488 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, |
|---|
| 500 | | - ("odm_DIG(): rx_gain_range_max=0x%x, rx_gain_range_min=0x%x\n", |
|---|
| 501 | | - pDM_DigTable->rx_gain_range_max, pDM_DigTable->rx_gain_range_min)); |
|---|
| 502 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): TotalFA=%d\n", pFalseAlmCnt->Cnt_all)); |
|---|
| 503 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): CurIGValue=0x%x\n", CurrentIGI)); |
|---|
| 489 | + ("%s(): rx_gain_range_max=0x%x, rx_gain_range_min=0x%x\n", |
|---|
| 490 | + __func__, pDM_DigTable->rx_gain_range_max, pDM_DigTable->rx_gain_range_min)); |
|---|
| 491 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s(): TotalFA=%d\n", __func__, pFalseAlmCnt->Cnt_all)); |
|---|
| 492 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("%s(): CurIGValue=0x%x\n", __func__, CurrentIGI)); |
|---|
| 504 | 493 | |
|---|
| 505 | 494 | /* 2 High power RSSI threshold */ |
|---|
| 506 | 495 | |
|---|
| .. | .. |
|---|
| 517 | 506 | { |
|---|
| 518 | 507 | struct adapter *adapter = pDM_Odm->Adapter; |
|---|
| 519 | 508 | u32 ret_value; |
|---|
| 520 | | - struct false_alarm_stats *FalseAlmCnt = &(pDM_Odm->FalseAlmCnt); |
|---|
| 509 | + struct false_alarm_stats *FalseAlmCnt = &pDM_Odm->FalseAlmCnt; |
|---|
| 521 | 510 | |
|---|
| 522 | 511 | if (!(pDM_Odm->SupportAbility & ODM_BB_FA_CNT)) |
|---|
| 523 | 512 | return; |
|---|
| .. | .. |
|---|
| 527 | 516 | phy_set_bb_reg(adapter, ODM_REG_OFDM_FA_RSTD_11N, BIT(31), 1); /* hold page D counter */ |
|---|
| 528 | 517 | |
|---|
| 529 | 518 | ret_value = phy_query_bb_reg(adapter, ODM_REG_OFDM_FA_TYPE1_11N, bMaskDWord); |
|---|
| 530 | | - FalseAlmCnt->Cnt_Fast_Fsync = (ret_value&0xffff); |
|---|
| 531 | | - FalseAlmCnt->Cnt_SB_Search_fail = (ret_value & 0xffff0000)>>16; |
|---|
| 519 | + FalseAlmCnt->Cnt_Fast_Fsync = (ret_value & 0xffff); |
|---|
| 520 | + FalseAlmCnt->Cnt_SB_Search_fail = (ret_value & 0xffff0000) >> 16; |
|---|
| 532 | 521 | ret_value = phy_query_bb_reg(adapter, ODM_REG_OFDM_FA_TYPE2_11N, bMaskDWord); |
|---|
| 533 | | - FalseAlmCnt->Cnt_OFDM_CCA = (ret_value&0xffff); |
|---|
| 534 | | - FalseAlmCnt->Cnt_Parity_Fail = (ret_value & 0xffff0000)>>16; |
|---|
| 522 | + FalseAlmCnt->Cnt_OFDM_CCA = (ret_value & 0xffff); |
|---|
| 523 | + FalseAlmCnt->Cnt_Parity_Fail = (ret_value & 0xffff0000) >> 16; |
|---|
| 535 | 524 | ret_value = phy_query_bb_reg(adapter, ODM_REG_OFDM_FA_TYPE3_11N, bMaskDWord); |
|---|
| 536 | | - FalseAlmCnt->Cnt_Rate_Illegal = (ret_value&0xffff); |
|---|
| 537 | | - FalseAlmCnt->Cnt_Crc8_fail = (ret_value & 0xffff0000)>>16; |
|---|
| 525 | + FalseAlmCnt->Cnt_Rate_Illegal = (ret_value & 0xffff); |
|---|
| 526 | + FalseAlmCnt->Cnt_Crc8_fail = (ret_value & 0xffff0000) >> 16; |
|---|
| 538 | 527 | ret_value = phy_query_bb_reg(adapter, ODM_REG_OFDM_FA_TYPE4_11N, bMaskDWord); |
|---|
| 539 | | - FalseAlmCnt->Cnt_Mcs_fail = (ret_value&0xffff); |
|---|
| 528 | + FalseAlmCnt->Cnt_Mcs_fail = (ret_value & 0xffff); |
|---|
| 540 | 529 | |
|---|
| 541 | 530 | FalseAlmCnt->Cnt_Ofdm_fail = FalseAlmCnt->Cnt_Parity_Fail + FalseAlmCnt->Cnt_Rate_Illegal + |
|---|
| 542 | 531 | FalseAlmCnt->Cnt_Crc8_fail + FalseAlmCnt->Cnt_Mcs_fail + |
|---|
| 543 | 532 | FalseAlmCnt->Cnt_Fast_Fsync + FalseAlmCnt->Cnt_SB_Search_fail; |
|---|
| 544 | 533 | |
|---|
| 545 | 534 | ret_value = phy_query_bb_reg(adapter, ODM_REG_SC_CNT_11N, bMaskDWord); |
|---|
| 546 | | - FalseAlmCnt->Cnt_BW_LSC = (ret_value&0xffff); |
|---|
| 547 | | - FalseAlmCnt->Cnt_BW_USC = (ret_value & 0xffff0000)>>16; |
|---|
| 535 | + FalseAlmCnt->Cnt_BW_LSC = (ret_value & 0xffff); |
|---|
| 536 | + FalseAlmCnt->Cnt_BW_USC = (ret_value & 0xffff0000) >> 16; |
|---|
| 548 | 537 | |
|---|
| 549 | 538 | /* hold cck counter */ |
|---|
| 550 | 539 | phy_set_bb_reg(adapter, ODM_REG_CCK_FA_RST_11N, BIT(12), 1); |
|---|
| .. | .. |
|---|
| 553 | 542 | ret_value = phy_query_bb_reg(adapter, ODM_REG_CCK_FA_LSB_11N, bMaskByte0); |
|---|
| 554 | 543 | FalseAlmCnt->Cnt_Cck_fail = ret_value; |
|---|
| 555 | 544 | ret_value = phy_query_bb_reg(adapter, ODM_REG_CCK_FA_MSB_11N, bMaskByte3); |
|---|
| 556 | | - FalseAlmCnt->Cnt_Cck_fail += (ret_value & 0xff)<<8; |
|---|
| 545 | + FalseAlmCnt->Cnt_Cck_fail += (ret_value & 0xff) << 8; |
|---|
| 557 | 546 | |
|---|
| 558 | 547 | ret_value = phy_query_bb_reg(adapter, ODM_REG_CCK_CCA_CNT_11N, bMaskDWord); |
|---|
| 559 | | - FalseAlmCnt->Cnt_CCK_CCA = ((ret_value&0xFF)<<8) | ((ret_value&0xFF00)>>8); |
|---|
| 548 | + FalseAlmCnt->Cnt_CCK_CCA = ((ret_value & 0xFF) << 8) | ((ret_value & 0xFF00) >> 8); |
|---|
| 560 | 549 | |
|---|
| 561 | 550 | FalseAlmCnt->Cnt_all = (FalseAlmCnt->Cnt_Fast_Fsync + |
|---|
| 562 | 551 | FalseAlmCnt->Cnt_SB_Search_fail + |
|---|
| .. | .. |
|---|
| 568 | 557 | |
|---|
| 569 | 558 | FalseAlmCnt->Cnt_CCA_all = FalseAlmCnt->Cnt_OFDM_CCA + FalseAlmCnt->Cnt_CCK_CCA; |
|---|
| 570 | 559 | |
|---|
| 571 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_FA_CNT, ODM_DBG_LOUD, ("Enter odm_FalseAlarmCounterStatistics\n")); |
|---|
| 560 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_FA_CNT, ODM_DBG_LOUD, ("Enter %s\n", __func__)); |
|---|
| 572 | 561 | ODM_RT_TRACE(pDM_Odm, ODM_COMP_FA_CNT, ODM_DBG_LOUD, |
|---|
| 573 | 562 | ("Cnt_Fast_Fsync=%d, Cnt_SB_Search_fail=%d\n", |
|---|
| 574 | 563 | FalseAlmCnt->Cnt_Fast_Fsync, FalseAlmCnt->Cnt_SB_Search_fail)); |
|---|
| .. | .. |
|---|
| 590 | 579 | void odm_CCKPacketDetectionThresh(struct odm_dm_struct *pDM_Odm) |
|---|
| 591 | 580 | { |
|---|
| 592 | 581 | u8 CurCCK_CCAThres; |
|---|
| 593 | | - struct false_alarm_stats *FalseAlmCnt = &(pDM_Odm->FalseAlmCnt); |
|---|
| 582 | + struct false_alarm_stats *FalseAlmCnt = &pDM_Odm->FalseAlmCnt; |
|---|
| 594 | 583 | |
|---|
| 595 | | - if (!(pDM_Odm->SupportAbility & (ODM_BB_CCK_PD|ODM_BB_FA_CNT))) |
|---|
| 584 | + if (!(pDM_Odm->SupportAbility & (ODM_BB_CCK_PD | ODM_BB_FA_CNT))) |
|---|
| 596 | 585 | return; |
|---|
| 597 | 586 | if (pDM_Odm->ExtLNA) |
|---|
| 598 | 587 | return; |
|---|
| 599 | 588 | if (pDM_Odm->bLinked) { |
|---|
| 600 | 589 | if (pDM_Odm->RSSI_Min > 25) { |
|---|
| 601 | 590 | CurCCK_CCAThres = 0xcd; |
|---|
| 602 | | - } else if ((pDM_Odm->RSSI_Min <= 25) && (pDM_Odm->RSSI_Min > 10)) { |
|---|
| 591 | + } else if (pDM_Odm->RSSI_Min > 10) { |
|---|
| 603 | 592 | CurCCK_CCAThres = 0x83; |
|---|
| 604 | 593 | } else { |
|---|
| 605 | 594 | if (FalseAlmCnt->Cnt_Cck_fail > 1000) |
|---|
| .. | .. |
|---|
| 639 | 628 | Rssi_Low_bound = 45; |
|---|
| 640 | 629 | } |
|---|
| 641 | 630 | if (pDM_PSTable->initialize == 0) { |
|---|
| 642 | | - pDM_PSTable->Reg874 = (phy_query_bb_reg(adapter, 0x874, bMaskDWord)&0x1CC000)>>14; |
|---|
| 643 | | - pDM_PSTable->RegC70 = (phy_query_bb_reg(adapter, 0xc70, bMaskDWord) & BIT(3))>>3; |
|---|
| 644 | | - pDM_PSTable->Reg85C = (phy_query_bb_reg(adapter, 0x85c, bMaskDWord)&0xFF000000)>>24; |
|---|
| 645 | | - pDM_PSTable->RegA74 = (phy_query_bb_reg(adapter, 0xa74, bMaskDWord)&0xF000)>>12; |
|---|
| 631 | + pDM_PSTable->Reg874 = (phy_query_bb_reg(adapter, 0x874, bMaskDWord) & 0x1CC000) >> 14; |
|---|
| 632 | + pDM_PSTable->RegC70 = (phy_query_bb_reg(adapter, 0xc70, bMaskDWord) & BIT(3)) >> 3; |
|---|
| 633 | + pDM_PSTable->Reg85C = (phy_query_bb_reg(adapter, 0x85c, bMaskDWord) & 0xFF000000) >> 24; |
|---|
| 634 | + pDM_PSTable->RegA74 = (phy_query_bb_reg(adapter, 0xa74, bMaskDWord) & 0xF000) >> 12; |
|---|
| 646 | 635 | pDM_PSTable->initialize = 1; |
|---|
| 647 | 636 | } |
|---|
| 648 | 637 | |
|---|
| .. | .. |
|---|
| 727 | 716 | else |
|---|
| 728 | 717 | rate_bitmap = 0x0000000f; |
|---|
| 729 | 718 | break; |
|---|
| 730 | | - case (ODM_WM_A|ODM_WM_G): |
|---|
| 719 | + case (ODM_WM_A | ODM_WM_G): |
|---|
| 731 | 720 | if (rssi_level == DM_RATR_STA_HIGH) |
|---|
| 732 | 721 | rate_bitmap = 0x00000f00; |
|---|
| 733 | 722 | else |
|---|
| 734 | 723 | rate_bitmap = 0x00000ff0; |
|---|
| 735 | 724 | break; |
|---|
| 736 | | - case (ODM_WM_B|ODM_WM_G): |
|---|
| 725 | + case (ODM_WM_B | ODM_WM_G): |
|---|
| 737 | 726 | if (rssi_level == DM_RATR_STA_HIGH) |
|---|
| 738 | 727 | rate_bitmap = 0x00000f00; |
|---|
| 739 | 728 | else if (rssi_level == DM_RATR_STA_MIDDLE) |
|---|
| .. | .. |
|---|
| 741 | 730 | else |
|---|
| 742 | 731 | rate_bitmap = 0x00000ff5; |
|---|
| 743 | 732 | break; |
|---|
| 744 | | - case (ODM_WM_B|ODM_WM_G|ODM_WM_N24G): |
|---|
| 745 | | - case (ODM_WM_A|ODM_WM_B|ODM_WM_G|ODM_WM_N24G): |
|---|
| 733 | + case (ODM_WM_B | ODM_WM_G | ODM_WM_N24G): |
|---|
| 734 | + case (ODM_WM_A | ODM_WM_B | ODM_WM_G | ODM_WM_N24G): |
|---|
| 746 | 735 | if (rssi_level == DM_RATR_STA_HIGH) { |
|---|
| 747 | 736 | rate_bitmap = 0x000f0000; |
|---|
| 748 | 737 | } else if (rssi_level == DM_RATR_STA_MIDDLE) { |
|---|
| 749 | 738 | rate_bitmap = 0x000ff000; |
|---|
| 750 | 739 | } else { |
|---|
| 751 | | - if (*(pDM_Odm->pBandWidth) == ODM_BW40M) |
|---|
| 740 | + if (*pDM_Odm->pBandWidth == ODM_BW40M) |
|---|
| 752 | 741 | rate_bitmap = 0x000ff015; |
|---|
| 753 | 742 | else |
|---|
| 754 | 743 | rate_bitmap = 0x000ff005; |
|---|
| .. | .. |
|---|
| 768 | 757 | return rate_bitmap; |
|---|
| 769 | 758 | } |
|---|
| 770 | 759 | |
|---|
| 771 | | -/*----------------------------------------------------------------------------- |
|---|
| 772 | | - * Function: odm_RefreshRateAdaptiveMask() |
|---|
| 773 | | - * |
|---|
| 774 | | - * Overview: Update rate table mask according to rssi |
|---|
| 775 | | - * |
|---|
| 776 | | - * Input: NONE |
|---|
| 777 | | - * |
|---|
| 778 | | - * Output: NONE |
|---|
| 779 | | - * |
|---|
| 780 | | - * Return: NONE |
|---|
| 781 | | - * |
|---|
| 782 | | - * Revised History: |
|---|
| 783 | | - * When Who Remark |
|---|
| 784 | | - * 05/27/2009 hpfan Create Version 0. |
|---|
| 785 | | - * |
|---|
| 786 | | - *---------------------------------------------------------------------------*/ |
|---|
| 760 | +/* Update rate table mask according to rssi */ |
|---|
| 787 | 761 | void odm_RefreshRateAdaptiveMask(struct odm_dm_struct *pDM_Odm) |
|---|
| 788 | 762 | { |
|---|
| 789 | 763 | if (!(pDM_Odm->SupportAbility & ODM_BB_RA_MASK)) |
|---|
| .. | .. |
|---|
| 855 | 829 | } |
|---|
| 856 | 830 | |
|---|
| 857 | 831 | /* Decide RATRState by RSSI. */ |
|---|
| 858 | | - if (RSSI > HighRSSIThreshForRA) |
|---|
| 832 | + if (HighRSSIThreshForRA < RSSI) |
|---|
| 859 | 833 | RATRState = DM_RATR_STA_HIGH; |
|---|
| 860 | | - else if (RSSI > LowRSSIThreshForRA) |
|---|
| 834 | + else if (LowRSSIThreshForRA < RSSI) |
|---|
| 861 | 835 | RATRState = DM_RATR_STA_MIDDLE; |
|---|
| 862 | 836 | else |
|---|
| 863 | 837 | RATRState = DM_RATR_STA_LOW; |
|---|
| .. | .. |
|---|
| 935 | 909 | if (psta->rssi_stat.UndecoratedSmoothedPWDB > tmpEntryMaxPWDB) |
|---|
| 936 | 910 | tmpEntryMaxPWDB = psta->rssi_stat.UndecoratedSmoothedPWDB; |
|---|
| 937 | 911 | if (psta->rssi_stat.UndecoratedSmoothedPWDB != (-1)) |
|---|
| 938 | | - PWDB_rssi[sta_cnt++] = (psta->mac_id | (psta->rssi_stat.UndecoratedSmoothedPWDB<<16)); |
|---|
| 912 | + PWDB_rssi[sta_cnt++] = (psta->mac_id | (psta->rssi_stat.UndecoratedSmoothedPWDB << 16)); |
|---|
| 939 | 913 | } |
|---|
| 940 | 914 | } |
|---|
| 941 | 915 | |
|---|
| .. | .. |
|---|
| 967 | 941 | |
|---|
| 968 | 942 | void odm_TXPowerTrackingInit(struct odm_dm_struct *pDM_Odm) |
|---|
| 969 | 943 | { |
|---|
| 970 | | - odm_TXPowerTrackingThermalMeterInit(pDM_Odm); |
|---|
| 971 | | -} |
|---|
| 972 | | - |
|---|
| 973 | | -void odm_TXPowerTrackingThermalMeterInit(struct odm_dm_struct *pDM_Odm) |
|---|
| 974 | | -{ |
|---|
| 975 | 944 | pDM_Odm->RFCalibrateInfo.bTXPowerTracking = true; |
|---|
| 976 | 945 | pDM_Odm->RFCalibrateInfo.TXPowercount = 0; |
|---|
| 977 | | - if (*(pDM_Odm->mp_mode) != 1) |
|---|
| 946 | + if (*pDM_Odm->mp_mode != 1) |
|---|
| 978 | 947 | pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = true; |
|---|
| 979 | 948 | MSG_88E("pDM_Odm TxPowerTrackControl = %d\n", pDM_Odm->RFCalibrateInfo.TxPowerTrackControl); |
|---|
| 980 | 949 | |
|---|
| .. | .. |
|---|
| 986 | 955 | /* 2011/09/29 MH In HW integration first stage, we provide 4 different handle to operate */ |
|---|
| 987 | 956 | /* at the same time. In the stage2/3, we need to prive universal interface and merge all */ |
|---|
| 988 | 957 | /* HW dynamic mechanism. */ |
|---|
| 989 | | - odm_TXPowerTrackingCheckCE(pDM_Odm); |
|---|
| 990 | | -} |
|---|
| 991 | | - |
|---|
| 992 | | -void odm_TXPowerTrackingCheckCE(struct odm_dm_struct *pDM_Odm) |
|---|
| 993 | | -{ |
|---|
| 994 | 958 | struct adapter *Adapter = pDM_Odm->Adapter; |
|---|
| 995 | 959 | |
|---|
| 996 | 960 | if (!(pDM_Odm->SupportAbility & ODM_RF_TX_PWR_TRACK)) |
|---|
| .. | .. |
|---|
| 1001 | 965 | |
|---|
| 1002 | 966 | pDM_Odm->RFCalibrateInfo.TM_Trigger = 1; |
|---|
| 1003 | 967 | return; |
|---|
| 1004 | | - } else { |
|---|
| 1005 | | - rtl88eu_dm_txpower_tracking_callback_thermalmeter(Adapter); |
|---|
| 1006 | | - pDM_Odm->RFCalibrateInfo.TM_Trigger = 0; |
|---|
| 1007 | 968 | } |
|---|
| 969 | + |
|---|
| 970 | + rtl88eu_dm_txpower_tracking_callback_thermalmeter(Adapter); |
|---|
| 971 | + pDM_Odm->RFCalibrateInfo.TM_Trigger = 0; |
|---|
| 1008 | 972 | } |
|---|
| 1009 | 973 | |
|---|
| 1010 | 974 | /* 3============================================================ */ |
|---|
| .. | .. |
|---|
| 1040 | 1004 | pDM_Odm->DM_EDCA_Table.bIsCurRDLState = false; |
|---|
| 1041 | 1005 | Adapter->recvpriv.bIsAnyNonBEPkts = false; |
|---|
| 1042 | 1006 | |
|---|
| 1043 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial VO PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_VO_PARAM))); |
|---|
| 1044 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial VI PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_VI_PARAM))); |
|---|
| 1045 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial BE PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_BE_PARAM))); |
|---|
| 1046 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial BK PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_BK_PARAM))); |
|---|
| 1007 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Original VO PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_VO_PARAM))); |
|---|
| 1008 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Original VI PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_VI_PARAM))); |
|---|
| 1009 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Original BE PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_BE_PARAM))); |
|---|
| 1010 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Original BK PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_BK_PARAM))); |
|---|
| 1047 | 1011 | } /* ODM_InitEdcaTurbo */ |
|---|
| 1048 | 1012 | |
|---|
| 1049 | 1013 | void odm_EdcaTurboCheck(struct odm_dm_struct *pDM_Odm) |
|---|
| .. | .. |
|---|
| 1051 | 1015 | /* 2011/09/29 MH In HW integration first stage, we provide 4 different handle to operate */ |
|---|
| 1052 | 1016 | /* at the same time. In the stage2/3, we need to prive universal interface and merge all */ |
|---|
| 1053 | 1017 | /* HW dynamic mechanism. */ |
|---|
| 1054 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("odm_EdcaTurboCheck========================>\n")); |
|---|
| 1018 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("%s========================>\n", __func__)); |
|---|
| 1055 | 1019 | |
|---|
| 1056 | 1020 | if (!(pDM_Odm->SupportAbility & ODM_MAC_EDCA_TURBO)) |
|---|
| 1057 | 1021 | return; |
|---|
| 1058 | 1022 | |
|---|
| 1059 | 1023 | odm_EdcaTurboCheckCE(pDM_Odm); |
|---|
| 1060 | | - ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("<========================odm_EdcaTurboCheck\n")); |
|---|
| 1024 | + ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("<========================%s\n", __func__)); |
|---|
| 1061 | 1025 | } /* odm_CheckEdcaTurbo */ |
|---|
| 1062 | 1026 | |
|---|
| 1063 | 1027 | void odm_EdcaTurboCheckCE(struct odm_dm_struct *pDM_Odm) |
|---|
| .. | .. |
|---|
| 1068 | 1032 | u64 cur_tx_bytes = 0; |
|---|
| 1069 | 1033 | u64 cur_rx_bytes = 0; |
|---|
| 1070 | 1034 | u8 bbtchange = false; |
|---|
| 1071 | | - struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv); |
|---|
| 1072 | | - struct recv_priv *precvpriv = &(Adapter->recvpriv); |
|---|
| 1035 | + struct xmit_priv *pxmitpriv = &Adapter->xmitpriv; |
|---|
| 1036 | + struct recv_priv *precvpriv = &Adapter->recvpriv; |
|---|
| 1073 | 1037 | struct registry_priv *pregpriv = &Adapter->registrypriv; |
|---|
| 1074 | | - struct mlme_ext_priv *pmlmeext = &(Adapter->mlmeextpriv); |
|---|
| 1075 | | - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); |
|---|
| 1038 | + struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; |
|---|
| 1039 | + struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; |
|---|
| 1076 | 1040 | |
|---|
| 1077 | | - if ((pregpriv->wifi_spec == 1))/* (pmlmeinfo->HT_enable == 0)) */ |
|---|
| 1041 | + if (pregpriv->wifi_spec == 1) /* (pmlmeinfo->HT_enable == 0)) */ |
|---|
| 1078 | 1042 | goto dm_CheckEdcaTurbo_EXIT; |
|---|
| 1079 | 1043 | |
|---|
| 1080 | 1044 | if (pmlmeinfo->assoc_AP_vendor >= HT_IOT_PEER_MAX) |
|---|
| .. | .. |
|---|
| 1120 | 1084 | } else { |
|---|
| 1121 | 1085 | /* Turn Off EDCA turbo here. */ |
|---|
| 1122 | 1086 | /* Restore original EDCA according to the declaration of AP. */ |
|---|
| 1123 | | - if (pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA) { |
|---|
| 1087 | + if (pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA) { |
|---|
| 1124 | 1088 | usb_write32(Adapter, REG_EDCA_BE_PARAM, |
|---|
| 1125 | 1089 | Adapter->HalData->AcParam_BE); |
|---|
| 1126 | 1090 | pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA = false; |
|---|