Search Linux Wireless

Re: PROPOSAL: cfg80211 antenna selection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/11/26 Holger Schurig <holgerschurig@xxxxxxxxx>:
>> While at it might as well make this some configurable struct
>> which the drivers can add to the wiphy just as with the
>> subbands.
>
> Something like this?
>
>
> struct ieee80211_antenna lbs_antennas {
>        u32 hwvalue;
>        u32 flags;
>        u32 capability;
>        int max_gain;
> }
>
> static struct ieee80211_antenna lbs_antennas[] = {
>        {
>                .hwvalue = 0,
>                .capability = IEEE80211_ANTENNA_RXTX,
>        }
> };
>
> wiphy->antennas = lbs_antennas;
> wiphy->n_anteanns = ARRAY_SIZE(lbs_antennas);
>
> Or should the antennas be added to "struct
> ieee80211_supported_band" instead of wiphy?
>
>
> Capabilities could be
>
> #define IEEE80211_ANTENNA_RX         BIT(0)
> #define IEEE80211_ANTENNA_TX         BIT(1)
> #define IEEE80211_ANTENNA_OMNI       BIT(2)
> #define IEEE80211_ANTENNA_SECTIONAL  BIT(3)
> #define IEEE80211_ANTENNA_RXTX
>   (IEEE80211_ANTENNA_RX | IEEE80211_ANTENNA_TX)
>
> An unknown gain would be set to 0.
>
>
>
>> Not sure how to get this from other cards. Anyone know how
>> about on b43, iwlwifi, rallink?
>
> Libertas doesn't give this to you, AFAIK you can just get the
> number of antennas.
>
>
>> Not sure if allowing for ops for chainmask setting would also
>> be helpeful here, that would need some review.
>
> What is "chainmask setting", I don't even know the concept.
>
>
>
> You didn't give any comment on my mask idea for the user-space
> API.
>


This is what we have on ath5k right now...

enum ath5k_ant_mode {
        AR5K_ANTMODE_DEFAULT    = 0,    /* default antenna setup */
        AR5K_ANTMODE_FIXED_A    = 1,    /* only antenna A is present */
        AR5K_ANTMODE_FIXED_B    = 2,    /* only antenna B is present */
        AR5K_ANTMODE_SINGLE_AP  = 3,    /* sta locked on a single ap */
        AR5K_ANTMODE_SECTOR_AP  = 4,    /* AP with tx antenna set on tx desc */
        AR5K_ANTMODE_SECTOR_STA = 5,    /* STA with tx antenna set on tx desc */
        AR5K_ANTMODE_DEBUG      = 6,    /* Debug mode -A -> Rx, B-> Tx- */
        AR5K_ANTMODE_MAX,
};

...think more like antenna setups or scenarios.

#define IEEE80211_ANTENNA_RX         BIT(0)

Also i suggest that we don't use IEEE80211_* for non 80211 related stuff...

-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux