rtl8180_grf5101.c revision a734c64bff58bda2fa48c2795453e092167b0ff7
/*
* Radio tuning for GCT GRF5101 on RTL8180
*
* Copyright 2007 Andrea Merello <andreamrl@tiscali.it>
*
* Modified slightly for iPXE, June 2009 by Joshua Oreman.
*
* Code from the BSD driver and the rtl8181 project have been
* very useful to understand certain things
*
* I want to thanks the Authors of such projects and the Ndiswrapper
* project Authors.
*
* A special Big Thanks also is for all people who donated me cards,
* making possible the creation of the original rtl8180 driver
* from which this code is derived!
*
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <unistd.h>
#include <ipxe/net80211.h>
#include "rtl818x.h"
#define GRF5101_ANTENNA 0xA3
static const int grf5101_encode[] = {
0x0, 0x8, 0x4, 0xC,
0x2, 0xA, 0x6, 0xE,
0x1, 0x9, 0x5, 0xD,
0x3, 0xB, 0x7, 0xF
};
{
/* MAC will bang bits to the chip */
phy_config |= 0x90000000;
/* This was originally a 32-bit write to a typecast
RFPinsOutput, but gcc complained about aliasing rules. -JBO */
mdelay(3);
}
{
ant |= BB_ANTENNA_B;
if (chan == 14)
}
struct net80211_channel *channelp)
{
/* set TX power */
/* set frequency */
}
{
anaparam &= 0x000fffff;
anaparam |= 0x3f900000;
}
{
/* baseband configuration */
else
}
.name = "GCT GRF5101",
.id = 5,
.init = grf5101_rf_init,
.stop = grf5101_rf_stop,
};