Search Linux Wireless

Re: [RFC PATCH] nl80211/cfg80211/mac80211: Add support for setting transmit power

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

 



On Tue, 2010-06-15 at 11:29 +0200, ext Johannes Berg wrote:
> On Tue, 2010-06-15 at 12:17 +0300, Juuso Oikarinen wrote:
> 
> > + * @NL80211_CMD_SET_TX_POWER: Set the used transmit power level (using
> > + *	%NL80211_ATTR_TX_POWER_SETTING and %NL80211_ATTR_TX_POWER_LEVEL).
> 
> We have a lot of such settings (RTS threshold, coverage class, ...) done
> with SET_WIPHY, shouldn't this also be done there?

Ok, I will look into that.

> > +	/*
> > +	 * Though the nl80211 supports negative mBm values, the interface
> > +	 * below it does not, for now.
> > +	 */
> > +	if (mbm < 0) {
> > +		err = -EOPNOTSUPP;
> > +		goto out;
> > +	}
> > +
> > +	rtnl_lock();
> > +
> > +	err = get_rdev_dev_by_info_ifindex(info, &rdev, &dev);
> > +	if (err)
> > +		goto unlock_rdev;
> > +
> > +	wdev = dev->ieee80211_ptr;
> > +
> > +	if (!rdev->ops->set_tx_power) {
> > +		return -EOPNOTSUPP;
> > +		goto unlock_rdev;
> > +	}
> > +
> > +	err = rdev->ops->set_tx_power(wdev->wiphy, type, MBM_TO_DBM(mbm));
> 
> I think the API mismatch should be handled in mac80211 rather than
> cfg80211, that goes for both the negative values (actually, shouldn't
> that be non-positive for mac80211?) and mBm vs. dBm -- and mac80211
> should probably reject fractional dBm values for now.

Ok. If I adjust the cfg80211 ops function for this, I'll need to see
about full-mac drivers also implementing the function besides the
mac80211. I'll look into it.

-Juuso

> johannes
> 


--
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