]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/wlan-ng/p80211netdev.c
staging: wlang-ng: avoid new typedef: hfa384x_pdr_hfa3861_chcalsp_t
[karo-tx-linux.git] / drivers / staging / wlan-ng / p80211netdev.c
index fb9777994adc2d8d6668456fc7c971892828684e..825a63a7c0e319c582c97b5182b501ff5f821054 100644 (file)
 #include "cfg80211.c"
 
 /* netdevice method functions */
-static int p80211knetdev_init(netdevice_t *netdev);
-static int p80211knetdev_open(netdevice_t *netdev);
-static int p80211knetdev_stop(netdevice_t *netdev);
+static int p80211knetdev_init(struct net_device *netdev);
+static int p80211knetdev_open(struct net_device *netdev);
+static int p80211knetdev_stop(struct net_device *netdev);
 static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
-                                        netdevice_t *netdev);
-static void p80211knetdev_set_multicast_list(netdevice_t *dev);
-static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr,
+                                        struct net_device *netdev);
+static void p80211knetdev_set_multicast_list(struct net_device *dev);
+static int p80211knetdev_do_ioctl(struct net_device *dev, struct ifreq *ifr,
                                  int cmd);
-static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr);
-static void p80211knetdev_tx_timeout(netdevice_t *netdev);
+static int p80211knetdev_set_mac_address(struct net_device *dev, void *addr);
+static void p80211knetdev_tx_timeout(struct net_device *netdev);
 static int p80211_rx_typedrop(struct wlandevice *wlandev, u16 fc);
 
 int wlan_watchdog = 5000;
@@ -123,7 +123,7 @@ MODULE_PARM_DESC(wlan_wext_write, "enable write wireless extensions");
 * Returns:
 *      nothing
 ----------------------------------------------------------------*/
