static int prism2_get_name(struct net_device *dev,
                           struct iw_request_info *info,
-                          char *name, char *extra)
+                          union iwreq_data *wrqu, char *extra)
 {
        u8 rates[10];
        int len, i, over2 = 0;
                }
        }
 
-       strcpy(name, over2 ? "IEEE 802.11b" : "IEEE 802.11-DS");
+       strcpy(wrqu->name, over2 ? "IEEE 802.11b" : "IEEE 802.11-DS");
 
        return 0;
 }
 
 static int prism2_ioctl_siwencode(struct net_device *dev,
                                  struct iw_request_info *info,
-                                 struct iw_point *erq, char *keybuf)
+                                 union iwreq_data *wrqu, char *keybuf)
 {
+       struct iw_point *erq = &wrqu->encoding;
        struct hostap_interface *iface;
        local_info_t *local;
        int i;
 
 static int prism2_ioctl_giwencode(struct net_device *dev,
                                  struct iw_request_info *info,
-                                 struct iw_point *erq, char *key)
+                                 union iwreq_data *wrqu, char *key)
 {
+       struct iw_point *erq = &wrqu->encoding;
        struct hostap_interface *iface;
        local_info_t *local;
        int i, len;
 
 static int prism2_ioctl_siwrate(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_param *rrq, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *rrq = &wrqu->bitrate;
        struct hostap_interface *iface;
        local_info_t *local;
 
 
 static int prism2_ioctl_giwrate(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_param *rrq, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *rrq = &wrqu->bitrate;
        u16 val;
        struct hostap_interface *iface;
        local_info_t *local;
 
 static int prism2_ioctl_siwsens(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_param *sens, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *sens = &wrqu->sens;
        struct hostap_interface *iface;
        local_info_t *local;
 
 
 static int prism2_ioctl_giwsens(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_param *sens, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *sens = &wrqu->sens;
        struct hostap_interface *iface;
        local_info_t *local;
        __le16 val;
 /* Deprecated in new wireless extension API */
 static int prism2_ioctl_giwaplist(struct net_device *dev,
                                  struct iw_request_info *info,
-                                 struct iw_point *data, char *extra)
+                                 union iwreq_data *wrqu, char *extra)
 {
+       struct iw_point *data = &wrqu->data;
        struct hostap_interface *iface;
        local_info_t *local;
        struct sockaddr *addr;
 
 static int prism2_ioctl_siwrts(struct net_device *dev,
                               struct iw_request_info *info,
-                              struct iw_param *rts, char *extra)
+                              union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *rts = &wrqu->rts;
        struct hostap_interface *iface;
        local_info_t *local;
        __le16 val;
 
 static int prism2_ioctl_giwrts(struct net_device *dev,
                               struct iw_request_info *info,
-                              struct iw_param *rts, char *extra)
+                              union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *rts = &wrqu->rts;
        struct hostap_interface *iface;
        local_info_t *local;
        __le16 val;
 
 static int prism2_ioctl_siwfrag(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_param *rts, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *rts = &wrqu->rts;
        struct hostap_interface *iface;
        local_info_t *local;
        __le16 val;
 
 static int prism2_ioctl_giwfrag(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_param *rts, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *rts = &wrqu->rts;
        struct hostap_interface *iface;
        local_info_t *local;
        __le16 val;
 
 static int prism2_ioctl_siwap(struct net_device *dev,
                              struct iw_request_info *info,
-                             struct sockaddr *ap_addr, char *extra)
+                             union iwreq_data *wrqu, char *extra)
 {
+       struct sockaddr *ap_addr = &wrqu->ap_addr;
 #ifdef PRISM2_NO_STATION_MODES
        return -EOPNOTSUPP;
 #else /* PRISM2_NO_STATION_MODES */
 
 static int prism2_ioctl_giwap(struct net_device *dev,
                              struct iw_request_info *info,
-                             struct sockaddr *ap_addr, char *extra)
+                             union iwreq_data *wrqu, char *extra)
 {
+       struct sockaddr *ap_addr = &wrqu->ap_addr;
        struct hostap_interface *iface;
        local_info_t *local;
 
 
 static int prism2_ioctl_siwnickn(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_point *data, char *nickname)
+                                union iwreq_data *wrqu, char *nickname)
 {
+       struct iw_point *data = &wrqu->data;
        struct hostap_interface *iface;
        local_info_t *local;
 
 
 static int prism2_ioctl_giwnickn(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_point *data, char *nickname)
+                                union iwreq_data *wrqu, char *nickname)
 {
+       struct iw_point *data = &wrqu->data;
        struct hostap_interface *iface;
        local_info_t *local;
        int len;
 
 static int prism2_ioctl_siwfreq(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_freq *freq, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       struct iw_freq *freq = &wrqu->freq;
        struct hostap_interface *iface;
        local_info_t *local;
 
 
 static int prism2_ioctl_giwfreq(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_freq *freq, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       struct iw_freq *freq = &wrqu->freq;
        struct hostap_interface *iface;
        local_info_t *local;
        u16 val;
 
 static int prism2_ioctl_siwessid(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_point *data, char *ssid)
+                                union iwreq_data *wrqu, char *ssid)
 {
+       struct iw_point *data = &wrqu->data;
        struct hostap_interface *iface;
        local_info_t *local;
 
 
 static int prism2_ioctl_giwessid(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_point *data, char *essid)
+                                union iwreq_data *wrqu, char *essid)
 {
+       struct iw_point *data = &wrqu->data;
        struct hostap_interface *iface;
        local_info_t *local;
        u16 val;
 
 static int prism2_ioctl_giwrange(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_point *data, char *extra)
+                                union iwreq_data *wrqu, char *extra)
 {
+       struct iw_point *data = &wrqu->data;
        struct hostap_interface *iface;
        local_info_t *local;
        struct iw_range *range = (struct iw_range *) extra;
 
 static int prism2_ioctl_siwmode(struct net_device *dev,
                                struct iw_request_info *info,
-                               __u32 *mode, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       __u32 *mode = &wrqu->mode;
        struct hostap_interface *iface;
        local_info_t *local;
        int double_reset = 0;
 
 static int prism2_ioctl_giwmode(struct net_device *dev,
                                struct iw_request_info *info,
-                               __u32 *mode, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       __u32 *mode = &wrqu->mode;
        struct hostap_interface *iface;
        local_info_t *local;
 
 
 static int prism2_ioctl_siwpower(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_param *wrq, char *extra)
+                                union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *wrq = &wrqu->power;
 #ifdef PRISM2_NO_STATION_MODES
        return -EOPNOTSUPP;
 #else /* PRISM2_NO_STATION_MODES */
 
 static int prism2_ioctl_giwpower(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_param *rrq, char *extra)
+                                union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *rrq = &wrqu->power;
 #ifdef PRISM2_NO_STATION_MODES
        return -EOPNOTSUPP;
 #else /* PRISM2_NO_STATION_MODES */
 
 static int prism2_ioctl_siwretry(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_param *rrq, char *extra)
+                                union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *rrq = &wrqu->retry;
        struct hostap_interface *iface;
        local_info_t *local;
 
 
 static int prism2_ioctl_giwretry(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_param *rrq, char *extra)
+                                union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *rrq = &wrqu->retry;
        struct hostap_interface *iface;
        local_info_t *local;
        __le16 shortretry, longretry, lifetime, altretry;
 
 static int prism2_ioctl_siwtxpow(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_param *rrq, char *extra)
+                                union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *rrq = &wrqu->txpower;
        struct hostap_interface *iface;
        local_info_t *local;
 #ifdef RAW_TXPOWER_SETTING
 
 static int prism2_ioctl_giwtxpow(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_param *rrq, char *extra)
+                                union iwreq_data *wrqu, char *extra)
 {
 #ifdef RAW_TXPOWER_SETTING
+       struct iw_param *rrq = &wrqu->txpower;
        struct hostap_interface *iface;
        local_info_t *local;
        u16 resp0;
 
 static int prism2_ioctl_siwscan(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_point *data, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       struct iw_point *data = &wrqu->data;
        struct hostap_interface *iface;
        local_info_t *local;
        int ret;
 
 static int prism2_ioctl_giwscan(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_point *data, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       struct iw_point *data = &wrqu->data;
        struct hostap_interface *iface;
        local_info_t *local;
        int res;
 
 static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
                                          struct iw_request_info *info,
-                                         void *wrqu, char *extra)
+                                         union iwreq_data *uwrq, char *extra)
 {
        struct hostap_interface *iface;
        local_info_t *local;
 
 static int prism2_ioctl_priv_get_prism2_param(struct net_device *dev,
                                              struct iw_request_info *info,
-                                             void *wrqu, char *extra)
+                                             union iwreq_data *wrqu, char *extra)
 {
        struct hostap_interface *iface;
        local_info_t *local;
 
 static int prism2_ioctl_priv_readmif(struct net_device *dev,
                                     struct iw_request_info *info,
-                                    void *wrqu, char *extra)
+                                    union iwreq_data *wrqu, char *extra)
 {
        struct hostap_interface *iface;
        local_info_t *local;
 
 static int prism2_ioctl_priv_writemif(struct net_device *dev,
                                      struct iw_request_info *info,
-                                     void *wrqu, char *extra)
+                                     union iwreq_data *wrqu, char *extra)
 {
        struct hostap_interface *iface;
        local_info_t *local;
        struct hostap_interface *iface;
        local_info_t *local;
        int ret = 0;
-       u32 mode;
+       union iwreq_data wrqu;
 
        iface = netdev_priv(dev);
        local = iface->local;
        if (*i == 0) {
                /* Disable monitor mode - old mode was not saved, so go to
                 * Master mode */
-               mode = IW_MODE_MASTER;
-               ret = prism2_ioctl_siwmode(dev, NULL, &mode, NULL);
+               wrqu.mode = IW_MODE_MASTER;
+               ret = prism2_ioctl_siwmode(dev, NULL, &wrqu, NULL);
        } else if (*i == 1) {
                /* netlink socket mode is not supported anymore since it did
                 * not separate different devices from each other and was not
                        local->monitor_type = PRISM2_MONITOR_PRISM;
                        break;
                }
-               mode = IW_MODE_MONITOR;
-               ret = prism2_ioctl_siwmode(dev, NULL, &mode, NULL);
+               wrqu.mode = IW_MODE_MONITOR;
+               ret = prism2_ioctl_siwmode(dev, NULL, &wrqu, NULL);
                hostap_monitor_mode_enable(local);
        } else
                ret = -EINVAL;
 
 static int prism2_ioctl_siwauth(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_param *data, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *data = &wrqu->param;
        struct hostap_interface *iface = netdev_priv(dev);
        local_info_t *local = iface->local;
 
 
 static int prism2_ioctl_giwauth(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_param *data, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
+       struct iw_param *data = &wrqu->param;
        struct hostap_interface *iface = netdev_priv(dev);
        local_info_t *local = iface->local;
 
 
 static int prism2_ioctl_siwencodeext(struct net_device *dev,
                                     struct iw_request_info *info,
-                                    struct iw_point *erq, char *extra)
+                                    union iwreq_data *wrqu, char *extra)
 {
+       struct iw_point *erq = &wrqu->encoding;
        struct hostap_interface *iface = netdev_priv(dev);
        local_info_t *local = iface->local;
        struct iw_encode_ext *ext = (struct iw_encode_ext *) extra;
 
 static int prism2_ioctl_giwencodeext(struct net_device *dev,
                                     struct iw_request_info *info,
-                                    struct iw_point *erq, char *extra)
+                                    union iwreq_data *wrqu, char *extra)
 {
+       struct iw_point *erq = &wrqu->encoding;
        struct hostap_interface *iface = netdev_priv(dev);
        local_info_t *local = iface->local;
        struct lib80211_crypt_data **crypt;
 
 static int prism2_ioctl_siwgenie(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_point *data, char *extra)
+                                union iwreq_data *wrqu, char *extra)
 {
+       struct iw_point *data = &wrqu->data;
        return prism2_set_genericelement(dev, extra, data->length);
 }
 
 
 static int prism2_ioctl_giwgenie(struct net_device *dev,
                                 struct iw_request_info *info,
-                                struct iw_point *data, char *extra)
+                                union iwreq_data *wrqu, char *extra)
 {
+       struct iw_point *data = &wrqu->data;
        struct hostap_interface *iface = netdev_priv(dev);
        local_info_t *local = iface->local;
        int len = local->generic_elem_len - 2;
 
 static int prism2_ioctl_siwmlme(struct net_device *dev,
                                struct iw_request_info *info,
-                               struct iw_point *data, char *extra)
+                               union iwreq_data *wrqu, char *extra)
 {
        struct hostap_interface *iface = netdev_priv(dev);
        local_info_t *local = iface->local;
 
 static const iw_handler prism2_handler[] =
 {
-       (iw_handler) NULL,                              /* SIOCSIWCOMMIT */
-       (iw_handler) prism2_get_name,                   /* SIOCGIWNAME */
-       (iw_handler) NULL,                              /* SIOCSIWNWID */
-       (iw_handler) NULL,                              /* SIOCGIWNWID */
-       (iw_handler) prism2_ioctl_siwfreq,              /* SIOCSIWFREQ */
-       (iw_handler) prism2_ioctl_giwfreq,              /* SIOCGIWFREQ */
-       (iw_handler) prism2_ioctl_siwmode,              /* SIOCSIWMODE */
-       (iw_handler) prism2_ioctl_giwmode,              /* SIOCGIWMODE */
-       (iw_handler) prism2_ioctl_siwsens,              /* SIOCSIWSENS */
-       (iw_handler) prism2_ioctl_giwsens,              /* SIOCGIWSENS */
-       (iw_handler) NULL /* not used */,               /* SIOCSIWRANGE */
-       (iw_handler) prism2_ioctl_giwrange,             /* SIOCGIWRANGE */
-       (iw_handler) NULL /* not used */,               /* SIOCSIWPRIV */
-       (iw_handler) NULL /* kernel code */,            /* SIOCGIWPRIV */
-       (iw_handler) NULL /* not used */,               /* SIOCSIWSTATS */
-       (iw_handler) NULL /* kernel code */,            /* SIOCGIWSTATS */
-       iw_handler_set_spy,                             /* SIOCSIWSPY */
-       iw_handler_get_spy,                             /* SIOCGIWSPY */
-       iw_handler_set_thrspy,                          /* SIOCSIWTHRSPY */
-       iw_handler_get_thrspy,                          /* SIOCGIWTHRSPY */
-       (iw_handler) prism2_ioctl_siwap,                /* SIOCSIWAP */
-       (iw_handler) prism2_ioctl_giwap,                /* SIOCGIWAP */
-       (iw_handler) prism2_ioctl_siwmlme,              /* SIOCSIWMLME */
-       (iw_handler) prism2_ioctl_giwaplist,            /* SIOCGIWAPLIST */
-       (iw_handler) prism2_ioctl_siwscan,              /* SIOCSIWSCAN */
-       (iw_handler) prism2_ioctl_giwscan,              /* SIOCGIWSCAN */
-       (iw_handler) prism2_ioctl_siwessid,             /* SIOCSIWESSID */
-       (iw_handler) prism2_ioctl_giwessid,             /* SIOCGIWESSID */
-       (iw_handler) prism2_ioctl_siwnickn,             /* SIOCSIWNICKN */
-       (iw_handler) prism2_ioctl_giwnickn,             /* SIOCGIWNICKN */
-       (iw_handler) NULL,                              /* -- hole -- */
-       (iw_handler) NULL,                              /* -- hole -- */
-       (iw_handler) prism2_ioctl_siwrate,              /* SIOCSIWRATE */
-       (iw_handler) prism2_ioctl_giwrate,              /* SIOCGIWRATE */
-       (iw_handler) prism2_ioctl_siwrts,               /* SIOCSIWRTS */
-       (iw_handler) prism2_ioctl_giwrts,               /* SIOCGIWRTS */
-       (iw_handler) prism2_ioctl_siwfrag,              /* SIOCSIWFRAG */
-       (iw_handler) prism2_ioctl_giwfrag,              /* SIOCGIWFRAG */
-       (iw_handler) prism2_ioctl_siwtxpow,             /* SIOCSIWTXPOW */
-       (iw_handler) prism2_ioctl_giwtxpow,             /* SIOCGIWTXPOW */
-       (iw_handler) prism2_ioctl_siwretry,             /* SIOCSIWRETRY */
-       (iw_handler) prism2_ioctl_giwretry,             /* SIOCGIWRETRY */
-       (iw_handler) prism2_ioctl_siwencode,            /* SIOCSIWENCODE */
-       (iw_handler) prism2_ioctl_giwencode,            /* SIOCGIWENCODE */
-       (iw_handler) prism2_ioctl_siwpower,             /* SIOCSIWPOWER */
-       (iw_handler) prism2_ioctl_giwpower,             /* SIOCGIWPOWER */
-       (iw_handler) NULL,                              /* -- hole -- */
-       (iw_handler) NULL,                              /* -- hole -- */
-       (iw_handler) prism2_ioctl_siwgenie,             /* SIOCSIWGENIE */
-       (iw_handler) prism2_ioctl_giwgenie,             /* SIOCGIWGENIE */
-       (iw_handler) prism2_ioctl_siwauth,              /* SIOCSIWAUTH */
-       (iw_handler) prism2_ioctl_giwauth,              /* SIOCGIWAUTH */
-       (iw_handler) prism2_ioctl_siwencodeext,         /* SIOCSIWENCODEEXT */
-       (iw_handler) prism2_ioctl_giwencodeext,         /* SIOCGIWENCODEEXT */
-       (iw_handler) NULL,                              /* SIOCSIWPMKSA */
-       (iw_handler) NULL,                              /* -- hole -- */
+       IW_HANDLER(SIOCGIWNAME,         prism2_get_name),
+       IW_HANDLER(SIOCSIWFREQ,         prism2_ioctl_siwfreq),
+       IW_HANDLER(SIOCGIWFREQ,         prism2_ioctl_giwfreq),
+       IW_HANDLER(SIOCSIWMODE,         prism2_ioctl_siwmode),
+       IW_HANDLER(SIOCGIWMODE,         prism2_ioctl_giwmode),
+       IW_HANDLER(SIOCSIWSENS,         prism2_ioctl_siwsens),
+       IW_HANDLER(SIOCGIWSENS,         prism2_ioctl_giwsens),
+       IW_HANDLER(SIOCGIWRANGE,        prism2_ioctl_giwrange),
+       IW_HANDLER(SIOCSIWSPY,          iw_handler_set_spy),
+       IW_HANDLER(SIOCGIWSPY,          iw_handler_get_spy),
+       IW_HANDLER(SIOCSIWTHRSPY,       iw_handler_set_thrspy),
+       IW_HANDLER(SIOCGIWTHRSPY,       iw_handler_get_thrspy),
+       IW_HANDLER(SIOCSIWAP,           prism2_ioctl_siwap),
+       IW_HANDLER(SIOCGIWAP,           prism2_ioctl_giwap),
+       IW_HANDLER(SIOCSIWMLME,         prism2_ioctl_siwmlme),
+       IW_HANDLER(SIOCGIWAPLIST,       prism2_ioctl_giwaplist),
+       IW_HANDLER(SIOCSIWSCAN,         prism2_ioctl_siwscan),
+       IW_HANDLER(SIOCGIWSCAN,         prism2_ioctl_giwscan),
+       IW_HANDLER(SIOCSIWESSID,        prism2_ioctl_siwessid),
+       IW_HANDLER(SIOCGIWESSID,        prism2_ioctl_giwessid),
+       IW_HANDLER(SIOCSIWNICKN,        prism2_ioctl_siwnickn),
+       IW_HANDLER(SIOCGIWNICKN,        prism2_ioctl_giwnickn),
+       IW_HANDLER(SIOCSIWRATE,         prism2_ioctl_siwrate),
+       IW_HANDLER(SIOCGIWRATE,         prism2_ioctl_giwrate),
+       IW_HANDLER(SIOCSIWRTS,          prism2_ioctl_siwrts),
+       IW_HANDLER(SIOCGIWRTS,          prism2_ioctl_giwrts),
+       IW_HANDLER(SIOCSIWFRAG,         prism2_ioctl_siwfrag),
+       IW_HANDLER(SIOCGIWFRAG,         prism2_ioctl_giwfrag),
+       IW_HANDLER(SIOCSIWTXPOW,        prism2_ioctl_siwtxpow),
+       IW_HANDLER(SIOCGIWTXPOW,        prism2_ioctl_giwtxpow),
+       IW_HANDLER(SIOCSIWRETRY,        prism2_ioctl_siwretry),
+       IW_HANDLER(SIOCGIWRETRY,        prism2_ioctl_giwretry),
+       IW_HANDLER(SIOCSIWENCODE,       prism2_ioctl_siwencode),
+       IW_HANDLER(SIOCGIWENCODE,       prism2_ioctl_giwencode),
+       IW_HANDLER(SIOCSIWPOWER,        prism2_ioctl_siwpower),
+       IW_HANDLER(SIOCGIWPOWER,        prism2_ioctl_giwpower),
+       IW_HANDLER(SIOCSIWGENIE,        prism2_ioctl_siwgenie),
+       IW_HANDLER(SIOCGIWGENIE,        prism2_ioctl_giwgenie),
+       IW_HANDLER(SIOCSIWAUTH,         prism2_ioctl_siwauth),
+       IW_HANDLER(SIOCGIWAUTH,         prism2_ioctl_giwauth),
+       IW_HANDLER(SIOCSIWENCODEEXT,    prism2_ioctl_siwencodeext),
+       IW_HANDLER(SIOCGIWENCODEEXT,    prism2_ioctl_giwencodeext),
 };
 
 static const iw_handler prism2_private_handler[] =
-{                                                      /* SIOCIWFIRSTPRIV + */
-       (iw_handler) prism2_ioctl_priv_prism2_param,    /* 0 */
-       (iw_handler) prism2_ioctl_priv_get_prism2_param, /* 1 */
-       (iw_handler) prism2_ioctl_priv_writemif,        /* 2 */
-       (iw_handler) prism2_ioctl_priv_readmif,         /* 3 */
+{                                              /* SIOCIWFIRSTPRIV + */
+       prism2_ioctl_priv_prism2_param,         /* 0 */
+       prism2_ioctl_priv_get_prism2_param,     /* 1 */
+       prism2_ioctl_priv_writemif,             /* 2 */
+       prism2_ioctl_priv_readmif,              /* 3 */
 };
 
 const struct iw_handler_def hostap_iw_handler_def =
        .num_standard   = ARRAY_SIZE(prism2_handler),
        .num_private    = ARRAY_SIZE(prism2_private_handler),
        .num_private_args = ARRAY_SIZE(prism2_priv),
-       .standard       = (iw_handler *) prism2_handler,
-       .private        = (iw_handler *) prism2_private_handler,
+       .standard       = prism2_handler,
+       .private        = prism2_private_handler,
        .private_args   = (struct iw_priv_args *) prism2_priv,
        .get_wireless_stats = hostap_get_wireless_stats,
 };