From: Dave <kilroyd@googlemail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] wireless: consolidate on a single escape_essid implementation
Date: Thu, 25 Sep 2008 22:00:41 +0100 [thread overview]
Message-ID: <48DBFBF9.10809@gmail.com> (raw)
In-Reply-To: <1222294536-24367-1-git-send-email-linville@tuxdriver.com>
John W. Linville wrote:
> This is also an excuse to create the long rumored lib80211 module...
> +++ b/net/wireless/lib80211.c
> @@ -0,0 +1,58 @@
> +/*
> + * lib80211 -- common bits for IEEE802.11 drivers
> + *
> + * Copyright(c) 2008 John W. Linville <linville@tuxdriver.com>
> + *
> + */
> +
> +#include <linux/module.h>
> +#include <linux/wireless.h>
Alternatively #include <linux/ieee80211.h>, and avoid the WE header/constants? Or would you expect WE helpers in this file as well?
> +const char *escape_essid(const char *essid, u8 essid_len)
> +{
> + static char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
[IEEE80211_SSID_MAX_LEN * 2 + 1]
> + const char *s = essid;
> + char *d = escaped;
> +
> + if (is_empty_essid(essid, essid_len)) {
> + memcpy(escaped, "<hidden>", sizeof("<hidden>"));
> + return escaped;
> + }
> +
> + essid_len = min(essid_len, (u8) IW_ESSID_MAX_SIZE);
IEEE80211_SSID_MAX_LEN
Also, are we worried about drivers interrupting each other and getting the others SSID? In which case maybe something like print_mac:
/* in lib80211.h */
#define DECLARE_SSID_BUF(x) char x[IEEE80211_SSID_MAX_LEN * 2 + 1]
const char *print_ssid(char *escaped, const char *ssid, u8 ssid_len);
Regards,
Dave.
next prev parent reply other threads:[~2008-09-25 21:01 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-24 22:15 [PATCH] wireless: consolidate on a single escape_essid implementation John W. Linville
2008-09-24 23:24 ` Luis R. Rodriguez
2008-09-24 23:32 ` John W. Linville
2008-09-25 0:21 ` Luis R. Rodriguez
2008-09-25 0:39 ` John W. Linville
2008-09-25 1:52 ` Luis R. Rodriguez
2008-09-25 6:34 ` Holger Schurig
2008-09-25 8:43 ` Johannes Berg
2008-09-25 16:57 ` Dan Williams
2008-09-26 11:08 ` Johannes Berg
2008-09-26 14:51 ` Johannes Berg
2008-09-26 14:57 ` Johannes Berg
2008-09-25 23:03 ` Dave
2008-09-25 4:46 ` Johannes Berg
2008-09-25 4:49 ` Johannes Berg
2008-09-25 16:47 ` Dan Williams
2008-09-25 16:48 ` Dan Williams
2008-09-25 21:00 ` Dave [this message]
2008-10-01 2:15 ` [PATCH 0/5] wireless: single escape_essid implementation and related cleanups John W. Linville
2008-10-01 2:15 ` [PATCH 1/5] wireless: consolidate on a single escape_essid implementation John W. Linville
2008-10-01 2:15 ` [PATCH 2/5] wireless: remove NETWORK_EMPTY_ESSID flag John W. Linville
2008-10-01 2:15 ` [PATCH 3/5] wireless: escape_ssid should handle non-printables John W. Linville
2008-10-01 2:15 ` [PATCH 4/5] wireless: use individual buffers for printing ssid values John W. Linville
2008-10-01 2:15 ` [PATCH 5/5] wireless: avoid some net/ieee80211.h vs. linux/ieee80211.h conflicts John W. Linville
2008-10-01 9:25 ` [PATCH 0/5] wireless: single escape_essid implementation and related cleanups Johannes Berg
2008-10-02 19:10 ` Dan Williams
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=48DBFBF9.10809@gmail.com \
--to=kilroyd@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.