Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8723bs: remove BT debug code

remove BT dead debug code, probably it was intended
for a specific command line interface.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/20210728141858.13024-1-fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Fabio Aiuto and committed by
Greg Kroah-Hartman
274f4e78 d8133ef6

-985
-458
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
··· 19 19 "BT Info[bt auto report]", 20 20 }; 21 21 22 - static u32 GLCoexVerDate8723b1Ant = 20140507; 23 - static u32 GLCoexVer8723b1Ant = 0x4e; 24 - 25 22 /* local function proto type if needed */ 26 23 /* local function start with halbtc8723b1ant_ */ 27 24 static u8 halbtc8723b1ant_BtRssiState( ··· 2206 2209 2207 2210 halbtc8723b1ant_QueryBtInfo(pBtCoexist); 2208 2211 } 2209 - 2210 - void EXhalbtc8723b1ant_DisplayCoexInfo(struct btc_coexist *pBtCoexist) 2211 - { 2212 - struct btc_board_info *pBoardInfo = &pBtCoexist->boardInfo; 2213 - struct btc_stack_info *pStackInfo = &pBtCoexist->stackInfo; 2214 - struct btc_bt_link_info *pBtLinkInfo = &pBtCoexist->btLinkInfo; 2215 - u8 *cliBuf = pBtCoexist->cliBuf; 2216 - u8 u1Tmp[4], i, btInfoExt, psTdmaCase = 0; 2217 - u16 u2Tmp[4]; 2218 - u32 u4Tmp[4]; 2219 - bool bRoam = false; 2220 - bool bScan = false; 2221 - bool bLink = false; 2222 - bool bWifiUnderBMode = false; 2223 - bool bBtHsOn = false; 2224 - bool bWifiBusy = false; 2225 - s32 wifiRssi = 0, btHsRssi = 0; 2226 - u32 wifiBw, wifiTrafficDir, faOfdm, faCck, wifiLinkStatus; 2227 - u8 wifiDot11Chnl, wifiHsChnl; 2228 - u32 fwVer = 0, btPatchVer = 0; 2229 - static u8 PopReportIn10s; 2230 - 2231 - CL_SPRINTF( 2232 - cliBuf, 2233 - BT_TMP_BUF_SIZE, 2234 - "\r\n ============[BT Coexist info]============" 2235 - ); 2236 - CL_PRINTF(cliBuf); 2237 - 2238 - if (pBtCoexist->bManualControl) { 2239 - CL_SPRINTF( 2240 - cliBuf, 2241 - BT_TMP_BUF_SIZE, 2242 - "\r\n ============[Under Manual Control]============" 2243 - ); 2244 - CL_PRINTF(cliBuf); 2245 - CL_SPRINTF(cliBuf, 2246 - BT_TMP_BUF_SIZE, 2247 - "\r\n ==========================================" 2248 - ); 2249 - CL_PRINTF(cliBuf); 2250 - } 2251 - if (pBtCoexist->bStopCoexDm) { 2252 - CL_SPRINTF( 2253 - cliBuf, 2254 - BT_TMP_BUF_SIZE, 2255 - "\r\n ============[Coex is STOPPED]============" 2256 - ); 2257 - CL_PRINTF(cliBuf); 2258 - CL_SPRINTF( 2259 - cliBuf, 2260 - BT_TMP_BUF_SIZE, 2261 - "\r\n ==========================================" 2262 - ); 2263 - CL_PRINTF(cliBuf); 2264 - } 2265 - 2266 - CL_SPRINTF( 2267 - cliBuf, 2268 - BT_TMP_BUF_SIZE, 2269 - "\r\n %-35s = %d/ %d/ %d", "Ant PG Num/ Ant Mech/ Ant Pos:", 2270 - pBoardInfo->pgAntNum, 2271 - pBoardInfo->btdmAntNum, 2272 - pBoardInfo->btdmAntPos 2273 - ); 2274 - CL_PRINTF(cliBuf); 2275 - 2276 - CL_SPRINTF( 2277 - cliBuf, 2278 - BT_TMP_BUF_SIZE, 2279 - "\r\n %-35s = %s / %d", "BT stack/ hci ext ver", 2280 - ((pStackInfo->bProfileNotified) ? "Yes" : "No"), 2281 - pStackInfo->hciVersion 2282 - ); 2283 - CL_PRINTF(cliBuf); 2284 - 2285 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_BT_PATCH_VER, &btPatchVer); 2286 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_WIFI_FW_VER, &fwVer); 2287 - CL_SPRINTF( 2288 - cliBuf, 2289 - BT_TMP_BUF_SIZE, 2290 - "\r\n %-35s = %d_%x/ 0x%x/ 0x%x(%d)", "CoexVer/ FwVer/ PatchVer", 2291 - GLCoexVerDate8723b1Ant, 2292 - GLCoexVer8723b1Ant, 2293 - fwVer, 2294 - btPatchVer, 2295 - btPatchVer 2296 - ); 2297 - CL_PRINTF(cliBuf); 2298 - 2299 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); 2300 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U1_WIFI_DOT11_CHNL, &wifiDot11Chnl); 2301 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U1_WIFI_HS_CHNL, &wifiHsChnl); 2302 - CL_SPRINTF( 2303 - cliBuf, 2304 - BT_TMP_BUF_SIZE, 2305 - "\r\n %-35s = %d / %d(%d)", "Dot11 channel / HsChnl(HsMode)", 2306 - wifiDot11Chnl, 2307 - wifiHsChnl, 2308 - bBtHsOn 2309 - ); 2310 - CL_PRINTF(cliBuf); 2311 - 2312 - CL_SPRINTF( 2313 - cliBuf, 2314 - BT_TMP_BUF_SIZE, 2315 - "\r\n %-35s = %02x %02x %02x ", "H2C Wifi inform bt chnl Info", 2316 - pCoexDm->wifiChnlInfo[0], 2317 - pCoexDm->wifiChnlInfo[1], 2318 - pCoexDm->wifiChnlInfo[2] 2319 - ); 2320 - CL_PRINTF(cliBuf); 2321 - 2322 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_S4_WIFI_RSSI, &wifiRssi); 2323 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_S4_HS_RSSI, &btHsRssi); 2324 - CL_SPRINTF( 2325 - cliBuf, 2326 - BT_TMP_BUF_SIZE, 2327 - "\r\n %-35s = %d/ %d", "Wifi rssi/ HS rssi", 2328 - wifiRssi - 100, btHsRssi - 100 2329 - ); 2330 - CL_PRINTF(cliBuf); 2331 - 2332 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_SCAN, &bScan); 2333 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_LINK, &bLink); 2334 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_ROAM, &bRoam); 2335 - CL_SPRINTF( 2336 - cliBuf, 2337 - BT_TMP_BUF_SIZE, 2338 - "\r\n %-35s = %d/ %d/ %d/ %s", "Wifi bLink/ bRoam/ bScan/ bHi-Pri", 2339 - bLink, bRoam, bScan, ((pCoexSta->bWiFiIsHighPriTask) ? "1" : "0") 2340 - ); 2341 - CL_PRINTF(cliBuf); 2342 - 2343 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_WIFI_BW, &wifiBw); 2344 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_BUSY, &bWifiBusy); 2345 - pBtCoexist->fBtcGet( 2346 - pBtCoexist, BTC_GET_U4_WIFI_TRAFFIC_DIRECTION, &wifiTrafficDir 2347 - ); 2348 - pBtCoexist->fBtcGet( 2349 - pBtCoexist, BTC_GET_BL_WIFI_UNDER_B_MODE, &bWifiUnderBMode 2350 - ); 2351 - 2352 - CL_SPRINTF( 2353 - cliBuf, 2354 - BT_TMP_BUF_SIZE, 2355 - "\r\n %-35s = %s / %s/ %s/ AP =%d/ %s ", "Wifi status", 2356 - ("2.4G"), 2357 - ((bWifiUnderBMode) ? "11b" : ((wifiBw == BTC_WIFI_BW_LEGACY) ? "11bg" : (((wifiBw == BTC_WIFI_BW_HT40) ? "HT40" : "HT20")))), 2358 - ((!bWifiBusy) ? "idle" : ((wifiTrafficDir == BTC_WIFI_TRAFFIC_TX) ? "uplink" : "downlink")), 2359 - pCoexSta->nScanAPNum, 2360 - (pCoexSta->bCCKLock) ? "Lock" : "noLock" 2361 - ); 2362 - CL_PRINTF(cliBuf); 2363 - 2364 - pBtCoexist->fBtcGet( 2365 - pBtCoexist, BTC_GET_U4_WIFI_LINK_STATUS, &wifiLinkStatus 2366 - ); 2367 - CL_SPRINTF( 2368 - cliBuf, 2369 - BT_TMP_BUF_SIZE, 2370 - "\r\n %-35s = %d/ %d/ %d/ %d/ %d", "sta/vwifi/hs/p2pGo/p2pGc", 2371 - ((wifiLinkStatus & WIFI_STA_CONNECTED) ? 1 : 0), 2372 - ((wifiLinkStatus & WIFI_AP_CONNECTED) ? 1 : 0), 2373 - ((wifiLinkStatus & WIFI_HS_CONNECTED) ? 1 : 0), 2374 - ((wifiLinkStatus & WIFI_P2P_GO_CONNECTED) ? 1 : 0), 2375 - ((wifiLinkStatus & WIFI_P2P_GC_CONNECTED) ? 1 : 0) 2376 - ); 2377 - CL_PRINTF(cliBuf); 2378 - 2379 - 2380 - PopReportIn10s++; 2381 - CL_SPRINTF( 2382 - cliBuf, 2383 - BT_TMP_BUF_SIZE, 2384 - "\r\n %-35s = [%s/ %d/ %d/ %d] ", "BT [status/ rssi/ retryCnt/ popCnt]", 2385 - ((pBtCoexist->btInfo.bBtDisabled) ? ("disabled") : ((pCoexSta->bC2hBtInquiryPage) ? ("inquiry/page scan") : ((pCoexDm->btStatus == BT_8723B_1ANT_BT_STATUS_NON_CONNECTED_IDLE) ? "non-connected idle" : 2386 - ((pCoexDm->btStatus == BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE) ? "connected-idle" : "busy")))), 2387 - pCoexSta->btRssi, pCoexSta->btRetryCnt, pCoexSta->popEventCnt 2388 - ); 2389 - CL_PRINTF(cliBuf); 2390 - 2391 - if (PopReportIn10s >= 5) { 2392 - pCoexSta->popEventCnt = 0; 2393 - PopReportIn10s = 0; 2394 - } 2395 - 2396 - 2397 - CL_SPRINTF( 2398 - cliBuf, 2399 - BT_TMP_BUF_SIZE, 2400 - "\r\n %-35s = %d / %d / %d / %d", "SCO/HID/PAN/A2DP", 2401 - pBtLinkInfo->bScoExist, 2402 - pBtLinkInfo->bHidExist, 2403 - pBtLinkInfo->bPanExist, 2404 - pBtLinkInfo->bA2dpExist 2405 - ); 2406 - CL_PRINTF(cliBuf); 2407 - 2408 - if (pStackInfo->bProfileNotified) { 2409 - pBtCoexist->fBtcDispDbgMsg(pBtCoexist, BTC_DBG_DISP_BT_LINK_INFO); 2410 - } else { 2411 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %s", "BT Role", 2412 - (pBtLinkInfo->bSlaveRole) ? "Slave" : "Master"); 2413 - CL_PRINTF(cliBuf); 2414 - } 2415 - 2416 - 2417 - btInfoExt = pCoexSta->btInfoExt; 2418 - CL_SPRINTF( 2419 - cliBuf, 2420 - BT_TMP_BUF_SIZE, 2421 - "\r\n %-35s = %s", "BT Info A2DP rate", 2422 - (btInfoExt & BIT0) ? "Basic rate" : "EDR rate" 2423 - ); 2424 - CL_PRINTF(cliBuf); 2425 - 2426 - for (i = 0; i < BT_INFO_SRC_8723B_1ANT_MAX; i++) { 2427 - if (pCoexSta->btInfoC2hCnt[i]) { 2428 - CL_SPRINTF( 2429 - cliBuf, 2430 - BT_TMP_BUF_SIZE, 2431 - "\r\n %-35s = %02x %02x %02x %02x %02x %02x %02x(%d)", GLBtInfoSrc8723b1Ant[i], 2432 - pCoexSta->btInfoC2h[i][0], pCoexSta->btInfoC2h[i][1], 2433 - pCoexSta->btInfoC2h[i][2], pCoexSta->btInfoC2h[i][3], 2434 - pCoexSta->btInfoC2h[i][4], pCoexSta->btInfoC2h[i][5], 2435 - pCoexSta->btInfoC2h[i][6], pCoexSta->btInfoC2hCnt[i] 2436 - ); 2437 - CL_PRINTF(cliBuf); 2438 - } 2439 - } 2440 - CL_SPRINTF( 2441 - cliBuf, 2442 - BT_TMP_BUF_SIZE, 2443 - "\r\n %-35s = %s/%s, (0x%x/0x%x)", "PS state, IPS/LPS, (lps/rpwm)", 2444 - (pCoexSta->bUnderIps ? "IPS ON" : "IPS OFF"), 2445 - (pCoexSta->bUnderLps ? "LPS ON" : "LPS OFF"), 2446 - pBtCoexist->btInfo.lpsVal, 2447 - pBtCoexist->btInfo.rpwmVal 2448 - ); 2449 - CL_PRINTF(cliBuf); 2450 - pBtCoexist->fBtcDispDbgMsg(pBtCoexist, BTC_DBG_DISP_FW_PWR_MODE_CMD); 2451 - 2452 - if (!pBtCoexist->bManualControl) { 2453 - /* Sw mechanism */ 2454 - CL_SPRINTF( 2455 - cliBuf, 2456 - BT_TMP_BUF_SIZE, 2457 - "\r\n %-35s", "============[Sw mechanism]============" 2458 - ); 2459 - CL_PRINTF(cliBuf); 2460 - 2461 - CL_SPRINTF( 2462 - cliBuf, 2463 - BT_TMP_BUF_SIZE, 2464 - "\r\n %-35s = %d", "SM[LowPenaltyRA]", 2465 - pCoexDm->bCurLowPenaltyRa 2466 - ); 2467 - CL_PRINTF(cliBuf); 2468 - 2469 - CL_SPRINTF( 2470 - cliBuf, 2471 - BT_TMP_BUF_SIZE, 2472 - "\r\n %-35s = %s/ %s/ %d ", "DelBA/ BtCtrlAgg/ AggSize", 2473 - (pBtCoexist->btInfo.bRejectAggPkt ? "Yes" : "No"), 2474 - (pBtCoexist->btInfo.bBtCtrlAggBufSize ? "Yes" : "No"), 2475 - pBtCoexist->btInfo.aggBufSize 2476 - ); 2477 - CL_PRINTF(cliBuf); 2478 - CL_SPRINTF( 2479 - cliBuf, 2480 - BT_TMP_BUF_SIZE, 2481 - "\r\n %-35s = 0x%x ", "Rate Mask", 2482 - pBtCoexist->btInfo.raMask 2483 - ); 2484 - CL_PRINTF(cliBuf); 2485 - 2486 - /* Fw mechanism */ 2487 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s", "============[Fw mechanism]============"); 2488 - CL_PRINTF(cliBuf); 2489 - 2490 - psTdmaCase = pCoexDm->curPsTdma; 2491 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %02x %02x %02x %02x %02x case-%d (auto:%d)", "PS TDMA", 2492 - pCoexDm->psTdmaPara[0], pCoexDm->psTdmaPara[1], 2493 - pCoexDm->psTdmaPara[2], pCoexDm->psTdmaPara[3], 2494 - pCoexDm->psTdmaPara[4], psTdmaCase, pCoexDm->bAutoTdmaAdjust); 2495 - CL_PRINTF(cliBuf); 2496 - 2497 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d", "Coex Table Type", 2498 - pCoexSta->nCoexTableType); 2499 - CL_PRINTF(cliBuf); 2500 - 2501 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d", "IgnWlanAct", 2502 - pCoexDm->bCurIgnoreWlanAct); 2503 - CL_PRINTF(cliBuf); 2504 - } 2505 - 2506 - /* Hw setting */ 2507 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s", "============[Hw setting]============"); 2508 - CL_PRINTF(cliBuf); 2509 - 2510 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x/0x%x/0x%x/0x%x", "backup ARFR1/ARFR2/RL/AMaxTime", 2511 - pCoexDm->backupArfrCnt1, pCoexDm->backupArfrCnt2, pCoexDm->backupRetryLimit, pCoexDm->backupAmpduMaxTime); 2512 - CL_PRINTF(cliBuf); 2513 - 2514 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x430); 2515 - u4Tmp[1] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x434); 2516 - u2Tmp[0] = pBtCoexist->fBtcRead2Byte(pBtCoexist, 0x42a); 2517 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x456); 2518 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x/0x%x/0x%x/0x%x", "0x430/0x434/0x42a/0x456", 2519 - u4Tmp[0], u4Tmp[1], u2Tmp[0], u1Tmp[0]); 2520 - CL_PRINTF(cliBuf); 2521 - 2522 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x778); 2523 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x6cc); 2524 - u4Tmp[1] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x880); 2525 - CL_SPRINTF( 2526 - cliBuf, BT_TMP_BUF_SIZE, 2527 - "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x778/0x6cc/0x880[29:25]", 2528 - u1Tmp[0], u4Tmp[0], (u4Tmp[1] & 0x3e000000) >> 25 2529 - ); 2530 - CL_PRINTF(cliBuf); 2531 - 2532 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x948); 2533 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x67); 2534 - u4Tmp[1] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x764); 2535 - u1Tmp[1] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x76e); 2536 - CL_SPRINTF( 2537 - cliBuf, 2538 - BT_TMP_BUF_SIZE, 2539 - "\r\n %-35s = 0x%x/ 0x%x/ 0x%x/ 0x%x", "0x948/ 0x67[5] / 0x764 / 0x76e", 2540 - u4Tmp[0], ((u1Tmp[0] & 0x20) >> 5), (u4Tmp[1] & 0xffff), u1Tmp[1] 2541 - ); 2542 - CL_PRINTF(cliBuf); 2543 - 2544 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x92c); 2545 - u4Tmp[1] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x930); 2546 - u4Tmp[2] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x944); 2547 - CL_SPRINTF( 2548 - cliBuf, 2549 - BT_TMP_BUF_SIZE, 2550 - "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x92c[1:0]/ 0x930[7:0]/0x944[1:0]", 2551 - u4Tmp[0] & 0x3, u4Tmp[1] & 0xff, u4Tmp[2] & 0x3 2552 - ); 2553 - CL_PRINTF(cliBuf); 2554 - 2555 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x39); 2556 - u1Tmp[1] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x40); 2557 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x4c); 2558 - u1Tmp[2] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x64); 2559 - CL_SPRINTF( 2560 - cliBuf, 2561 - BT_TMP_BUF_SIZE, 2562 - "\r\n %-35s = 0x%x/ 0x%x/ 0x%x/ 0x%x", "0x38[11]/0x40/0x4c[24:23]/0x64[0]", 2563 - ((u1Tmp[0] & 0x8) >> 3), 2564 - u1Tmp[1], 2565 - ((u4Tmp[0] & 0x01800000) >> 23), 2566 - u1Tmp[2] & 0x1 2567 - ); 2568 - CL_PRINTF(cliBuf); 2569 - 2570 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x550); 2571 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x522); 2572 - CL_SPRINTF( 2573 - cliBuf, 2574 - BT_TMP_BUF_SIZE, 2575 - "\r\n %-35s = 0x%x/ 0x%x", "0x550(bcn ctrl)/0x522", 2576 - u4Tmp[0], u1Tmp[0] 2577 - ); 2578 - CL_PRINTF(cliBuf); 2579 - 2580 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0xc50); 2581 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x49c); 2582 - CL_SPRINTF( 2583 - cliBuf, 2584 - BT_TMP_BUF_SIZE, 2585 - "\r\n %-35s = 0x%x/ 0x%x", "0xc50(dig)/0x49c(null-drop)", 2586 - u4Tmp[0] & 0xff, u1Tmp[0] 2587 - ); 2588 - CL_PRINTF(cliBuf); 2589 - 2590 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0xda0); 2591 - u4Tmp[1] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0xda4); 2592 - u4Tmp[2] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0xda8); 2593 - u4Tmp[3] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0xcf0); 2594 - 2595 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0xa5b); 2596 - u1Tmp[1] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0xa5c); 2597 - 2598 - faOfdm = 2599 - ((u4Tmp[0] & 0xffff0000) >> 16) + 2600 - ((u4Tmp[1] & 0xffff0000) >> 16) + 2601 - (u4Tmp[1] & 0xffff) + (u4Tmp[2] & 0xffff) + 2602 - ((u4Tmp[3] & 0xffff0000) >> 16) + (u4Tmp[3] & 0xffff); 2603 - faCck = (u1Tmp[0] << 8) + u1Tmp[1]; 2604 - 2605 - CL_SPRINTF( 2606 - cliBuf, 2607 - BT_TMP_BUF_SIZE, 2608 - "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "OFDM-CCA/OFDM-FA/CCK-FA", 2609 - u4Tmp[0] & 0xffff, faOfdm, faCck 2610 - ); 2611 - CL_PRINTF(cliBuf); 2612 - 2613 - 2614 - CL_SPRINTF( 2615 - cliBuf, 2616 - BT_TMP_BUF_SIZE, 2617 - "\r\n %-35s = %d/ %d/ %d/ %d", "CRC_OK CCK/11g/11n/11n-Agg", 2618 - pCoexSta->nCRCOK_CCK, 2619 - pCoexSta->nCRCOK_11g, 2620 - pCoexSta->nCRCOK_11n, 2621 - pCoexSta->nCRCOK_11nAgg 2622 - ); 2623 - CL_PRINTF(cliBuf); 2624 - 2625 - CL_SPRINTF( 2626 - cliBuf, 2627 - BT_TMP_BUF_SIZE, 2628 - "\r\n %-35s = %d/ %d/ %d/ %d", "CRC_Err CCK/11g/11n/11n-Agg", 2629 - pCoexSta->nCRCErr_CCK, 2630 - pCoexSta->nCRCErr_11g, 2631 - pCoexSta->nCRCErr_11n, 2632 - pCoexSta->nCRCErr_11nAgg 2633 - ); 2634 - CL_PRINTF(cliBuf); 2635 - 2636 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x6c0); 2637 - u4Tmp[1] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x6c4); 2638 - u4Tmp[2] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x6c8); 2639 - CL_SPRINTF( 2640 - cliBuf, 2641 - BT_TMP_BUF_SIZE, 2642 - "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x6c0/0x6c4/0x6c8(coexTable)", 2643 - u4Tmp[0], u4Tmp[1], u4Tmp[2]); 2644 - CL_PRINTF(cliBuf); 2645 - 2646 - CL_SPRINTF( 2647 - cliBuf, 2648 - BT_TMP_BUF_SIZE, 2649 - "\r\n %-35s = %d/ %d", "0x770(high-pri rx/tx)", 2650 - pCoexSta->highPriorityRx, pCoexSta->highPriorityTx 2651 - ); 2652 - CL_PRINTF(cliBuf); 2653 - CL_SPRINTF( 2654 - cliBuf, 2655 - BT_TMP_BUF_SIZE, 2656 - "\r\n %-35s = %d/ %d", "0x774(low-pri rx/tx)", 2657 - pCoexSta->lowPriorityRx, pCoexSta->lowPriorityTx 2658 - ); 2659 - CL_PRINTF(cliBuf); 2660 - 2661 - pBtCoexist->fBtcDispDbgMsg(pBtCoexist, BTC_DBG_DISP_COEX_STATISTICS); 2662 - } 2663 - 2664 2212 2665 2213 void EXhalbtc8723b1ant_IpsNotify(struct btc_coexist *pBtCoexist, u8 type) 2666 2214 {
-1
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.h
··· 182 182 void EXhalbtc8723b1ant_HaltNotify(struct btc_coexist *pBtCoexist); 183 183 void EXhalbtc8723b1ant_PnpNotify(struct btc_coexist *pBtCoexist, u8 pnpState); 184 184 void EXhalbtc8723b1ant_Periodical(struct btc_coexist *pBtCoexist); 185 - void EXhalbtc8723b1ant_DisplayCoexInfo(struct btc_coexist *pBtCoexist);
-408
drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c
··· 26 26 "BT Info[bt auto report]", 27 27 }; 28 28 29 - static u32 GLCoexVerDate8723b2Ant = 20131211; 30 - static u32 GLCoexVer8723b2Ant = 0x40; 31 - 32 29 /* local function start with halbtc8723b2ant_ */ 33 30 static u8 halbtc8723b2ant_BtRssiState( 34 31 u8 levelNum, u8 rssiThresh, u8 rssiThresh1 ··· 183 186 pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_U1_AGG_BUF_SIZE, &rxAggSize); 184 187 /* real update aggregation setting */ 185 188 pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL); 186 - } 187 - 188 - static void halbtc8723b2ant_MonitorBtCtr(struct btc_coexist *pBtCoexist) 189 - { 190 - u32 regHPTxRx, regLPTxRx, u4Tmp; 191 - u32 regHPTx = 0, regHPRx = 0, regLPTx = 0, regLPRx = 0; 192 - 193 - regHPTxRx = 0x770; 194 - regLPTxRx = 0x774; 195 - 196 - u4Tmp = pBtCoexist->fBtcRead4Byte(pBtCoexist, regHPTxRx); 197 - regHPTx = u4Tmp & bMaskLWord; 198 - regHPRx = (u4Tmp & bMaskHWord) >> 16; 199 - 200 - u4Tmp = pBtCoexist->fBtcRead4Byte(pBtCoexist, regLPTxRx); 201 - regLPTx = u4Tmp & bMaskLWord; 202 - regLPRx = (u4Tmp & bMaskHWord) >> 16; 203 - 204 - pCoexSta->highPriorityTx = regHPTx; 205 - pCoexSta->highPriorityRx = regHPRx; 206 - pCoexSta->lowPriorityTx = regLPTx; 207 - pCoexSta->lowPriorityRx = regLPRx; 208 - 209 - /* reset counter */ 210 - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x76e, 0xc); 211 189 } 212 190 213 191 static void halbtc8723b2ant_QueryBtInfo(struct btc_coexist *pBtCoexist) ··· 2394 2422 { 2395 2423 halbtc8723b2ant_InitCoexDm(pBtCoexist); 2396 2424 } 2397 - 2398 - void EXhalbtc8723b2ant_DisplayCoexInfo(struct btc_coexist *pBtCoexist) 2399 - { 2400 - struct btc_board_info *pBoardInfo = &pBtCoexist->boardInfo; 2401 - struct btc_stack_info *pStackInfo = &pBtCoexist->stackInfo; 2402 - struct btc_bt_link_info *pBtLinkInfo = &pBtCoexist->btLinkInfo; 2403 - u8 *cliBuf = pBtCoexist->cliBuf; 2404 - u8 u1Tmp[4], i, btInfoExt, psTdmaCase = 0; 2405 - u32 u4Tmp[4]; 2406 - bool bRoam = false, bScan = false, bLink = false; 2407 - bool bBtHsOn = false, bWifiBusy = false; 2408 - s32 wifiRssi = 0, btHsRssi = 0; 2409 - u32 wifiBw, wifiTrafficDir, faOfdm, faCck; 2410 - u8 wifiDot11Chnl, wifiHsChnl; 2411 - u32 fwVer = 0, btPatchVer = 0; 2412 - u8 apNum = 0; 2413 - 2414 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n ============[BT Coexist info]============"); 2415 - CL_PRINTF(cliBuf); 2416 - 2417 - if (pBtCoexist->bManualControl) { 2418 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n ============[Under Manual Control]============"); 2419 - CL_PRINTF(cliBuf); 2420 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n =========================================="); 2421 - CL_PRINTF(cliBuf); 2422 - } 2423 - 2424 - CL_SPRINTF( 2425 - cliBuf, 2426 - BT_TMP_BUF_SIZE, 2427 - "\r\n %-35s = %d/ %d ", "Ant PG number/ Ant mechanism:", \ 2428 - pBoardInfo->pgAntNum, 2429 - pBoardInfo->btdmAntNum 2430 - ); 2431 - CL_PRINTF(cliBuf); 2432 - 2433 - CL_SPRINTF( 2434 - cliBuf, 2435 - BT_TMP_BUF_SIZE, 2436 - "\r\n %-35s = %s / %d", "BT stack/ hci ext ver", \ 2437 - (pStackInfo->bProfileNotified ? "Yes" : "No"), 2438 - pStackInfo->hciVersion 2439 - ); 2440 - CL_PRINTF(cliBuf); 2441 - 2442 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_BT_PATCH_VER, &btPatchVer); 2443 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_WIFI_FW_VER, &fwVer); 2444 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d_%x/ 0x%x/ 0x%x(%d)", "CoexVer/ FwVer/ PatchVer", \ 2445 - GLCoexVerDate8723b2Ant, GLCoexVer8723b2Ant, fwVer, btPatchVer, btPatchVer); 2446 - CL_PRINTF(cliBuf); 2447 - 2448 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); 2449 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U1_WIFI_DOT11_CHNL, &wifiDot11Chnl); 2450 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U1_WIFI_HS_CHNL, &wifiHsChnl); 2451 - CL_SPRINTF( 2452 - cliBuf, 2453 - BT_TMP_BUF_SIZE, 2454 - "\r\n %-35s = %d / %d(%d)", "Dot11 channel / HsChnl(HsMode)", \ 2455 - wifiDot11Chnl, 2456 - wifiHsChnl, 2457 - bBtHsOn 2458 - ); 2459 - CL_PRINTF(cliBuf); 2460 - 2461 - CL_SPRINTF( 2462 - cliBuf, 2463 - BT_TMP_BUF_SIZE, 2464 - "\r\n %-35s = %02x %02x %02x ", "H2C Wifi inform bt chnl Info", \ 2465 - pCoexDm->wifiChnlInfo[0], 2466 - pCoexDm->wifiChnlInfo[1], 2467 - pCoexDm->wifiChnlInfo[2] 2468 - ); 2469 - CL_PRINTF(cliBuf); 2470 - 2471 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_S4_WIFI_RSSI, &wifiRssi); 2472 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_S4_HS_RSSI, &btHsRssi); 2473 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U1_AP_NUM, &apNum); 2474 - CL_SPRINTF( 2475 - cliBuf, 2476 - BT_TMP_BUF_SIZE, 2477 - "\r\n %-35s = %d/ %d/ %d", "Wifi rssi/ HS rssi/ AP#", \ 2478 - wifiRssi, 2479 - btHsRssi, 2480 - apNum 2481 - ); 2482 - CL_PRINTF(cliBuf); 2483 - 2484 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_SCAN, &bScan); 2485 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_LINK, &bLink); 2486 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_ROAM, &bRoam); 2487 - CL_SPRINTF( 2488 - cliBuf, 2489 - BT_TMP_BUF_SIZE, 2490 - "\r\n %-35s = %d/ %d/ %d ", "Wifi bLink/ bRoam/ bScan", \ 2491 - bLink, 2492 - bRoam, 2493 - bScan 2494 - ); 2495 - CL_PRINTF(cliBuf); 2496 - 2497 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_WIFI_BW, &wifiBw); 2498 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_BUSY, &bWifiBusy); 2499 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_WIFI_TRAFFIC_DIRECTION, &wifiTrafficDir); 2500 - CL_SPRINTF( 2501 - cliBuf, 2502 - BT_TMP_BUF_SIZE, 2503 - "\r\n %-35s = %s / %s/ %s ", "Wifi status", \ 2504 - ("2.4G"), 2505 - ((BTC_WIFI_BW_LEGACY == wifiBw) ? "Legacy" : (((BTC_WIFI_BW_HT40 == wifiBw) ? "HT40" : "HT20"))), 2506 - ((!bWifiBusy) ? "idle" : ((BTC_WIFI_TRAFFIC_TX == wifiTrafficDir) ? "uplink" : "downlink")) 2507 - ); 2508 - CL_PRINTF(cliBuf); 2509 - 2510 - CL_SPRINTF( 2511 - cliBuf, 2512 - BT_TMP_BUF_SIZE, 2513 - "\r\n %-35s = [%s/ %d/ %d] ", "BT [status/ rssi/ retryCnt]", \ 2514 - ((pBtCoexist->btInfo.bBtDisabled) ? ("disabled") : ((pCoexSta->bC2hBtInquiryPage) ? ("inquiry/page scan") : ((BT_8723B_2ANT_BT_STATUS_NON_CONNECTED_IDLE == pCoexDm->btStatus) ? "non-connected idle" : 2515 - ((BT_8723B_2ANT_BT_STATUS_CONNECTED_IDLE == pCoexDm->btStatus) ? "connected-idle" : "busy")))), 2516 - pCoexSta->btRssi, 2517 - pCoexSta->btRetryCnt 2518 - ); 2519 - CL_PRINTF(cliBuf); 2520 - 2521 - CL_SPRINTF( 2522 - cliBuf, 2523 - BT_TMP_BUF_SIZE, 2524 - "\r\n %-35s = %d / %d / %d / %d", "SCO/HID/PAN/A2DP", \ 2525 - pBtLinkInfo->bScoExist, 2526 - pBtLinkInfo->bHidExist, 2527 - pBtLinkInfo->bPanExist, 2528 - pBtLinkInfo->bA2dpExist 2529 - ); 2530 - CL_PRINTF(cliBuf); 2531 - pBtCoexist->fBtcDispDbgMsg(pBtCoexist, BTC_DBG_DISP_BT_LINK_INFO); 2532 - 2533 - btInfoExt = pCoexSta->btInfoExt; 2534 - CL_SPRINTF( 2535 - cliBuf, 2536 - BT_TMP_BUF_SIZE, 2537 - "\r\n %-35s = %s", "BT Info A2DP rate", \ 2538 - (btInfoExt & BIT0) ? "Basic rate" : "EDR rate" 2539 - ); 2540 - CL_PRINTF(cliBuf); 2541 - 2542 - for (i = 0; i < BT_INFO_SRC_8723B_2ANT_MAX; i++) { 2543 - if (pCoexSta->btInfoC2hCnt[i]) { 2544 - CL_SPRINTF( 2545 - cliBuf, 2546 - BT_TMP_BUF_SIZE, 2547 - "\r\n %-35s = %02x %02x %02x %02x %02x %02x %02x(%d)", GLBtInfoSrc8723b2Ant[i], \ 2548 - pCoexSta->btInfoC2h[i][0], 2549 - pCoexSta->btInfoC2h[i][1], 2550 - pCoexSta->btInfoC2h[i][2], 2551 - pCoexSta->btInfoC2h[i][3], 2552 - pCoexSta->btInfoC2h[i][4], 2553 - pCoexSta->btInfoC2h[i][5], 2554 - pCoexSta->btInfoC2h[i][6], 2555 - pCoexSta->btInfoC2hCnt[i] 2556 - ); 2557 - CL_PRINTF(cliBuf); 2558 - } 2559 - } 2560 - 2561 - CL_SPRINTF( 2562 - cliBuf, 2563 - BT_TMP_BUF_SIZE, 2564 - "\r\n %-35s = %s/%s", "PS state, IPS/LPS", \ 2565 - ((pCoexSta->bUnderIps ? "IPS ON" : "IPS OFF")), 2566 - ((pCoexSta->bUnderLps ? "LPS ON" : "LPS OFF")) 2567 - ); 2568 - CL_PRINTF(cliBuf); 2569 - pBtCoexist->fBtcDispDbgMsg(pBtCoexist, BTC_DBG_DISP_FW_PWR_MODE_CMD); 2570 - 2571 - /* Sw mechanism */ 2572 - CL_SPRINTF( 2573 - cliBuf, 2574 - BT_TMP_BUF_SIZE, 2575 - "\r\n %-35s", "============[Sw mechanism]============" 2576 - ); 2577 - CL_PRINTF(cliBuf); 2578 - CL_SPRINTF( 2579 - cliBuf, 2580 - BT_TMP_BUF_SIZE, 2581 - "\r\n %-35s = %d/ %d/ %d ", "SM1[ShRf/ LpRA/ LimDig]", \ 2582 - pCoexDm->bCurRfRxLpfShrink, 2583 - pCoexDm->bCurLowPenaltyRa, 2584 - pCoexDm->bLimitedDig 2585 - ); 2586 - CL_PRINTF(cliBuf); 2587 - CL_SPRINTF( 2588 - cliBuf, 2589 - BT_TMP_BUF_SIZE, 2590 - "\r\n %-35s = %d/ %d/ %d(0x%x) ", 2591 - "SM2[AgcT/ AdcB/ SwDacSwing(lvl)]", \ 2592 - pCoexDm->bCurAgcTableEn, 2593 - pCoexDm->bCurAdcBackOff, 2594 - pCoexDm->bCurDacSwingOn, 2595 - pCoexDm->curDacSwingLvl 2596 - ); 2597 - CL_PRINTF(cliBuf); 2598 - 2599 - /* Fw mechanism */ 2600 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s", "============[Fw mechanism]============"); 2601 - CL_PRINTF(cliBuf); 2602 - 2603 - psTdmaCase = pCoexDm->curPsTdma; 2604 - CL_SPRINTF( 2605 - cliBuf, 2606 - BT_TMP_BUF_SIZE, 2607 - "\r\n %-35s = %02x %02x %02x %02x %02x case-%d (auto:%d)", "PS TDMA", \ 2608 - pCoexDm->psTdmaPara[0], 2609 - pCoexDm->psTdmaPara[1], 2610 - pCoexDm->psTdmaPara[2], 2611 - pCoexDm->psTdmaPara[3], 2612 - pCoexDm->psTdmaPara[4], 2613 - psTdmaCase, pCoexDm->bAutoTdmaAdjust 2614 - ); 2615 - CL_PRINTF(cliBuf); 2616 - 2617 - CL_SPRINTF( 2618 - cliBuf, 2619 - BT_TMP_BUF_SIZE, 2620 - "\r\n %-35s = %d/ %d ", "DecBtPwr/ IgnWlanAct", \ 2621 - pCoexDm->curBtDecPwrLvl, 2622 - pCoexDm->bCurIgnoreWlanAct 2623 - ); 2624 - CL_PRINTF(cliBuf); 2625 - 2626 - /* Hw setting */ 2627 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s", "============[Hw setting]============"); 2628 - CL_PRINTF(cliBuf); 2629 - 2630 - CL_SPRINTF( 2631 - cliBuf, 2632 - BT_TMP_BUF_SIZE, 2633 - "\r\n %-35s = 0x%x", "RF-A, 0x1e initVal", \ 2634 - pCoexDm->btRf0x1eBackup 2635 - ); 2636 - CL_PRINTF(cliBuf); 2637 - 2638 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x778); 2639 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x880); 2640 - CL_SPRINTF( 2641 - cliBuf, 2642 - BT_TMP_BUF_SIZE, 2643 - "\r\n %-35s = 0x%x/ 0x%x", "0x778/0x880[29:25]", \ 2644 - u1Tmp[0], 2645 - (u4Tmp[0] & 0x3e000000) >> 25 2646 - ); 2647 - CL_PRINTF(cliBuf); 2648 - 2649 - 2650 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x948); 2651 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x67); 2652 - u1Tmp[1] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x765); 2653 - CL_SPRINTF( 2654 - cliBuf, 2655 - BT_TMP_BUF_SIZE, 2656 - "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x948/ 0x67[5] / 0x765", \ 2657 - u4Tmp[0], 2658 - ((u1Tmp[0] & 0x20) >> 5), 2659 - u1Tmp[1] 2660 - ); 2661 - CL_PRINTF(cliBuf); 2662 - 2663 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x92c); 2664 - u4Tmp[1] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x930); 2665 - u4Tmp[2] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x944); 2666 - CL_SPRINTF( 2667 - cliBuf, 2668 - BT_TMP_BUF_SIZE, 2669 - "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x92c[1:0]/ 0x930[7:0]/0x944[1:0]", \ 2670 - u4Tmp[0] & 0x3, 2671 - u4Tmp[1] & 0xff, 2672 - u4Tmp[2] & 0x3 2673 - ); 2674 - CL_PRINTF(cliBuf); 2675 - 2676 - 2677 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x39); 2678 - u1Tmp[1] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x40); 2679 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x4c); 2680 - u1Tmp[2] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x64); 2681 - CL_SPRINTF( 2682 - cliBuf, 2683 - BT_TMP_BUF_SIZE, 2684 - "\r\n %-35s = 0x%x/ 0x%x/ 0x%x/ 0x%x", "0x38[11]/0x40/0x4c[24:23]/0x64[0]", \ 2685 - ((u1Tmp[0] & 0x8) >> 3), 2686 - u1Tmp[1], 2687 - ((u4Tmp[0] & 0x01800000) >> 23), 2688 - u1Tmp[2] & 0x1 2689 - ); 2690 - CL_PRINTF(cliBuf); 2691 - 2692 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x550); 2693 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x522); 2694 - CL_SPRINTF( 2695 - cliBuf, 2696 - BT_TMP_BUF_SIZE, 2697 - "\r\n %-35s = 0x%x/ 0x%x", "0x550(bcn ctrl)/0x522", \ 2698 - u4Tmp[0], 2699 - u1Tmp[0] 2700 - ); 2701 - CL_PRINTF(cliBuf); 2702 - 2703 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0xc50); 2704 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x49c); 2705 - CL_SPRINTF( 2706 - cliBuf, 2707 - BT_TMP_BUF_SIZE, 2708 - "\r\n %-35s = 0x%x/ 0x%x", "0xc50(dig)/0x49c(null-drop)", \ 2709 - u4Tmp[0] & 0xff, 2710 - u1Tmp[0] 2711 - ); 2712 - CL_PRINTF(cliBuf); 2713 - 2714 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0xda0); 2715 - u4Tmp[1] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0xda4); 2716 - u4Tmp[2] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0xda8); 2717 - u4Tmp[3] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0xcf0); 2718 - 2719 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0xa5b); 2720 - u1Tmp[1] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0xa5c); 2721 - 2722 - faOfdm = 2723 - ((u4Tmp[0] & 0xffff0000) >> 16) + 2724 - ((u4Tmp[1] & 0xffff0000) >> 16) + 2725 - (u4Tmp[1] & 0xffff) + (u4Tmp[2] & 0xffff) + \ 2726 - ((u4Tmp[3] & 0xffff0000) >> 16) + 2727 - (u4Tmp[3] & 0xffff); 2728 - 2729 - faCck = (u1Tmp[0] << 8) + u1Tmp[1]; 2730 - 2731 - CL_SPRINTF( 2732 - cliBuf, 2733 - BT_TMP_BUF_SIZE, 2734 - "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "OFDM-CCA/OFDM-FA/CCK-FA", \ 2735 - u4Tmp[0] & 0xffff, 2736 - faOfdm, 2737 - faCck 2738 - ); 2739 - CL_PRINTF(cliBuf); 2740 - 2741 - u4Tmp[0] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x6c0); 2742 - u4Tmp[1] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x6c4); 2743 - u4Tmp[2] = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x6c8); 2744 - u1Tmp[0] = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x6cc); 2745 - CL_SPRINTF( 2746 - cliBuf, 2747 - BT_TMP_BUF_SIZE, 2748 - "\r\n %-35s = 0x%x/ 0x%x/ 0x%x/ 0x%x", "0x6c0/0x6c4/0x6c8/0x6cc(coexTable)", \ 2749 - u4Tmp[0], 2750 - u4Tmp[1], 2751 - u4Tmp[2], 2752 - u1Tmp[0] 2753 - ); 2754 - CL_PRINTF(cliBuf); 2755 - 2756 - CL_SPRINTF( 2757 - cliBuf, 2758 - BT_TMP_BUF_SIZE, 2759 - "\r\n %-35s = %d/ %d", "0x770(high-pri rx/tx)", \ 2760 - pCoexSta->highPriorityRx, 2761 - pCoexSta->highPriorityTx 2762 - ); 2763 - CL_PRINTF(cliBuf); 2764 - CL_SPRINTF( 2765 - cliBuf, 2766 - BT_TMP_BUF_SIZE, 2767 - "\r\n %-35s = %d/ %d", "0x774(low-pri rx/tx)", \ 2768 - pCoexSta->lowPriorityRx, 2769 - pCoexSta->lowPriorityTx 2770 - ); 2771 - CL_PRINTF(cliBuf); 2772 - 2773 - halbtc8723b2ant_MonitorBtCtr(pBtCoexist); 2774 - pBtCoexist->fBtcDispDbgMsg(pBtCoexist, BTC_DBG_DISP_COEX_STATISTICS); 2775 - } 2776 - 2777 2425 2778 2426 void EXhalbtc8723b2ant_IpsNotify(struct btc_coexist *pBtCoexist, u8 type) 2779 2427 {
-1
drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.h
··· 144 144 void EXhalbtc8723b2ant_HaltNotify(struct btc_coexist *pBtCoexist); 145 145 void EXhalbtc8723b2ant_PnpNotify(struct btc_coexist *pBtCoexist, u8 pnpState); 146 146 void EXhalbtc8723b2ant_Periodical(struct btc_coexist *pBtCoexist); 147 - void EXhalbtc8723b2ant_DisplayCoexInfo(struct btc_coexist *pBtCoexist);
-8
drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
··· 85 85 #define WIFI_P2P_GO_CONNECTED BIT3 86 86 #define WIFI_P2P_GC_CONNECTED BIT4 87 87 88 - /* following is for command line utility */ 89 - #define CL_SPRINTF snprintf 90 - #define CL_PRINTF DCMD_Printf 91 - 92 88 struct btc_board_info { 93 89 /* The following is some board information */ 94 90 u8 btChipType; ··· 380 384 bool bInitilized; 381 385 bool bStopCoexDm; 382 386 bool bManualControl; 383 - u8 *cliBuf; 384 387 struct btc_statistics statistics; 385 388 u8 pwrModeVal[10]; 386 389 ··· 403 408 404 409 /* fill h2c related */ 405 410 BFP_BTC_FILL_H2C fBtcFillH2c; 406 - /* other */ 407 - BFP_BTC_DISP_DBG_MSG fBtcDispDbgMsg; 408 411 /* normal get/set related */ 409 412 BFP_BTC_GET fBtcGet; 410 413 BFP_BTC_SET fBtcSet; ··· 433 440 void EXhalbtcoutsrc_SetChipType(u8 chipType); 434 441 void EXhalbtcoutsrc_SetAntNum(u8 type, u8 antNum); 435 442 void EXhalbtcoutsrc_SetSingleAntPath(u8 singleAntPath); 436 - void EXhalbtcoutsrc_DisplayBtCoexInfo(struct btc_coexist *pBtCoexist); 437 443 438 444 #endif
-2
drivers/staging/rtl8723bs/hal/Mp_Precomp.h
··· 12 12 13 13 #define BT_TMP_BUF_SIZE 100 14 14 15 - #define DCMD_Printf DBG_BT_INFO 16 - 17 15 #ifdef bEnable 18 16 #undef bEnable 19 17 #endif
-104
drivers/staging/rtl8723bs/hal/hal_btcoex.c
··· 17 17 static u8 GLBtcWiFiInScanState; 18 18 static u8 GLBtcWiFiInIQKState; 19 19 20 - static u8 GLBtcDbgBuf[BT_TMP_BUF_SIZE]; 21 - 22 - struct btcdbginfo { /* _btcoexdbginfo */ 23 - u8 *info; 24 - u32 size; /* buffer total size */ 25 - u32 len; /* now used length */ 26 - }; 27 - 28 - static struct btcdbginfo GLBtcDbgInfo; 29 - 30 20 #define BT_Operation(Adapter) false 31 - 32 - static void DBG_BT_INFO_INIT(struct btcdbginfo *pinfo, u8 *pbuf, u32 size) 33 - { 34 - if (!pinfo) 35 - return; 36 - 37 - memset(pinfo, 0, sizeof(struct btcdbginfo)); 38 - 39 - if (pbuf && size) { 40 - pinfo->info = pbuf; 41 - pinfo->size = size; 42 - } 43 - } 44 - 45 - void DBG_BT_INFO(u8 *dbgmsg) 46 - { 47 - struct btcdbginfo *pinfo; 48 - u32 msglen; 49 - u8 *pbuf; 50 - 51 - 52 - pinfo = &GLBtcDbgInfo; 53 - 54 - if (!pinfo->info) 55 - return; 56 - 57 - msglen = strlen(dbgmsg); 58 - if (pinfo->len + msglen > pinfo->size) 59 - return; 60 - 61 - pbuf = pinfo->info + pinfo->len; 62 - memcpy(pbuf, dbgmsg, msglen); 63 - pinfo->len += msglen; 64 - } 65 21 66 22 /* */ 67 23 /* Debug related function */ ··· 564 608 return ret; 565 609 } 566 610 567 - static void halbtcoutsrc_DisplayFwPwrModeCmd(struct btc_coexist *pBtCoexist) 568 - { 569 - u8 *cliBuf = pBtCoexist->cliBuf; 570 - 571 - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %02x %02x %02x %02x %02x %02x ", "Power mode cmd ", \ 572 - pBtCoexist->pwrModeVal[0], pBtCoexist->pwrModeVal[1], 573 - pBtCoexist->pwrModeVal[2], pBtCoexist->pwrModeVal[3], 574 - pBtCoexist->pwrModeVal[4], pBtCoexist->pwrModeVal[5]); 575 - CL_PRINTF(cliBuf); 576 - } 577 - 578 611 /* */ 579 612 /* IO related function */ 580 613 /* */ ··· 775 830 rtw_hal_fill_h2c_cmd(padapter, elementId, cmdLen, pCmdBuffer); 776 831 } 777 832 778 - static void halbtcoutsrc_DisplayDbgMsg(void *pBtcContext, u8 dispType) 779 - { 780 - struct btc_coexist *pBtCoexist; 781 - 782 - 783 - pBtCoexist = (struct btc_coexist *)pBtcContext; 784 - switch (dispType) { 785 - case BTC_DBG_DISP_COEX_STATISTICS: 786 - break; 787 - case BTC_DBG_DISP_BT_LINK_INFO: 788 - break; 789 - case BTC_DBG_DISP_FW_PWR_MODE_CMD: 790 - halbtcoutsrc_DisplayFwPwrModeCmd(pBtCoexist); 791 - break; 792 - default: 793 - break; 794 - } 795 - } 796 - 797 833 /* */ 798 834 /* Extern functions called by other module */ 799 835 /* */ ··· 834 908 pBtCoexist->fBtcGetRfReg = halbtcoutsrc_GetRfReg; 835 909 836 910 pBtCoexist->fBtcFillH2c = halbtcoutsrc_FillH2cCmd; 837 - pBtCoexist->fBtcDispDbgMsg = halbtcoutsrc_DisplayDbgMsg; 838 911 839 912 pBtCoexist->fBtcGet = halbtcoutsrc_Get; 840 913 pBtCoexist->fBtcSet = halbtcoutsrc_Set; 841 914 pBtCoexist->fBtcGetBtReg = halbtcoutsrc_GetBtReg; 842 915 pBtCoexist->fBtcSetBtReg = halbtcoutsrc_SetBtReg; 843 - 844 - pBtCoexist->cliBuf = &GLBtcDbgBuf[0]; 845 916 846 917 pBtCoexist->boardInfo.singleAntPath = 0; 847 918 ··· 1143 1220 GLBtCoexist.boardInfo.singleAntPath = singleAntPath; 1144 1221 } 1145 1222 1146 - void EXhalbtcoutsrc_DisplayBtCoexInfo(struct btc_coexist *pBtCoexist) 1147 - { 1148 - if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist)) 1149 - return; 1150 - 1151 - halbtcoutsrc_LeaveLowPower(pBtCoexist); 1152 - 1153 - if (pBtCoexist->boardInfo.btdmAntNum == 2) 1154 - EXhalbtc8723b2ant_DisplayCoexInfo(pBtCoexist); 1155 - else if (pBtCoexist->boardInfo.btdmAntNum == 1) 1156 - EXhalbtc8723b1ant_DisplayCoexInfo(pBtCoexist); 1157 - 1158 - halbtcoutsrc_NormalLowPower(pBtCoexist); 1159 - } 1160 - 1161 1223 /* 1162 1224 * Description: 1163 1225 *Run BT-Coexist mechanism or not ··· 1355 1447 { 1356 1448 memcpy(GLBtCoexist.pwrModeVal, pCmdBuf, cmdLen); 1357 1449 } 1358 - 1359 - void hal_btcoex_DisplayBtCoexInfo(struct adapter *padapter, u8 *pbuf, u32 bufsize) 1360 - { 1361 - struct btcdbginfo *pinfo; 1362 - 1363 - 1364 - pinfo = &GLBtcDbgInfo; 1365 - DBG_BT_INFO_INIT(pinfo, pbuf, bufsize); 1366 - EXhalbtcoutsrc_DisplayBtCoexInfo(&GLBtCoexist); 1367 - DBG_BT_INFO_INIT(pinfo, NULL, 0); 1368 - } 1369 -
-3
drivers/staging/rtl8723bs/include/hal_btcoex.h
··· 20 20 u8 bInitlized; 21 21 }; 22 22 23 - void DBG_BT_INFO(u8 *dbgmsg); 24 - 25 23 void hal_btcoex_SetBTCoexist(struct adapter *padapter, u8 bBtExist); 26 24 bool hal_btcoex_IsBtExist(struct adapter *padapter); 27 25 bool hal_btcoex_IsBtDisabled(struct adapter *); ··· 52 54 u8 hal_btcoex_LpsVal(struct adapter *); 53 55 u32 hal_btcoex_GetRaMask(struct adapter *); 54 56 void hal_btcoex_RecordPwrMode(struct adapter *padapter, u8 *pCmdBuf, u8 cmdLen); 55 - void hal_btcoex_DisplayBtCoexInfo(struct adapter *, u8 *pbuf, u32 bufsize); 56 57 57 58 #endif /* !__HAL_BTCOEX_H__ */