On Sun, Dec 6, 2009 at 9:29 AM, Lukáš Turek <8...@praha12.net> wrote: > New nl80211 attribute NL80211_ATTR_WIPHY_COVERAGE_CLASS allows setting > IEEE 802.11 coverage class, which is then used by drivers to calculate > slot time and ACK timeout for long distance links. > > Two iw parameters are added: 'coverage' sets the coverage class > directly, while 'distance' is more user-friendly, as it allows to set > just the link distance and let iw do the necessary calculation itself. > > Signed-off-by: Lukas Turek <8...@praha12.net> > --- > info.c | 7 +++++++ > nl80211.h | 15 +++++++++++++++ > phy.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 80 insertions(+), 0 deletions(-) > > diff --git a/info.c b/info.c > index ddff78b..3c69afc 100644 > --- a/info.c > +++ b/info.c > @@ -264,6 +264,13 @@ static int print_phy_handler(struct nl_msg *msg, void > *arg) > printf("\tRTS threshold: %d\n", rts); > } > > + if (tb_msg[NL80211_ATTR_WIPHY_COVERAGE_CLASS]) { > + unsigned int coverage;
Just some quick comments. u8 seems more appropriate, given that you define this a u8 anyway. > + > + coverage = > nla_get_u8(tb_msg[NL80211_ATTR_WIPHY_COVERAGE_CLASS]); > + printf("\tCoverage class: %d (up to %dm)\n", coverage, 900 * > coverage); printf ? Luis _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel