fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / net / wireless / zd1211rw / zd_netdev.c
index 9df232c..8bda48d 100644 (file)
@@ -72,10 +72,18 @@ static int iw_get_name(struct net_device *netdev,
                       struct iw_request_info *info,
                       union iwreq_data *req, char *extra)
 {
-       /* FIXME: check whether 802.11a will also supported, add also
-        *        zd1211B, if we support it.
-        */
-       strlcpy(req->name, "802.11g zd1211", IFNAMSIZ);
+       /* FIXME: check whether 802.11a will also supported */
+       strlcpy(req->name, "IEEE 802.11b/g", IFNAMSIZ);
+       return 0;
+}
+
+static int iw_get_nick(struct net_device *netdev,
+                      struct iw_request_info *info,
+                      union iwreq_data *req, char *extra)
+{
+       strcpy(extra, "zd1211");
+       req->data.length = strlen(extra);
+       req->data.flags = 1;
        return 0;
 }
 
@@ -99,21 +107,10 @@ static int iw_get_freq(struct net_device *netdev,
                   struct iw_request_info *info,
                   union iwreq_data *req, char *extra)
 {
-       int r;
        struct zd_mac *mac = zd_netdev_mac(netdev);
        struct iw_freq *freq = &req->freq;
-       u8 channel;
-       u8 flags;
-
-       r = zd_mac_get_channel(mac, &channel, &flags);
-       if (r)
-               return r;
 
-       freq->flags = (flags & MAC_FIXED_CHANNEL) ?
-                     IW_FREQ_FIXED : IW_FREQ_AUTO;
-       dev_dbg_f(zd_mac_dev(mac), "channel %s\n",
-                 (flags & MAC_FIXED_CHANNEL) ? "fixed" : "auto");
-       return zd_channel_to_freq(freq, channel);
+       return zd_channel_to_freq(freq, zd_mac_get_channel(mac));
 }
 
 static int iw_set_mode(struct net_device *netdev,
@@ -181,6 +178,7 @@ static int iw_get_encodeext(struct net_device *netdev,
 
 static const iw_handler zd_standard_iw_handlers[] = {
        WX(SIOCGIWNAME)         = iw_get_name,
+       WX(SIOCGIWNICKN)        = iw_get_nick,
        WX(SIOCSIWFREQ)         = iw_set_freq,
        WX(SIOCGIWFREQ)         = iw_get_freq,
        WX(SIOCSIWMODE)         = iw_set_mode,
@@ -244,7 +242,7 @@ struct net_device *zd_netdev_alloc(struct usb_interface *intf)
        netdev->open = zd_mac_open;
        netdev->stop = zd_mac_stop;
        /* netdev->get_stats = */
-       /* netdev->set_multicast_list = */
+       netdev->set_multicast_list = zd_mac_set_multicast_list;
        netdev->set_mac_address = zd_mac_set_mac_address;
        netdev->wireless_handlers = &iw_handler_def;
        /* netdev->ethtool_ops = */