Search Linux Wireless

Re: [PATCH 4/4] mac80211: add phy information to giwname

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

 



On Tue, Jun 24, 2008 at 1:42 PM, Michael Buesch <mb@xxxxxxxxx> wrote:
> On Tuesday 24 June 2008 12:38:01 Tomas Winkler wrote:
>> This patch add phy information to giwname. Currently
>> 802.11b is not treated.
>>
>> Quoting:
>> It's not useless, it's supposed to tell you about the protocol
>> capability of the device, like "IEEE 802.11b" or "IEEE 802.11abg"
>
> Well, I think it _is_ pretty useless.
> However...
>
Still many people are using wireless extension and this is probably
most convenient way to get this info.
For example 4956 comes with 3 combinations g, ag, and agn.
It's displayed upon iwconfig

>> @@ -135,7 +135,24 @@ static int ieee80211_ioctl_giwname(struct net_device *dev,
>>                                  struct iw_request_info *info,
>>                                  char *name, char *extra)
>>  {
>> +     struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>> +     struct ieee80211_supported_band *sband;
>> +     u8 is_ht = 0;
>> +
>>       strcpy(name, "IEEE 802.11");
>> +     sband = local->hw.wiphy->bands[IEEE80211_BAND_5GHZ];
>> +
>> +     if (sband) {
>> +             strcat(name, "a");
>> +             is_ht |= sband->ht_info.ht_supported;
>> +     }
>> +     sband = local->hw.wiphy->bands[IEEE80211_BAND_2GHZ];
>> +     if (sband) {
>> +             strcat(name, "g");
>> +             is_ht |= sband->ht_info.ht_supported;
>
> What about b-only devices?

See the log message...(known issue). Currently you have to loop over
rates to get this info. I wasn't sure if they are any b-only NICs
under mac80211 so I didn't run to implement it.
>
>> +     }
>> +     if (is_ht)
>> +             strcat(name, "n");
>>
>>       return 0;
>>  }
>
>
>
> --
> Greetings Michael.
> --
> 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
>
--
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