uint oid_rt_pro_rf_read_registry_hdl(struct oid_par_priv *poid_par_priv) { uint status = NDIS_STATUS_SUCCESS; struct _adapter *Adapter = (struct _adapter *) (poid_par_priv->adapter_context); if (poid_par_priv->type_of_oid != SET_OID) return NDIS_STATUS_NOT_ACCEPTED; if (poid_par_priv->information_buf_len == (sizeof(unsigned long)*3)) { if (Adapter->mppriv.act_in_progress == true) status = NDIS_STATUS_NOT_ACCEPTED; else { Adapter->mppriv.act_in_progress = true; Adapter->mppriv.workparam.bcompleted = false; Adapter->mppriv.workparam.act_type = MPT_READ_RF; Adapter->mppriv.workparam.io_offset = *(unsigned long *) poid_par_priv->information_buf; Adapter->mppriv.workparam.io_value = 0xcccccccc; if (!r8712_getrfreg_cmd(Adapter, *(unsigned char *)poid_par_priv->information_buf, (unsigned char *)&Adapter->mppriv.workparam. io_value)) status = NDIS_STATUS_NOT_ACCEPTED; } } else status = NDIS_STATUS_INVALID_LENGTH; return status; }
uint oid_rt_pro_rf_read_registry_hdl(struct oid_par_priv *poid_par_priv) { uint status = RNDIS_STATUS_SUCCESS; struct _adapter *Adapter = (struct _adapter *) (poid_par_priv->adapter_context); if (poid_par_priv->type_of_oid != SET_OID) /* QUERY_OID */ return RNDIS_STATUS_NOT_ACCEPTED; if (poid_par_priv->information_buf_len == (sizeof(unsigned long) * 3)) { if (Adapter->mppriv.act_in_progress) { status = RNDIS_STATUS_NOT_ACCEPTED; } else { /* init workparam */ Adapter->mppriv.act_in_progress = true; Adapter->mppriv.workparam.bcompleted = false; Adapter->mppriv.workparam.act_type = MPT_READ_RF; Adapter->mppriv.workparam.io_offset = *(unsigned long *) poid_par_priv->information_buf; Adapter->mppriv.workparam.io_value = 0xcccccccc; /* RegOffsetValue - The offset of RF register to read. * RegDataWidth - The data width of RF register to read. * RegDataValue - The value to read. * RegOffsetValue = *((unsigned long *)InformationBuffer); * RegDataWidth = *((unsigned long *)InformationBuffer+1); * RegDataValue = *((unsigned long *)InformationBuffer+2); */ if (!r8712_getrfreg_cmd(Adapter, *(unsigned char *)poid_par_priv->information_buf, (unsigned char *)&Adapter->mppriv.workparam. io_value)) status = RNDIS_STATUS_NOT_ACCEPTED; } } else { status = RNDIS_STATUS_INVALID_LENGTH; } return status; }