-static int p80211knetdev_init(netdevice_t *netdev)
+static int p80211knetdev_init(struct net_device *netdev)
 {
        /* Called in response to register_netdev */
        /* This is usually the probe function, but the probe has */
@@ -146,7 +146,7 @@ static int p80211knetdev_init(netdevice_t *netdev)
 * Returns:
 *      zero on success, non-zero otherwise
 ----------------------------------------------------------------*/
-static int p80211knetdev_open(netdevice_t *netdev)
+static int p80211knetdev_open(struct net_device *netdev)
 {
        int result = 0;         /* success */
        struct wlandevice *wlandev = netdev->ml_priv;
@@ -181,7 +181,7 @@ static int p80211knetdev_open(netdevice_t *netdev)
 * Returns:
 *      zero on success, non-zero otherwise
 ----------------------------------------------------------------*/
-static int p80211knetdev_stop(netdevice_t *netdev)
+static int p80211knetdev_stop(struct net_device *netdev)
 {
        int result = 0;
        struct wlandevice *wlandev = netdev->ml_priv;
@@ -231,7 +231,7 @@ static int p80211_convert_to_ether(struct wlandevice *wlandev, struct sk_buff *s
 {
        struct p80211_hdr_a3 *hdr;
 
-       hdr = (struct p80211_hdr_a3 *) skb->data;
+       hdr = (struct p80211_hdr_a3 *)skb->data;
        if (p80211_rx_typedrop(wlandev, hdr->fc))
                return CONV_TO_ETHER_SKIPPED;
 
@@ -265,9 +265,9 @@ static int p80211_convert_to_ether(struct wlandevice *wlandev, struct sk_buff *s
  */
 static void p80211netdev_rx_bh(unsigned long arg)
 {
-       struct wlandevice *wlandev = (struct wlandevice *) arg;
+       struct wlandevice *wlandev = (struct wlandevice *)arg;
        struct sk_buff *skb = NULL;
-       netdevice_t *dev = wlandev->netdev;
+       struct net_device *dev = wlandev->netdev;
 
        /* Let's empty our our queue */
        while ((skb = skb_dequeue(&wlandev->nsd_rxq))) {
@@ -318,7 +318,7 @@ static void p80211netdev_rx_bh(unsigned long arg)
 *      zero on success, non-zero on failure.
 ----------------------------------------------------------------*/
 static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
-                                        netdevice_t *netdev)
+                                        struct net_device *netdev)
 {
        int result = 0;
        int txresult = -1;
@@ -446,7 +446,7 @@ failed:
 * Returns:
 *      nothing
 ----------------------------------------------------------------*/
-static void p80211knetdev_set_multicast_list(netdevice_t *dev)
+static void p80211knetdev_set_multicast_list(struct net_device *dev)
 {
        struct wlandevice *wlandev = dev->ml_priv;
 
@@ -531,10 +531,10 @@ static int p80211netdev_ethtool(struct wlandevice *wlandev, void __user *useradd
 *      Process thread (ioctl caller).  TODO: SMP support may require
 *      locks.
 ----------------------------------------------------------------*/
-static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
+static int p80211knetdev_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
        int result = 0;
-       struct p80211ioctl_req *req = (struct p80211ioctl_req *) ifr;
+       struct p80211ioctl_req *req = (struct p80211ioctl_req *)ifr;
        struct wlandevice *wlandev = dev->ml_priv;
        u8 *msgbuf;
 
@@ -610,13 +610,13 @@ bail:
 *
 * by: Collin R. Mulliner <collin@mulliner.org>
 ----------------------------------------------------------------*/
-static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
+static int p80211knetdev_set_mac_address(struct net_device *dev, void *addr)
 {
        struct sockaddr *new_addr = addr;
        struct p80211msg_dot11req_mibset dot11req;
-       p80211item_unk392_t *mibattr;
-       p80211item_pstr6_t *macaddr;
-       p80211item_uint32_t *resultcode;
+       struct p80211item_unk392 *mibattr;
+       struct p80211item_pstr6 *macaddr;
+       struct p80211item_uint32 *resultcode;
        int result;
 
        /* If we're running, we don't allow MAC address changes */
@@ -625,7 +625,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
 
        /* Set up some convenience pointers. */
        mibattr = &dot11req.mibattribute;
-       macaddr = (p80211item_pstr6_t *) &mibattr->data;
+       macaddr = (struct p80211item_pstr6 *)&mibattr->data;
        resultcode = &dot11req.resultcode;
 
        /* Set up a dot11req_mibset */
@@ -633,7 +633,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
        dot11req.msgcode = DIDmsg_dot11req_mibset;
        dot11req.msglen = sizeof(struct p80211msg_dot11req_mibset);
        memcpy(dot11req.devname,
-              ((struct wlandevice *) dev->ml_priv)->name, WLAN_DEVNAMELEN_MAX - 1);
+              ((struct wlandevice *)dev->ml_priv)->name, WLAN_DEVNAMELEN_MAX - 1);
 
        /* Set up the mibattribute argument */
        mibattr->did = DIDmsg_dot11req_mibset_mibattribute;
@@ -653,7 +653,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
        resultcode->data = 0;
 
        /* now fire the request */
-       result = p80211req_dorequest(dev->ml_priv, (u8 *) &dot11req);
+       result = p80211req_dorequest(dev->ml_priv, (u8 *)&dot11req);
 
        /* If the request wasn't successful, report an error and don't
         * change the netdev address
@@ -669,7 +669,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
        return result;
 }
 
-static int wlan_change_mtu(netdevice_t *dev, int new_mtu)
+static int wlan_change_mtu(struct net_device *dev, int new_mtu)
 {
        /* 2312 is max 802.11 payload, 20 is overhead, (ether + llc +snap)
           and another 8 for wep. */
@@ -720,7 +720,7 @@ static const struct net_device_ops p80211_netdev_ops = {
 int wlan_setup(struct wlandevice *wlandev, struct device *physdev)
 {
        int result = 0;
-       netdevice_t *netdev;
+       struct net_device *netdev;
        struct wiphy *wiphy;
        struct wireless_dev *wdev;
 
@@ -1071,7 +1071,7 @@ static int p80211_rx_typedrop(struct wlandevice *wlandev, u16 fc)
        return drop;
 }
 
-static void p80211knetdev_tx_timeout(netdevice_t *netdev)
+static void p80211knetdev_tx_timeout(struct net_device *netdev)
 {
        struct wlandevice *wlandev = netdev->ml_priv;