From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@oss.sgi.com, Gertjan van Wingerde <gwingerde@home.nl>,
sfeldma@pobox.com, jkmaline@cc.hut.fi
Subject: Re: [RFC] Wireless extensions rethink
Date: Thu, 17 Jun 2004 12:13:38 -0700 [thread overview]
Message-ID: <20040617191338.GD32216@bougret.hpl.hp.com> (raw)
In-Reply-To: <40D1EAD9.6090403@pobox.com>
On Thu, Jun 17, 2004 at 03:02:49PM -0400, Jeff Garzik wrote:
> Jean Tourrilhes wrote:
> >On Thu, Jun 17, 2004 at 02:26:20PM -0400, Jeff Garzik wrote:
> >
> >>Note that the above is only a first step. Through the standard Linux
> >>development process -- evolution -- each hook can be pared down to
> >>precisely what each call needs. The above allows for a quick transition
> >>of drivers, while keeping them working.
> >>
> >> Jeff
> >
> >
> > Have you looked at the patch I sent you ? In which way does it
> >fails to meet your need ?
>
>
> The three major problems I listed in a previous email are still
> present...
Are we talking of the same patch ? I'm talking of this patch :
http://marc.theaimsgroup.com/?l=linux-netdev&m=108749580004668&w=2
I reattached the patch below. It's short enough.
> Also there is a fourth -- WE doesn't work 100% when you have
> a 32-bit userland and a 64-bit kernel.
Since when ? What made you change your mind ?
Please check :
http://marc.theaimsgroup.com/?l=linux-netdev&m=107894322418086&w=2
> Jeff
Jean
-----------------------------------------------------------
--- linux/include/net/iw_handler.j1.h Thu Jun 17 10:16:22 2004
+++ linux/include/net/iw_handler.h Thu Jun 17 10:17:24 2004
@@ -301,6 +301,9 @@ typedef int (*iw_handler)(struct net_dev
*/
struct iw_handler_def
{
+ /* Wireless Ops definitions */
+ struct wireless_ops * wireless_ops;
+
/* Number of handlers defined (more precisely, index of the
* last defined handler + 1) */
__u16 num_standard;
--- linux/net/core/wireless.j1.c Thu Jun 17 10:08:45 2004
+++ linux/net/core/wireless.c Thu Jun 17 10:28:59 2004
@@ -343,8 +343,14 @@ static inline iw_handler get_handler(str
if(dev->wireless_handlers == NULL)
return NULL;
- /* Try as a standard command */
index = cmd - SIOCIWFIRST;
+
+ /* Try as wireless_ops */
+ if((index < (SIOCIWFIRSTPRIV - SIOCIWFIRST)) &&
+ (dev->wireless_handlers->wireless_ops != NULL))
+ return &iw_process_wireless_ops;
+
+ /* Try as a standard command */
if(index < dev->wireless_handlers->num_standard)
return dev->wireless_handlers->standard[index];
@@ -1372,3 +1378,41 @@ EXPORT_SYMBOL(iw_handler_set_spy);
EXPORT_SYMBOL(iw_handler_set_thrspy);
EXPORT_SYMBOL(wireless_send_event);
EXPORT_SYMBOL(wireless_spy_update);
+
+/*********************** WIRELESS OPS SUPPORT ***********************/
+/*
+ * Documentation to be added by Jeff ;-)
+ */
+
+/*------------------------------------------------------------------*/
+/*
+ * Generic Wireless Handler to process Wireless Ops
+ */
+int iw_process_wireless_ops(struct net_device * dev,
+ struct iw_request_info *info,
+ union iwreq_data * wrqu,
+ char * extra)
+{
+ struct wireless_ops * ops;
+
+ /* Already verified != NULL in get_handler() */
+ ops = dev->wireless_handlers->wireless_ops;
+
+ /* Just do it */
+ switch(info->cmd)
+ {
+ case SIOCSIWESSID:
+ /* Set ESSID */
+ if(ops->set_essid != NULL)
+ return ops->set_essid(dev, extra, wrqu->essid.length,
+ wrqu->essid.flags);
+ case SIOCGIWESSID:
+ /* Get ESSID */
+ if(ops->get_essid != NULL)
+ return ops->get_essid(dev, extra, &wrqu->essid.length,
+ &wrqu->essid.flags);
+ default:
+ }
+ return -EOPNOTSUPP;
+}
+
next prev parent reply other threads:[~2004-06-17 19:13 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-11 18:49 [RFC] Wireless extensions rethink Feldman, Scott
2004-06-15 16:39 ` Gertjan van Wingerde
2004-06-15 17:22 ` Vladimir Kondratiev
2004-06-16 9:13 ` Scott Feldman
2004-06-16 15:28 ` Gerald Britton
2004-06-16 17:40 ` Vladimir Kondratiev
2004-06-16 17:53 ` Scott Feldman
2004-06-16 19:06 ` Gerald Britton
2004-06-17 5:57 ` Luis R. Rodriguez
2004-06-16 17:46 ` Gertjan van Wingerde
2004-06-16 19:06 ` Scott Feldman
2004-06-16 19:49 ` Jeff Garzik
2004-06-16 22:25 ` Scott Feldman
2004-06-16 20:50 ` Jean Tourrilhes
2004-06-16 20:42 ` Jean Tourrilhes
2004-06-16 21:36 ` Jeff Garzik
2004-06-16 22:33 ` Jean Tourrilhes
2004-06-16 23:06 ` Jeff Garzik
2004-06-16 23:11 ` Jean Tourrilhes
2004-06-17 17:47 ` Jean Tourrilhes
2004-06-17 18:23 ` Jeff Garzik
2004-06-17 18:26 ` Jeff Garzik
2004-06-17 18:30 ` Gertjan van Wingerde
2004-06-17 18:51 ` Stephen Hemminger
2004-06-17 19:00 ` Jean Tourrilhes
2004-06-17 19:10 ` Jeff Garzik
2004-06-17 18:58 ` Jean Tourrilhes
2004-06-17 19:02 ` Jeff Garzik
2004-06-17 19:13 ` Jean Tourrilhes [this message]
2004-06-17 19:34 ` Jeff Garzik
2004-06-17 19:44 ` Jean Tourrilhes
2004-06-17 20:06 ` Jeff Garzik
2004-06-17 20:39 ` Jean Tourrilhes
2004-06-17 18:56 ` Jean Tourrilhes
2004-06-17 19:09 ` Jeff Garzik
2004-06-17 19:11 ` Jeff Garzik
2004-06-17 19:31 ` Jean Tourrilhes
2004-06-17 19:52 ` Jeff Garzik
2004-06-17 20:46 ` Jean Tourrilhes
2004-06-18 22:11 ` Andrew Morton
2004-06-18 22:54 ` Jeff Garzik
2004-06-16 22:48 ` Scott Feldman
-- strict thread matches above, loose matches on Subject: below --
2004-06-07 19:51 Gertjan van Wingerde
2004-06-07 20:52 ` Ben Greear
2004-06-07 18:33 Feldman, Scott
2004-06-07 18:39 ` Stephen Hemminger
2004-06-08 11:19 ` Herbert Xu
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=20040617191338.GD32216@bougret.hpl.hp.com \
--to=jt@bougret.hpl.hp.com \
--cc=gwingerde@home.nl \
--cc=jgarzik@pobox.com \
--cc=jkmaline@cc.hut.fi \
--cc=jt@hpl.hp.com \
--cc=netdev@oss.sgi.com \
--cc=sfeldma@pobox.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 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).