From: mabbas <mabbas@linux.intel.com>
To: netdev@vger.kernel.org
Cc: jbenc@suse.cz
Subject: [PATCH 6/7] d80211: diplay supported rates in readable format
Date: Mon, 28 Aug 2006 13:52:06 -0700 [thread overview]
Message-ID: <44F35776.7060800@linux.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: d80211-iwlist-display.patch --]
[-- Type: text/x-patch, Size: 1318 bytes --]
This patch modify d80211 to report supported rates in readable
format in iwlist scan command.
Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
diff --git a/net/d80211/ieee80211_sta.c b/net/d80211/ieee80211_sta.c
index a933d92..b2e45a4 100644
--- a/net/d80211/ieee80211_sta.c
+++ b/net/d80211/ieee80211_sta.c
@@ -2714,15 +2714,21 @@ ieee80211_sta_scan_result(struct net_dev
current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
buf);
- p = buf;
- p += sprintf(p, "supp_rates=");
- for (i = 0; i < bss->supp_rates_len; i++)
- p+= sprintf(p, "%02x", bss->supp_rates[i]);
- memset(&iwe, 0, sizeof(iwe));
- iwe.cmd = IWEVCUSTOM;
- iwe.u.data.length = strlen(buf);
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
- buf);
+ /* dispaly all support rates in readable format */
+ p = current_ev + IW_EV_LCP_LEN;
+ iwe.cmd = SIOCGIWRATE;
+ /* Those two flags are ignored... */
+ iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
+
+ for (i = 0; i < bss->supp_rates_len; i++) {
+ iwe.u.bitrate.value = ((bss->supp_rates[i] &
+ 0x7f) * 500000);
+ p = iwe_stream_add_value(current_ev, p,
+ end_buf, &iwe, IW_EV_PARAM_LEN);
+ }
+ /* Check if we added any rate */
+ if((p - current_ev) > IW_EV_LCP_LEN)
+ current_ev = p;
kfree(buf);
break;
next reply other threads:[~2006-08-28 20:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-28 20:52 mabbas [this message]
2006-09-21 19:23 ` [PATCH 6/7] d80211: diplay supported rates in readable format Jiri Benc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44F35776.7060800@linux.intel.com \
--to=mabbas@linux.intel.com \
--cc=jbenc@suse.cz \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).