hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/staging/wlan-ng/p80211netdev.c
....@@ -101,7 +101,7 @@
101101 static int p80211knetdev_do_ioctl(struct net_device *dev, struct ifreq *ifr,
102102 int cmd);
103103 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);
105105 static int p80211_rx_typedrop(struct wlandevice *wlandev, u16 fc);
106106
107107 int wlan_watchdog = 5000;
....@@ -266,15 +266,15 @@
266266 /**
267267 * p80211netdev_rx_bh - deferred processing of all received frames
268268 *
269
- * @arg: pointer to WLAN network device structure (cast to unsigned long)
269
+ * @t: pointer to the tasklet associated with this handler
270270 */
271
-static void p80211netdev_rx_bh(unsigned long arg)
271
+static void p80211netdev_rx_bh(struct tasklet_struct *t)
272272 {
273
- struct wlandevice *wlandev = (struct wlandevice *)arg;
273
+ struct wlandevice *wlandev = from_tasklet(wlandev, t, rx_bh);
274274 struct sk_buff *skb = NULL;
275275 struct net_device *dev = wlandev->netdev;
276276
277
- /* Let's empty our our queue */
277
+ /* Let's empty our queue */
278278 while ((skb = skb_dequeue(&wlandev->nsd_rxq))) {
279279 if (wlandev->state == WLAN_DEVICE_OPEN) {
280280 if (dev->type != ARPHRD_ETHER) {
....@@ -429,7 +429,7 @@
429429 failed:
430430 /* Free up the WEP buffer if it's not the same as the skb */
431431 if ((p80211_wep.data) && (p80211_wep.data != skb->data))
432
- kzfree(p80211_wep.data);
432
+ kfree_sensitive(p80211_wep.data);
433433
434434 /* we always free the skb here, never in a lower level. */
435435 if (!result)
....@@ -638,25 +638,25 @@
638638
639639 /* Set up a dot11req_mibset */
640640 memset(&dot11req, 0, sizeof(dot11req));
641
- dot11req.msgcode = DIDmsg_dot11req_mibset;
641
+ dot11req.msgcode = DIDMSG_DOT11REQ_MIBSET;
642642 dot11req.msglen = sizeof(dot11req);
643643 memcpy(dot11req.devname,
644644 ((struct wlandevice *)dev->ml_priv)->name,
645645 WLAN_DEVNAMELEN_MAX - 1);
646646
647647 /* Set up the mibattribute argument */
648
- mibattr->did = DIDmsg_dot11req_mibset_mibattribute;
648
+ mibattr->did = DIDMSG_DOT11REQ_MIBSET_MIBATTRIBUTE;
649649 mibattr->status = P80211ENUM_msgitem_status_data_ok;
650650 mibattr->len = sizeof(mibattr->data);
651651
652
- macaddr->did = DIDmib_dot11mac_dot11OperationTable_dot11MACAddress;
652
+ macaddr->did = DIDMIB_DOT11MAC_OPERATIONTABLE_MACADDRESS;
653653 macaddr->status = P80211ENUM_msgitem_status_data_ok;
654654 macaddr->len = sizeof(macaddr->data);
655655 macaddr->data.len = ETH_ALEN;
656656 memcpy(&macaddr->data.data, new_addr->sa_data, ETH_ALEN);
657657
658658 /* Set up the resultcode argument */
659
- resultcode->did = DIDmsg_dot11req_mibset_resultcode;
659
+ resultcode->did = DIDMSG_DOT11REQ_MIBSET_RESULTCODE;
660660 resultcode->status = P80211ENUM_msgitem_status_no_value;
661661 resultcode->len = sizeof(resultcode->data);
662662 resultcode->data = 0;
....@@ -728,8 +728,7 @@
728728
729729 /* Set up the rx queue */
730730 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);
733732
734733 /* Allocate and initialize the wiphy struct */
735734 wiphy = wlan_create_wiphy(physdev, wlandev);
....@@ -927,10 +926,6 @@
927926 /* Classify frame, increment counter */
928927 ftype = WLAN_GET_FC_FTYPE(fc);
929928 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
934929 switch (ftype) {
935930 case WLAN_FTYPE_MGMT:
936931 if ((wlandev->netdev->flags & IFF_PROMISC) ||
....@@ -1078,7 +1073,7 @@
10781073 return drop;
10791074 }
10801075
1081
-static void p80211knetdev_tx_timeout(struct net_device *netdev)
1076
+static void p80211knetdev_tx_timeout(struct net_device *netdev, unsigned int txqueue)
10821077 {
10831078 struct wlandevice *wlandev = netdev->ml_priv;
10841079