]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: rtl8187se: use macro IW_HANDLER to initialize r8180_wx_handlers
authorAna Rey Botello <anarey@gmail.com>
Thu, 7 Nov 2013 08:31:21 +0000 (09:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Nov 2013 17:03:50 +0000 (09:03 -0800)
Use IW_HANDLER to initialize iw_handler structure like in others wireless
driver.

Acked-by: Pablo Neira Ayuso <pablo@gnumonks.org>
Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8187se/r8180_wx.c

index 4e01653e098a3b782e6844fd23430ced355ee2f2..92b76f4cca4728f4bc06502fd1de4dbc82941128 100644 (file)
@@ -21,6 +21,7 @@
 #include "r8180.h"
 #include "r8180_hw.h"
 
+#include <net/iw_handler.h>
 #include "ieee80211/dot11d.h"
 
 u32 rtl8180_rates[] = {1000000, 2000000, 5500000, 11000000,
@@ -1156,65 +1157,48 @@ static int r8180_wx_set_gen_ie(struct net_device *dev,
 
 
 }
-static iw_handler r8180_wx_handlers[] =        {
-               NULL,                                   /* SIOCSIWCOMMIT */
-               r8180_wx_get_name,                      /* SIOCGIWNAME */
-               dummy,                                  /* SIOCSIWNWID */
-               dummy,                                  /* SIOCGIWNWID */
-               r8180_wx_set_freq,                      /* SIOCSIWFREQ */
-               r8180_wx_get_freq,                      /* SIOCGIWFREQ */
-               r8180_wx_set_mode,                      /* SIOCSIWMODE */
-               r8180_wx_get_mode,                      /* SIOCGIWMODE */
-               r8180_wx_set_sens,                      /* SIOCSIWSENS */
-               r8180_wx_get_sens,                      /* SIOCGIWSENS */
-               NULL,                                   /* SIOCSIWRANGE */
-               rtl8180_wx_get_range,                   /* SIOCGIWRANGE */
-               NULL,                                   /* SIOCSIWPRIV */
-               NULL,                                   /* SIOCGIWPRIV */
-               NULL,                                   /* SIOCSIWSTATS */
-               NULL,                                   /* SIOCGIWSTATS */
-               dummy,                                  /* SIOCSIWSPY */
-               dummy,                                  /* SIOCGIWSPY */
-               NULL,                                   /* SIOCGIWTHRSPY */
-               NULL,                                   /* SIOCWIWTHRSPY */
-               r8180_wx_set_wap,                       /* SIOCSIWAP */
-               r8180_wx_get_wap,                       /* SIOCGIWAP */
-               r8180_wx_set_mlme,                      /* SIOCSIWMLME*/
-               dummy,                                  /* SIOCGIWAPLIST -- deprecated */
-               r8180_wx_set_scan,                      /* SIOCSIWSCAN */
-               r8180_wx_get_scan,                      /* SIOCGIWSCAN */
-               r8180_wx_set_essid,                     /* SIOCSIWESSID */
-               r8180_wx_get_essid,                     /* SIOCGIWESSID */
-               dummy,                                  /* SIOCSIWNICKN */
-               dummy,                                  /* SIOCGIWNICKN */
-               NULL,                                   /* -- hole -- */
-               NULL,                                   /* -- hole -- */
-               r8180_wx_set_rate,                      /* SIOCSIWRATE */
-               r8180_wx_get_rate,                      /* SIOCGIWRATE */
-               r8180_wx_set_rts,                       /* SIOCSIWRTS */
-               r8180_wx_get_rts,                       /* SIOCGIWRTS */
-               r8180_wx_set_frag,                      /* SIOCSIWFRAG */
-               r8180_wx_get_frag,                      /* SIOCGIWFRAG */
-               dummy,                                  /* SIOCSIWTXPOW */
-               dummy,                                  /* SIOCGIWTXPOW */
-               r8180_wx_set_retry,                     /* SIOCSIWRETRY */
-               r8180_wx_get_retry,                     /* SIOCGIWRETRY */
-               r8180_wx_set_enc,                       /* SIOCSIWENCODE */
-               r8180_wx_get_enc,                       /* SIOCGIWENCODE */
-               r8180_wx_set_power,                     /* SIOCSIWPOWER */
-               r8180_wx_get_power,                     /* SIOCGIWPOWER */
-               NULL,                                   /*---hole---*/
-               NULL,                                   /*---hole---*/
-               r8180_wx_set_gen_ie,                    /* SIOCSIWGENIE */
-               NULL,                                   /* SIOCSIWGENIE */
-               r8180_wx_set_auth,                      /* SIOCSIWAUTH */
-               NULL,                                   /* SIOCSIWAUTH */
-               r8180_wx_set_enc_ext,                   /* SIOCSIWENCODEEXT */
-               NULL,                                   /* SIOCSIWENCODEEXT */
-               NULL,                                   /* SIOCSIWPMKSA */
-               NULL,                                   /*---hole---*/
-};
 
+static const iw_handler r8180_wx_handlers[] =  {
+       IW_HANDLER(SIOCGIWNAME,         r8180_wx_get_name),
+       IW_HANDLER(SIOCSIWNWID,         dummy),
+       IW_HANDLER(SIOCGIWNWID,         dummy),
+       IW_HANDLER(SIOCSIWFREQ,         r8180_wx_set_freq),
+       IW_HANDLER(SIOCGIWFREQ,         r8180_wx_get_freq),
+       IW_HANDLER(SIOCSIWMODE,         r8180_wx_set_mode),
+       IW_HANDLER(SIOCGIWMODE,         r8180_wx_get_mode),
+       IW_HANDLER(SIOCSIWSENS,         r8180_wx_set_sens),
+       IW_HANDLER(SIOCGIWSENS,         r8180_wx_get_sens),
+       IW_HANDLER(SIOCGIWRANGE,        rtl8180_wx_get_range),
+       IW_HANDLER(SIOCSIWSPY,          dummy),
+       IW_HANDLER(SIOCGIWSPY,          dummy),
+       IW_HANDLER(SIOCSIWAP,           r8180_wx_set_wap),
+       IW_HANDLER(SIOCGIWAP,           r8180_wx_get_wap),
+       IW_HANDLER(SIOCSIWMLME,         r8180_wx_set_mlme),
+       IW_HANDLER(SIOCGIWAPLIST,       dummy),         /* deprecated */
+       IW_HANDLER(SIOCSIWSCAN,         r8180_wx_set_scan),
+       IW_HANDLER(SIOCGIWSCAN,         r8180_wx_get_scan),
+       IW_HANDLER(SIOCSIWESSID,        r8180_wx_set_essid),
+       IW_HANDLER(SIOCGIWESSID,        r8180_wx_get_essid),
+       IW_HANDLER(SIOCSIWNICKN,        dummy),
+       IW_HANDLER(SIOCGIWNICKN,        dummy),
+       IW_HANDLER(SIOCSIWRATE,         r8180_wx_set_rate),
+       IW_HANDLER(SIOCGIWRATE,         r8180_wx_get_rate),
+       IW_HANDLER(SIOCSIWRTS,          r8180_wx_set_rts),
+       IW_HANDLER(SIOCGIWRTS,          r8180_wx_get_rts),
+       IW_HANDLER(SIOCSIWFRAG,         r8180_wx_set_frag),
+       IW_HANDLER(SIOCGIWFRAG,         r8180_wx_get_frag),
+       IW_HANDLER(SIOCSIWTXPOW,        dummy),
+       IW_HANDLER(SIOCGIWTXPOW,        dummy),
+       IW_HANDLER(SIOCSIWRETRY,        r8180_wx_set_retry),
+       IW_HANDLER(SIOCGIWRETRY,        r8180_wx_get_retry),
+       IW_HANDLER(SIOCSIWENCODE,       r8180_wx_set_enc),
+       IW_HANDLER(SIOCGIWENCODE,       r8180_wx_get_enc),
+       IW_HANDLER(SIOCSIWPOWER,        r8180_wx_set_power),
+       IW_HANDLER(SIOCGIWPOWER,        r8180_wx_get_power),
+       IW_HANDLER(SIOCSIWGENIE,        r8180_wx_set_gen_ie),
+       IW_HANDLER(SIOCSIWAUTH,         r8180_wx_set_auth),
+       IW_HANDLER(SIOCSIWENCODEEXT,    r8180_wx_set_enc_ext),
+};
 
 static const struct iw_priv_args r8180_private_args[] = {
        {