os_dep/linux/pci_intf.c
static u8 rtw_pci_switch_clk_req(_adapter *padapter, u8 value)
{
	struct dvobj_priv	*pdvobjpriv = adapter_to_dvobj(padapter);
	u8	buffer, bResult = _FALSE;
	int	error;

	buffer = value;

	if (!rtw_is_hw_init_completed(padapter))
		return bResult;

	/* the clock request is located at offset 0x81, suppose the PCIE Capability register is located at offset 0x70 */
	/* the correct code should be: search the PCIE capability register first and then the clock request is located offset 0x11 */
	error = pci_write_config_byte(pdvobjpriv->ppcidev, 0x81, buffer);
	if (error != 0)
		RTW_INFO("rtw_pci_switch_clk_req error (%d)\n", error);
	else
		bResult = _TRUE;

	return bResult;
}
/*
 * When we set 0x01 to enable clk request. Set 0x0 to disable clk req.
 */
When we set 0x01 to enable clk request. Set 0x0 to disable clk req.
When we set 0x01 to enable clk request . Set 0x0 to disable clk req .
static u8 rtw_pci_switch_clk_req(_adapter *padapter, u8 value)
{
	struct dvobj_priv	*pdvobjpriv = adapter_to_dvobj(padapter);
	u8	buffer, bResult = _FALSE;
	int	error;
	buffer = value;
	if (!rtw_is_hw_init_completed(padapter))
		return bResult;
	error = pci_write_config_byte(pdvobjpriv->ppcidev, 0x81, buffer);
	if (error != 0)
		RTW_INFO("rtw_pci_switch_clk_req error (%d)\n", error);
	else
		bResult = _TRUE;
	return bResult;
}
static u8 rtw_pci_switch_clk_req ( _adapter * padapter , u8 value ) { struct dvobj_priv * pdvobjpriv = adapter_to_dvobj ( padapter ) ; u8 buffer , bResult = _FALSE ; int error ; buffer = value ; if ( ! rtw_is_hw_init_completed ( padapter ) ) return bResult ; error = pci_write_config_byte ( pdvobjpriv -> ppcidev , 0x81 , buffer ) ; if ( error != 0 ) RTW_INFO ( " \n " , error ) ; else bResult = _TRUE ; return bResult ; }
When we set 0x01 to enable clk request.
When we set 0x01 to enable clk request .
/* the clock request is located at offset 0x81, suppose the PCIE Capability register is located at offset 0x70 */ /* the correct code should be: search the PCIE capability register first and then the clock request is located offset 0x11 */