資源簡介
wifi rt3070 驅動源代碼 可以下載進行交叉編譯用在android平臺上。
代碼片段和文件信息
/*
?*************************************************************************
?*?Ralink?Tech?Inc.
?*?5F.?No.36?Taiyuan?St.?Jhubei?City
?*?Hsinchu?County?302
?*?Taiwan?R.O.C.
?*
?*?(c)?Copyright?2002-2010?Ralink?Technology?Inc.
?*
?*?This?program?is?free?software;?you?can?redistribute?it?and/or?modify??*
?*?it?under?the?terms?of?the?GNU?General?Public?License?as?published?by??*
?*?the?Free?Software?Foundation;?either?version?2?of?the?License?or?????*
?*?(at?your?option)?any?later?version.???????????????????????????????????*
?*???????????????????????????????????????????????????????????????????????*
?*?This?program?is?distributed?in?the?hope?that?it?will?be?useful???????*
?*?but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of????????*
?*?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the?????????*
?*?GNU?General?Public?License?for?more?details.??????????????????????????*
?*???????????????????????????????????????????????????????????????????????*
?*?You?should?have?received?a?copy?of?the?GNU?General?Public?License?????*
?*?along?with?this?program;?if?not?write?to?the?????????????????????????*
?*?Free?Software?Foundation?Inc.???????????????????????????????????????*
?*?59?Temple?Place?-?Suite?330?Boston?MA??02111-1307?USA.?????????????*
?*???????????????????????????????????????????????????????????????????????*
?*************************************************************************/
#ifdef?RT28xx
#include?“rt_config.h“
VOID?RT28xx_ChipSwitchChannel(
IN?PRTMP_ADAPTER? pAd
IN?UCHAR Channel
IN?BOOLEAN bScan)?
{
CHAR????TxPwer?=?0?TxPwer2?=?DEFAULT_RF_TX_POWER;?/*Bbp94?=?BBPR94_DEFAULT?TxPwer2?=?DEFAULT_RF_TX_POWER;*/
UCHAR index;
UINT32? Value?=?0;?/*BbpReg?Value;*/
UCHAR? RFValue;
UINT32?i?=?0;
ULONG R2?=?0?R3?=?DEFAULT_RF_TX_POWER?R4?=?0;
RTMP_RF_REGS?*RFRegTable;
i?=?i;?/*?avoid?compile?warning?*/
RFValue?=?0;
/*?Search?Tx?power?value*/
/*
We?can‘t?use?ChannelList?to?search?channel?since?some?central?channl‘s?txpowr?doesn‘t?list?
in?ChannelList?so?use?TxPower?array?instead.
*/
for?(index?=?0;?index? {
if?(Channel?==?pAd->TxPower[index].Channel)
{
TxPwer?=?pAd->TxPower[index].Power;
TxPwer2?=?pAd->TxPower[index].Power2;
break;
}
}
if?(index?==?MAX_NUM_OF_CHANNELS)
{
DBGPRINT(RT_DEBUG_ERROR?(“AsicSwitchChannel:?Can‘t?find?the?Channel#%d?\n“?Channel));
}
RFRegTable?=?RF2850RegTable;
switch?(pAd->RfIcType)
{
case?RFIC_2820:
case?RFIC_2850:
case?RFIC_2720:
case?RFIC_2750:
for?(index?=?0;?index? {
if?(Channel?==?RFRegTable[index].Channel)
{
R2?=?RFRegTable[index].R2;
if?(pAd->Antenna.field.TxPath?==?1)
{
R2?|=?0x4000; /*If?TXpath?is?1?bit?14?=?1;*/
}
if?((pAd->Antenna.field.RxPath?==?2)
)
{
R2?|=?0x40; /*write?1?to?off?Rxpath.*/
}
else?if?((pAd->Antenna.field.RxPath?==?1)
)
{
R2?|=?0x20040
- 上一篇:圖書管理系統-Java-大作業
- 下一篇:酒店管理系統JAVA源代碼
評論
共有 條評論