[WCNCR00155177] misc: Fix buffer command timeout

[Description]
Fix buffer command timeout

The cost of full-channel-RF-cal is around 6000ms, but the OID timeout is
2000ms only. Update this OID timeout to 6000ms in this case.
Otherwise, use default settings.

Change-Id: I0dc625c5e08bc929b9fbfac9869049f8f494962d
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
CR-Id: WCNCR00155177
Feature: misc
diff --git a/os/linux/gl_init.c b/os/linux/gl_init.c
index 95dd92f..3073ada 100644
--- a/os/linux/gl_init.c
+++ b/os/linux/gl_init.c
@@ -2027,6 +2027,7 @@
 	UINT_32 chip_id;
 	UINT_8 aucEeprom[32];
 	WLAN_STATUS retWlanStat = WLAN_STATUS_FAILURE;
+	INT_32 i4OidTimeout = -1;
 
 	if (prAdapter->fgIsSupportPowerOnSendBufferModeCMD == TRUE) {
 		DBGLOG(INIT, INFO, "Start Efuse Buffer Mode ..\n");
@@ -2096,11 +2097,18 @@
 		prSetEfuseBufModeInfo->ucCmdType = 0x1 | (prAdapter->rWifiVar.ucCalTimingCtrl << 4);
 		prSetEfuseBufModeInfo->ucCount   = 0xFF; /* ucCmdType 1 don't care the ucCount */
 
-		rStatus = kalIoctl(prGlueInfo,
+		if (!prAdapter->rWifiVar.ucCalTimingCtrl) {
+			/* Full channel RF-cal mode. Need 6000ms */
+			i4OidTimeout = 6000;
+		}
+
+		rStatus = kalIoctlTimeout(prGlueInfo,
 							wlanoidSetEfusBufferMode,
 							(PVOID)prSetEfuseBufModeInfo,
 							sizeof(PARAM_CUSTOM_EFUSE_BUFFER_MODE_T),
-							FALSE, TRUE, TRUE, &u4BufLen);
+							FALSE, TRUE, TRUE,
+							i4OidTimeout,
+							&u4BufLen);
 
 	}