[rt2x00-users] [PATCH 3/3] rt2x00: Add antenna setting for RT3070/RT3090 with RX antenna diversity support

Helmut Schaa helmut.schaa at googlemail.com
Mon Jan 17 23:52:14 EST 2011


Hi Jay,

Am Montag, 17. Januar 2011 schrieb RA-Jay Hung:
> > Is this really only valid for RT3070 and RT3090?
> 
> Currently,  it is used on 1x1 diversity chip. And currently RT3070 and
> RT3090 is more mature on rt2x00. So once other 1x1 chips become more mature,
> will add related chip macro.

Ok, fine with me then.

> > > +           value = rt2x00_get_field16(eeprom,
> > EEPROM_NIC_CONF1_ANT_DIVERSITY);
> > > +           switch (value) {
> > > +           case 0:
> > > +           case 1:
> > > +           case 2:
> > > +                   rt2x00dev->default_ant.tx = ANTENNA_A;
> > > +                   rt2x00dev->default_ant.rx = ANTENNA_A;
> > > +                   break;
> > > +           case 3:
> > > +                   rt2x00dev->default_ant.tx = ANTENNA_A;
> > > +                   rt2x00dev->default_ant.rx = ANTENNA_B;
> > > +                   break;
> > > +           }
> > > +   } else {
> > > +           rt2x00dev->default_ant.tx = ANTENNA_A;
> > > +           rt2x00dev->default_ant.rx = ANTENNA_A;
> > > +   }
> > > +
> > >     /*
> > >      * Read frequency offset and RF programming sequence.
> > >      */
> > > diff --git a/drivers/net/wireless/rt2x00/rt2x00.h
> > > b/drivers/net/wireless/rt2x00/rt2x00.h
> > > index 96c2edd..0ed4f27 100644
> > > --- a/drivers/net/wireless/rt2x00/rt2x00.h
> > > +++ b/drivers/net/wireless/rt2x00/rt2x00.h
> > > @@ -225,6 +225,8 @@ struct channel_info {  struct antenna_setup {
> > >     enum antenna rx;
> > >     enum antenna tx;
> > > +   u8 rx_chain_num;
> > > +   u8 tx_chain_num;
> >
> > Mind to explain why this is needed?
> 
> I seperate the meaning of TX/RX chain and antenna, and can be used for code flexibility,
> Some chips use 2x2 but may have three RX antenna or 1x1 but may have 2 RX antenna
> to do antenna diversity.

Makes sense. Thanks for the explanation, mind to also add that to the commit log?

Thanks,
Helmut



More information about the users mailing list