From 08f87f769b595151be1afeff53e144f543faa614 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 06 Dec 2023 09:51:13 +0000 Subject: [PATCH] add dts config --- kernel/drivers/staging/wlan-ng/p80211netdev.c | 29 ++++++++++++----------------- 1 files changed, 12 insertions(+), 17 deletions(-) diff --git a/kernel/drivers/staging/wlan-ng/p80211netdev.c b/kernel/drivers/staging/wlan-ng/p80211netdev.c index 8258cb5..a15abb2 100644 --- a/kernel/drivers/staging/wlan-ng/p80211netdev.c +++ b/kernel/drivers/staging/wlan-ng/p80211netdev.c @@ -101,7 +101,7 @@ static int p80211knetdev_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); static int p80211knetdev_set_mac_address(struct net_device *dev, void *addr); -static void p80211knetdev_tx_timeout(struct net_device *netdev); +static void p80211knetdev_tx_timeout(struct net_device *netdev, unsigned int txqueue); static int p80211_rx_typedrop(struct wlandevice *wlandev, u16 fc); int wlan_watchdog = 5000; @@ -266,15 +266,15 @@ /** * p80211netdev_rx_bh - deferred processing of all received frames * - * @arg: pointer to WLAN network device structure (cast to unsigned long) + * @t: pointer to the tasklet associated with this handler */ -static void p80211netdev_rx_bh(unsigned long arg) +static void p80211netdev_rx_bh(struct tasklet_struct *t) { - struct wlandevice *wlandev = (struct wlandevice *)arg; + struct wlandevice *wlandev = from_tasklet(wlandev, t, rx_bh); struct sk_buff *skb = NULL; struct net_device *dev = wlandev->netdev; - /* Let's empty our our queue */ + /* Let's empty our queue */ while ((skb = skb_dequeue(&wlandev->nsd_rxq))) { if (wlandev->state == WLAN_DEVICE_OPEN) { if (dev->type != ARPHRD_ETHER) { @@ -429,7 +429,7 @@ failed: /* Free up the WEP buffer if it's not the same as the skb */ if ((p80211_wep.data) && (p80211_wep.data != skb->data)) - kzfree(p80211_wep.data); + kfree_sensitive(p80211_wep.data); /* we always free the skb here, never in a lower level. */ if (!result) @@ -638,25 +638,25 @@ /* Set up a dot11req_mibset */ memset(&dot11req, 0, sizeof(dot11req)); - dot11req.msgcode = DIDmsg_dot11req_mibset; + dot11req.msgcode = DIDMSG_DOT11REQ_MIBSET; dot11req.msglen = sizeof(dot11req); memcpy(dot11req.devname, ((struct wlandevice *)dev->ml_priv)->name, WLAN_DEVNAMELEN_MAX - 1); /* Set up the mibattribute argument */ - mibattr->did = DIDmsg_dot11req_mibset_mibattribute; + mibattr->did = DIDMSG_DOT11REQ_MIBSET_MIBATTRIBUTE; mibattr->status = P80211ENUM_msgitem_status_data_ok; mibattr->len = sizeof(mibattr->data); - macaddr->did = DIDmib_dot11mac_dot11OperationTable_dot11MACAddress; + macaddr->did = DIDMIB_DOT11MAC_OPERATIONTABLE_MACADDRESS; macaddr->status = P80211ENUM_msgitem_status_data_ok; macaddr->len = sizeof(macaddr->data); macaddr->data.len = ETH_ALEN; memcpy(&macaddr->data.data, new_addr->sa_data, ETH_ALEN); /* Set up the resultcode argument */ - resultcode->did = DIDmsg_dot11req_mibset_resultcode; + resultcode->did = DIDMSG_DOT11REQ_MIBSET_RESULTCODE; resultcode->status = P80211ENUM_msgitem_status_no_value; resultcode->len = sizeof(resultcode->data); resultcode->data = 0; @@ -728,8 +728,7 @@ /* Set up the rx queue */ skb_queue_head_init(&wlandev->nsd_rxq); - tasklet_init(&wlandev->rx_bh, - p80211netdev_rx_bh, (unsigned long)wlandev); + tasklet_setup(&wlandev->rx_bh, p80211netdev_rx_bh); /* Allocate and initialize the wiphy struct */ wiphy = wlan_create_wiphy(physdev, wlandev); @@ -927,10 +926,6 @@ /* Classify frame, increment counter */ ftype = WLAN_GET_FC_FTYPE(fc); fstype = WLAN_GET_FC_FSTYPE(fc); -#if 0 - netdev_dbg(wlandev->netdev, "rx_typedrop : ftype=%d fstype=%d.\n", - ftype, fstype); -#endif switch (ftype) { case WLAN_FTYPE_MGMT: if ((wlandev->netdev->flags & IFF_PROMISC) || @@ -1078,7 +1073,7 @@ return drop; } -static void p80211knetdev_tx_timeout(struct net_device *netdev) +static void p80211knetdev_tx_timeout(struct net_device *netdev, unsigned int txqueue) { struct wlandevice *wlandev = netdev->ml_priv; -- Gitblit v1.6.2