阅读:1770回复:4
有偿求助:关于MAC芯片为RTL8185的无线网卡驱动!
有偿求助:
我最近参与了一个嵌入式系统开发的项目,该系统所用的DSP为Philips的TM1300,操作系统为pSOS嵌入式系统.我的主要工作是在WLAN下进行无线网卡驱动开发,我们所用的无线网卡型号为KN-W510P,网卡的MAC芯片为RTL8185,射频芯片为RTL8225,我移植开源代码进行修改之后调试,没有成功。现在基本确认我的问题出在网卡初始化部分(包括射频初始化),若是哪位做过这款网卡的驱动,无论是何种平台和操作系统下的程序,敬请将这部分程序发给我,我现在急需帮助.若是哪位发过来的程序能帮我成功完成此驱动程序开发,我愿意提供相当的报酬。下面是我的联系方式: Email:hzk0601@163.com QQ:849566765 |
|
沙发#
发布于:2008-06-04 09:53
还没搞定啊。。。。别的芯片初始化的我到有,这个没有。。。
|
|
板凳#
发布于:2008-06-04 15:28
回GoodOnline:
我搞到的网卡资料缺少操作寄存器的描述,所以不知道驱动程序初始化部分是否完整,整个程序我反复看过很多次了,能排除的问题都已经排除了,似乎可以确定问题出在初始化部分,但没有完整的资料,所以无法详细核对。你能不能将你做过的网卡芯片的初始化程序发给我啊,我的email:hzk0601@163.com 非常感谢! |
|
地板#
发布于:2008-06-04 17:13
如果在北京的话,可以提供面对面地帮助。
代码很庞大。。。。,也很猥琐。 |
|
地下室#
发布于:2008-06-04 17:57
struct r8180_priv *priv = ieee80211_priv(dev);
u32 anaparam; u16 word; u8 config3; // int i; rtl8180_rtx_disable(dev); rtl8180_reset(dev); /* seems that 0xffff or 0xafff will cause * HW interrupt line crash */ //priv->irq_mask = 0xafff; // priv->irq_mask = 0x4fcf; /* enable beacon timeout, beacon TX ok and err * LP tx ok and err, HP TX ok and err, NP TX ok and err, * RX ok and ERR, and GP timer */ priv->irq_mask = 0x6fcf; priv->dma_poll_mask = 0; rtl8180_beacon_tx_disable(dev); if(priv->card_type == CARDBUS ){ config3=read_nic_byte(dev, CONFIG3); write_nic_byte(dev,CONFIG3,config3 | CONFIG3_FuncRegEn); write_nic_word(dev,FEMR, FEMR_INTR | FEMR_WKUP | FEMR_GWAKE | read_nic_word(dev, FEMR)); } rtl8180_set_mode(dev, EPROM_CMD_CONFIG); write_nic_dword(dev, MAC0, ((u32*)dev->dev_addr)[0]); write_nic_word(dev, MAC4, ((u32*)dev->dev_addr)[1] & 0xffff ); rtl8180_set_mode(dev, EPROM_CMD_NORMAL); rtl8180_update_msr(dev); if(!priv->card_8185){ anaparam = eprom_read(dev,EPROM_ANAPARAM_ADDRLWORD); anaparam |= eprom_read(dev,EPROM_ANAPARAM_ADDRHWORD)<<16; rtl8180_set_anaparam(dev,anaparam); } /* These might be unnecessary since we do in rx_enable / tx_enable */ fix_rx_fifo(dev); fix_tx_fifo(dev); /*set_nic_rxring(dev); set_nic_txring(dev);*/ rtl8180_set_mode(dev, EPROM_CMD_CONFIG); /* The following is very strange. seems to be that 1 means test mode, but we need to acknolwledges the nic when a packet is ready altought we set it to 0 */ write_nic_byte(dev, CONFIG2, read_nic_byte(dev,CONFIG2) &~\ (1<<CONFIG2_DMA_POLLING_MODE_SHIFT)); //^the nic isn't in test mode if(priv->card_8185) write_nic_byte(dev, CONFIG2, read_nic_byte(dev,CONFIG2)|(1<<4)); rtl8180_set_mode(dev,EPROM_CMD_NORMAL); write_nic_dword(dev,INT_TIMEOUT,0); #ifdef DEBUG_REGISTERS rtl8180_dump_reg(dev); #endif if(!priv->card_8185) { /* experimental - this might be needed to calibrate AGC, anyway it shouldn't hurt */ write_nic_byte(dev, CONFIG5, read_nic_byte(dev, CONFIG5) | (1<<AGCRESET_SHIFT)); read_nic_byte(dev, CONFIG5); udelay(15); write_nic_byte(dev, CONFIG5, read_nic_byte(dev, CONFIG5) &~ (1<<AGCRESET_SHIFT)); }else{ write_nic_byte(dev, WPA_CONFIG, 0); //write_nic_byte(dev, TESTR, 0xd); } rtl8180_no_hw_wep(dev); if(priv->card_8185){ rtl8185_set_rate(dev); write_nic_byte(dev, RATE_FALLBACK, 0x81); // write_nic_byte(dev, 0xdf, 0x15); }else{ word = read_nic_word(dev, BRSR); word &= ~BRSR_MBR; word &= ~BRSR_BPLCP; word |= ieeerate2rtlrate(priv->ieee80211->basic_rate); write_nic_word(dev, BRSR, word); } if(priv->card_8185){ write_nic_byte(dev, GP_ENABLE,read_nic_byte(dev, GP_ENABLE) & ~(1<<6)); //FIXME cfg 3 ClkRun enable - isn't it ReadOnly ? rtl8180_set_mode(dev, EPROM_CMD_CONFIG); write_nic_byte(dev,CONFIG3, read_nic_byte(dev, CONFIG3) |(1<<CONFIG3_CLKRUN_SHIFT)); rtl8180_set_mode(dev, EPROM_CMD_NORMAL); } priv->rf_init(dev); if(priv->rf_set_sens != NULL) priv->rf_set_sens(dev,priv->sens); rtl8180_irq_enable(dev); |
|