.. | .. |
---|
101 | 101 | static int p80211knetdev_do_ioctl(struct net_device *dev, struct ifreq *ifr, |
---|
102 | 102 | int cmd); |
---|
103 | 103 | static int p80211knetdev_set_mac_address(struct net_device *dev, void *addr); |
---|
104 | | -static void p80211knetdev_tx_timeout(struct net_device *netdev); |
---|
| 104 | +static void p80211knetdev_tx_timeout(struct net_device *netdev, unsigned int txqueue); |
---|
105 | 105 | static int p80211_rx_typedrop(struct wlandevice *wlandev, u16 fc); |
---|
106 | 106 | |
---|
107 | 107 | int wlan_watchdog = 5000; |
---|
.. | .. |
---|
266 | 266 | /** |
---|
267 | 267 | * p80211netdev_rx_bh - deferred processing of all received frames |
---|
268 | 268 | * |
---|
269 | | - * @arg: pointer to WLAN network device structure (cast to unsigned long) |
---|
| 269 | + * @t: pointer to the tasklet associated with this handler |
---|
270 | 270 | */ |
---|
271 | | -static void p80211netdev_rx_bh(unsigned long arg) |
---|
| 271 | +static void p80211netdev_rx_bh(struct tasklet_struct *t) |
---|
272 | 272 | { |
---|
273 | | - struct wlandevice *wlandev = (struct wlandevice *)arg; |
---|
| 273 | + struct wlandevice *wlandev = from_tasklet(wlandev, t, rx_bh); |
---|
274 | 274 | struct sk_buff *skb = NULL; |
---|
275 | 275 | struct net_device *dev = wlandev->netdev; |
---|
276 | 276 | |
---|
277 | | - /* Let's empty our our queue */ |
---|
| 277 | + /* Let's empty our queue */ |
---|
278 | 278 | while ((skb = skb_dequeue(&wlandev->nsd_rxq))) { |
---|
279 | 279 | if (wlandev->state == WLAN_DEVICE_OPEN) { |
---|
280 | 280 | if (dev->type != ARPHRD_ETHER) { |
---|
.. | .. |
---|
429 | 429 | failed: |
---|
430 | 430 | /* Free up the WEP buffer if it's not the same as the skb */ |
---|
431 | 431 | if ((p80211_wep.data) && (p80211_wep.data != skb->data)) |
---|
432 | | - kzfree(p80211_wep.data); |
---|
| 432 | + kfree_sensitive(p80211_wep.data); |
---|
433 | 433 | |
---|
434 | 434 | /* we always free the skb here, never in a lower level. */ |
---|
435 | 435 | if (!result) |
---|
.. | .. |
---|
638 | 638 | |
---|
639 | 639 | /* Set up a dot11req_mibset */ |
---|
640 | 640 | memset(&dot11req, 0, sizeof(dot11req)); |
---|
641 | | - dot11req.msgcode = DIDmsg_dot11req_mibset; |
---|
| 641 | + dot11req.msgcode = DIDMSG_DOT11REQ_MIBSET; |
---|
642 | 642 | dot11req.msglen = sizeof(dot11req); |
---|
643 | 643 | memcpy(dot11req.devname, |
---|
644 | 644 | ((struct wlandevice *)dev->ml_priv)->name, |
---|
645 | 645 | WLAN_DEVNAMELEN_MAX - 1); |
---|
646 | 646 | |
---|
647 | 647 | /* Set up the mibattribute argument */ |
---|
648 | | - mibattr->did = DIDmsg_dot11req_mibset_mibattribute; |
---|
| 648 | + mibattr->did = DIDMSG_DOT11REQ_MIBSET_MIBATTRIBUTE; |
---|
649 | 649 | mibattr->status = P80211ENUM_msgitem_status_data_ok; |
---|
650 | 650 | mibattr->len = sizeof(mibattr->data); |
---|
651 | 651 | |
---|
652 | | - macaddr->did = DIDmib_dot11mac_dot11OperationTable_dot11MACAddress; |
---|
| 652 | + macaddr->did = DIDMIB_DOT11MAC_OPERATIONTABLE_MACADDRESS; |
---|
653 | 653 | macaddr->status = P80211ENUM_msgitem_status_data_ok; |
---|
654 | 654 | macaddr->len = sizeof(macaddr->data); |
---|
655 | 655 | macaddr->data.len = ETH_ALEN; |
---|
656 | 656 | memcpy(&macaddr->data.data, new_addr->sa_data, ETH_ALEN); |
---|
657 | 657 | |
---|
658 | 658 | /* Set up the resultcode argument */ |
---|
659 | | - resultcode->did = DIDmsg_dot11req_mibset_resultcode; |
---|
| 659 | + resultcode->did = DIDMSG_DOT11REQ_MIBSET_RESULTCODE; |
---|
660 | 660 | resultcode->status = P80211ENUM_msgitem_status_no_value; |
---|
661 | 661 | resultcode->len = sizeof(resultcode->data); |
---|
662 | 662 | resultcode->data = 0; |
---|
.. | .. |
---|
728 | 728 | |
---|
729 | 729 | /* Set up the rx queue */ |
---|
730 | 730 | skb_queue_head_init(&wlandev->nsd_rxq); |
---|
731 | | - tasklet_init(&wlandev->rx_bh, |
---|
732 | | - p80211netdev_rx_bh, (unsigned long)wlandev); |
---|
| 731 | + tasklet_setup(&wlandev->rx_bh, p80211netdev_rx_bh); |
---|
733 | 732 | |
---|
734 | 733 | /* Allocate and initialize the wiphy struct */ |
---|
735 | 734 | wiphy = wlan_create_wiphy(physdev, wlandev); |
---|
.. | .. |
---|
927 | 926 | /* Classify frame, increment counter */ |
---|
928 | 927 | ftype = WLAN_GET_FC_FTYPE(fc); |
---|
929 | 928 | fstype = WLAN_GET_FC_FSTYPE(fc); |
---|
930 | | -#if 0 |
---|
931 | | - netdev_dbg(wlandev->netdev, "rx_typedrop : ftype=%d fstype=%d.\n", |
---|
932 | | - ftype, fstype); |
---|
933 | | -#endif |
---|
934 | 929 | switch (ftype) { |
---|
935 | 930 | case WLAN_FTYPE_MGMT: |
---|
936 | 931 | if ((wlandev->netdev->flags & IFF_PROMISC) || |
---|
.. | .. |
---|
1078 | 1073 | return drop; |
---|
1079 | 1074 | } |
---|
1080 | 1075 | |
---|
1081 | | -static void p80211knetdev_tx_timeout(struct net_device *netdev) |
---|
| 1076 | +static void p80211knetdev_tx_timeout(struct net_device *netdev, unsigned int txqueue) |
---|
1082 | 1077 | { |
---|
1083 | 1078 | struct wlandevice *wlandev = netdev->ml_priv; |
---|
1084 | 1079 | |
---|