diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 17:35:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 17:39:31 +0000 |
commit | 85c675d0d09a45a135bddd15d7b385f8758c32fb (patch) | |
tree | 76267dbc9b9a130337be3640948fe397b04ac629 /drivers/staging/wlan-ng | |
parent | Adding upstream version 6.6.15. (diff) | |
download | linux-85c675d0d09a45a135bddd15d7b385f8758c32fb.tar.xz linux-85c675d0d09a45a135bddd15d7b385f8758c32fb.zip |
Adding upstream version 6.7.7.upstream/6.7.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r-- | drivers/staging/wlan-ng/hfa384x_usb.c | 2 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211conv.c | 12 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211netdev.h | 3 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/prism2fw.c | 2 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/prism2mgmt.h | 12 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/prism2sta.c | 179 |
6 files changed, 79 insertions, 131 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 3e8c92675c..35650f911e 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -3194,7 +3194,7 @@ static void hfa384x_usbin_txcompl(struct wlandevice *wlandev, /* Was there an error? */ if (HFA384x_TXSTATUS_ISERROR(status)) - prism2sta_ev_txexc(wlandev, status); + netdev_dbg(wlandev->netdev, "TxExc status=0x%x.\n", status); else prism2sta_ev_tx(wlandev, status); } diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index 048e1c3fe1..8336435ecc 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -312,8 +312,8 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv, payload_length - 4); if (foo) { /* de-wep failed, drop skb. */ - pr_debug("Host de-WEP failed, dropping frame (%d).\n", - foo); + netdev_dbg(netdev, "Host de-WEP failed, dropping frame (%d).\n", + foo); wlandev->rx.decrypt_err++; return 2; } @@ -340,7 +340,7 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv, (e_llc->dsap != 0xaa || e_llc->ssap != 0xaa) && ((!ether_addr_equal_unaligned(daddr, e_hdr->daddr)) || (!ether_addr_equal_unaligned(saddr, e_hdr->saddr)))) { - pr_debug("802.3 ENCAP len: %d\n", payload_length); + netdev_dbg(netdev, "802.3 ENCAP len: %d\n", payload_length); /* 802.3 Encapsulated */ /* Test for an overlength frame */ if (payload_length > (netdev->mtu + ETH_HLEN)) { @@ -367,7 +367,7 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv, (p80211_stt_findproto(be16_to_cpu(e_snap->type)))) || (memcmp(e_snap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN) != 0))) { - pr_debug("SNAP+RFC1042 len: %d\n", payload_length); + netdev_dbg(netdev, "SNAP+RFC1042 len: %d\n", payload_length); /* it's a SNAP + RFC1042 frame && protocol is in STT */ /* build 802.3 + RFC1042 */ @@ -397,7 +397,7 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv, (e_llc->dsap == 0xaa) && (e_llc->ssap == 0xaa) && (e_llc->ctl == 0x03)) { - pr_debug("802.1h/RFC1042 len: %d\n", payload_length); + netdev_dbg(netdev, "802.1h/RFC1042 len: %d\n", payload_length); /* it's an 802.1h frame || (an RFC1042 && protocol not in STT) * build a DIXII + RFC894 */ @@ -433,7 +433,7 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv, /* chop off the 802.11 CRC */ skb_trim(skb, skb->len - WLAN_CRC_LEN); } else { - pr_debug("NON-ENCAP len: %d\n", payload_length); + netdev_dbg(netdev, "NON-ENCAP len: %d\n", payload_length); /* any NON-ENCAP */ /* it's a generic 80211+LLC or IPX 'Raw 802.3' */ /* build an 802.3 frame */ diff --git a/drivers/staging/wlan-ng/p80211netdev.h b/drivers/staging/wlan-ng/p80211netdev.h index f5186380b6..485f2c697f 100644 --- a/drivers/staging/wlan-ng/p80211netdev.h +++ b/drivers/staging/wlan-ng/p80211netdev.h @@ -114,9 +114,6 @@ struct p80211_frmrx { u32 decrypt_err; }; -/* called by /proc/net/wireless */ -struct iw_statistics *p80211wext_get_wireless_stats(struct net_device *dev); - /* WEP stuff */ #define NUM_WEPKEYS 4 #define MAX_KEYLEN 32 diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index 5d03b2b9aa..3ccd110416 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -725,7 +725,7 @@ static int plugimage(struct imgchunk *fchunk, unsigned int nfchunks, if (j == -1) { /* plug the filename */ memset(dest, 0, s3plug[i].len); - strncpy(dest, PRISM2_USB_FWFILE, s3plug[i].len - 1); + strscpy(dest, PRISM2_USB_FWFILE, s3plug[i].len); } else { /* plug a PDR */ memcpy(dest, &pda->rec[j]->data, s3plug[i].len); } diff --git a/drivers/staging/wlan-ng/prism2mgmt.h b/drivers/staging/wlan-ng/prism2mgmt.h index 083a055ee9..17222516e8 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.h +++ b/drivers/staging/wlan-ng/prism2mgmt.h @@ -45,9 +45,7 @@ extern int prism2_reset_settletime; u32 prism2sta_ifstate(struct wlandevice *wlandev, u32 ifstate); -void prism2sta_ev_info(struct wlandevice *wlandev, - struct hfa384x_inf_frame *inf); -void prism2sta_ev_txexc(struct wlandevice *wlandev, u16 status); +void prism2sta_ev_info(struct wlandevice *wlandev, struct hfa384x_inf_frame *inf); void prism2sta_ev_tx(struct wlandevice *wlandev, u16 status); void prism2sta_ev_alloc(struct wlandevice *wlandev); @@ -78,14 +76,6 @@ void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr, void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr, struct p80211pstrd *pstr); -/* functions to convert Group Addresses */ -void prism2mgmt_get_grpaddr(u32 did, struct p80211pstrd *pstr, - struct hfa384x *priv); -int prism2mgmt_set_grpaddr(u32 did, - u8 *prism2buf, struct p80211pstrd *pstr, - struct hfa384x *priv); -int prism2mgmt_get_grpaddr_index(u32 did); - void prism2sta_processing_defer(struct work_struct *data); void prism2sta_commsqual_defer(struct work_struct *data); diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 57180bb716..cb6c7a9fb8 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -90,9 +90,6 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev); static int prism2sta_globalsetup(struct wlandevice *wlandev); static int prism2sta_setmulticast(struct wlandevice *wlandev, struct net_device *dev); - -static void prism2sta_inf_handover(struct wlandevice *wlandev, - struct hfa384x_inf_frame *inf); static void prism2sta_inf_tallies(struct wlandevice *wlandev, struct hfa384x_inf_frame *inf); static void prism2sta_inf_hostscanresults(struct wlandevice *wlandev, @@ -268,46 +265,50 @@ static int prism2sta_mlmerequest(struct wlandevice *wlandev, switch (msg->msgcode) { case DIDMSG_DOT11REQ_MIBGET: - pr_debug("Received mibget request\n"); + netdev_dbg(wlandev->netdev, "Received mibget request\n"); result = prism2mgmt_mibset_mibget(wlandev, msg); break; case DIDMSG_DOT11REQ_MIBSET: - pr_debug("Received mibset request\n"); + netdev_dbg(wlandev->netdev, "Received mibset request\n"); result = prism2mgmt_mibset_mibget(wlandev, msg); break; case DIDMSG_DOT11REQ_SCAN: - pr_debug("Received scan request\n"); + netdev_dbg(wlandev->netdev, "Received scan request\n"); result = prism2mgmt_scan(wlandev, msg); break; case DIDMSG_DOT11REQ_SCAN_RESULTS: - pr_debug("Received scan_results request\n"); + netdev_dbg(wlandev->netdev, "Received scan_results request\n"); result = prism2mgmt_scan_results(wlandev, msg); break; case DIDMSG_DOT11REQ_START: - pr_debug("Received mlme start request\n"); + netdev_dbg(wlandev->netdev, "Received mlme start request\n"); result = prism2mgmt_start(wlandev, msg); break; /* * Prism2 specific messages */ case DIDMSG_P2REQ_READPDA: - pr_debug("Received mlme readpda request\n"); + netdev_dbg(wlandev->netdev, "Received mlme readpda request\n"); result = prism2mgmt_readpda(wlandev, msg); break; case DIDMSG_P2REQ_RAMDL_STATE: - pr_debug("Received mlme ramdl_state request\n"); + netdev_dbg(wlandev->netdev, + "Received mlme ramdl_state request\n"); result = prism2mgmt_ramdl_state(wlandev, msg); break; case DIDMSG_P2REQ_RAMDL_WRITE: - pr_debug("Received mlme ramdl_write request\n"); + netdev_dbg(wlandev->netdev, + "Received mlme ramdl_write request\n"); result = prism2mgmt_ramdl_write(wlandev, msg); break; case DIDMSG_P2REQ_FLASHDL_STATE: - pr_debug("Received mlme flashdl_state request\n"); + netdev_dbg(wlandev->netdev, + "Received mlme flashdl_state request\n"); result = prism2mgmt_flashdl_state(wlandev, msg); break; case DIDMSG_P2REQ_FLASHDL_WRITE: - pr_debug("Received mlme flashdl_write request\n"); + netdev_dbg(wlandev->netdev, + "Received mlme flashdl_write request\n"); result = prism2mgmt_flashdl_write(wlandev, msg); break; /* @@ -318,7 +319,7 @@ static int prism2sta_mlmerequest(struct wlandevice *wlandev, case DIDMSG_LNXREQ_IFSTATE: { struct p80211msg_lnxreq_ifstate *ifstatemsg; - pr_debug("Received mlme ifstate request\n"); + netdev_dbg(wlandev->netdev, "Received mlme ifstate request\n"); ifstatemsg = (struct p80211msg_lnxreq_ifstate *)msg; result = prism2sta_ifstate(wlandev, ifstatemsg->ifstate.data); @@ -329,17 +330,18 @@ static int prism2sta_mlmerequest(struct wlandevice *wlandev, break; } case DIDMSG_LNXREQ_WLANSNIFF: - pr_debug("Received mlme wlansniff request\n"); + netdev_dbg(wlandev->netdev, + "Received mlme wlansniff request\n"); result = prism2mgmt_wlansniff(wlandev, msg); break; case DIDMSG_LNXREQ_AUTOJOIN: - pr_debug("Received mlme autojoin request\n"); + netdev_dbg(wlandev->netdev, "Received mlme autojoin request\n"); result = prism2mgmt_autojoin(wlandev, msg); break; case DIDMSG_LNXREQ_COMMSQUALITY: { struct p80211msg_lnxreq_commsquality *qualmsg; - pr_debug("Received commsquality request\n"); + netdev_dbg(wlandev->netdev, "Received commsquality request\n"); qualmsg = (struct p80211msg_lnxreq_commsquality *)msg; @@ -392,8 +394,8 @@ u32 prism2sta_ifstate(struct wlandevice *wlandev, u32 ifstate) result = P80211ENUM_resultcode_implementation_failure; - pr_debug("Current MSD state(%d), requesting(%d)\n", - wlandev->msdstate, ifstate); + netdev_dbg(wlandev->netdev, "Current MSD state(%d), requesting(%d)\n", + wlandev->msdstate, ifstate); switch (ifstate) { case P80211ENUM_ifstate_fwload: switch (wlandev->msdstate) { @@ -923,30 +925,6 @@ exit: } /* - * prism2sta_inf_handover - * - * Handles the receipt of a Handover info frame. Should only be present - * in APs only. - * - * Arguments: - * wlandev wlan device structure - * inf ptr to info frame (contents in hfa384x order) - * - * Returns: - * nothing - * - * Side effects: - * - * Call context: - * interrupt - */ -static void prism2sta_inf_handover(struct wlandevice *wlandev, - struct hfa384x_inf_frame *inf) -{ - pr_debug("received infoframe:HANDOVER (unhandled)\n"); -} - -/* * prism2sta_inf_tallies * * Handles the receipt of a CommTallies info frame. @@ -1025,15 +1003,15 @@ static void prism2sta_inf_scanresults(struct wlandevice *wlandev, nbss /= sizeof(struct hfa384x_scan_result_sub); /* Print em */ - pr_debug("rx scanresults, reason=%d, nbss=%d:\n", - inf->info.scanresult.scanreason, nbss); + netdev_dbg(wlandev->netdev, "rx scanresults, reason=%d, nbss=%d:\n", + inf->info.scanresult.scanreason, nbss); for (i = 0; i < nbss; i++) { - pr_debug("chid=%d anl=%d sl=%d bcnint=%d\n", - sr->result[i].chid, - sr->result[i].anl, - sr->result[i].sl, sr->result[i].bcnint); - pr_debug(" capinfo=0x%04x proberesp_rate=%d\n", - sr->result[i].capinfo, sr->result[i].proberesp_rate); + netdev_dbg(wlandev->netdev, "chid=%d anl=%d sl=%d bcnint=%d\n", + sr->result[i].chid, sr->result[i].anl, + sr->result[i].sl, sr->result[i].bcnint); + netdev_dbg(wlandev->netdev, + " capinfo=0x%04x proberesp_rate=%d\n", + sr->result[i].capinfo, sr->result[i].proberesp_rate); } /* issue a join request */ joinreq.channel = sr->result[0].chid; @@ -1071,7 +1049,7 @@ static void prism2sta_inf_hostscanresults(struct wlandevice *wlandev, int nbss; nbss = (inf->framelen - 3) / 32; - pr_debug("Received %d hostscan results\n", nbss); + netdev_dbg(wlandev->netdev, "Received %d hostscan results\n", nbss); if (nbss > 32) nbss = 32; @@ -1134,13 +1112,14 @@ static void prism2sta_inf_chinforesults(struct wlandevice *wlandev, chinforesult->pnl = result->pnl; chinforesult->active = result->active; - pr_debug("chinfo: channel %d, %s level (avg/peak)=%d/%d dB, pcf %d\n", - chan + 1, - (chinforesult->active & HFA384x_CHINFORESULT_BSSACTIVE) - ? "signal" : "noise", - chinforesult->anl, chinforesult->pnl, - (chinforesult->active & HFA384x_CHINFORESULT_PCFACTIVE) - ? 1 : 0); + netdev_dbg(wlandev->netdev, + "chinfo: channel %d, %s level (avg/peak)=%d/%d dB, pcf %d\n", + chan + 1, + (chinforesult->active & HFA384x_CHINFORESULT_BSSACTIVE) ? + "signal" : "noise", + chinforesult->anl, + chinforesult->pnl, + (chinforesult->active & HFA384x_CHINFORESULT_PCFACTIVE) ? 1 : 0); n++; } atomic_set(&hw->channel_info.done, 2); @@ -1219,9 +1198,9 @@ void prism2sta_processing_defer(struct work_struct *data) wlandev->bssid, WLAN_BSSID_LEN); if (result) { - pr_debug - ("getconfig(0x%02x) failed, result = %d\n", - HFA384x_RID_CURRENTBSSID, result); + netdev_dbg(wlandev->netdev, + "getconfig(0x%02x) failed, result = %d\n", + HFA384x_RID_CURRENTBSSID, result); return; } @@ -1229,9 +1208,9 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, &ssid, sizeof(ssid)); if (result) { - pr_debug - ("getconfig(0x%02x) failed, result = %d\n", - HFA384x_RID_CURRENTSSID, result); + netdev_dbg(wlandev->netdev, + "getconfig(0x%02x) failed, result = %d\n", + HFA384x_RID_CURRENTSSID, result); return; } prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid, @@ -1242,9 +1221,9 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_PORTSTATUS, &portstatus); if (result) { - pr_debug - ("getconfig(0x%02x) failed, result = %d\n", - HFA384x_RID_PORTSTATUS, result); + netdev_dbg(wlandev->netdev, + "getconfig(0x%02x) failed, result = %d\n", + HFA384x_RID_PORTSTATUS, result); return; } wlandev->macmode = @@ -1302,8 +1281,9 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_CURRENTBSSID, wlandev->bssid, WLAN_BSSID_LEN); if (result) { - pr_debug("getconfig(0x%02x) failed, result = %d\n", - HFA384x_RID_CURRENTBSSID, result); + netdev_dbg(wlandev->netdev, + "getconfig(0x%02x) failed, result = %d\n", + HFA384x_RID_CURRENTBSSID, result); return; } @@ -1311,8 +1291,9 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, &ssid, sizeof(ssid)); if (result) { - pr_debug("getconfig(0x%02x) failed, result = %d\n", - HFA384x_RID_CURRENTSSID, result); + netdev_dbg(wlandev->netdev, + "getconfig(0x%02x) failed, result = %d\n", + HFA384x_RID_CURRENTSSID, result); return; } prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid, @@ -1724,7 +1705,8 @@ void prism2sta_ev_info(struct wlandevice *wlandev, /* Dispatch */ switch (inf->infotype) { case HFA384x_IT_HANDOVERADDR: - prism2sta_inf_handover(wlandev, inf); + netdev_dbg(wlandev->netdev, + "received infoframe:HANDOVER (unhandled)\n"); break; case HFA384x_IT_COMMTALLIES: prism2sta_inf_tallies(wlandev, inf); @@ -1767,30 +1749,6 @@ void prism2sta_ev_info(struct wlandevice *wlandev, } /* - * prism2sta_ev_txexc - * - * Handles the TxExc event. A Transmit Exception event indicates - * that the MAC's TX process was unsuccessful - so the packet did - * not get transmitted. - * - * Arguments: - * wlandev wlan device structure - * status tx frame status word - * - * Returns: - * nothing - * - * Side effects: - * - * Call context: - * interrupt - */ -void prism2sta_ev_txexc(struct wlandevice *wlandev, u16 status) -{ - pr_debug("TxExc status=0x%x.\n", status); -} - -/* * prism2sta_ev_tx * * Handles the Tx event. @@ -1808,7 +1766,7 @@ void prism2sta_ev_txexc(struct wlandevice *wlandev, u16 status) */ void prism2sta_ev_tx(struct wlandevice *wlandev, u16 status) { - pr_debug("Tx Complete, status=0x%04x\n", status); + netdev_dbg(wlandev->netdev, "Tx Complete, status=0x%04x\n", status); /* update linux network stats */ wlandev->netdev->stats.tx_packets++; } @@ -1917,10 +1875,10 @@ void prism2sta_commsqual_defer(struct work_struct *data) return; } - pr_debug("commsqual %d %d %d\n", - le16_to_cpu(hw->qual.cq_curr_bss), - le16_to_cpu(hw->qual.asl_curr_bss), - le16_to_cpu(hw->qual.anl_curr_fc)); + netdev_dbg(wlandev->netdev, "commsqual %d %d %d\n", + le16_to_cpu(hw->qual.cq_curr_bss), + le16_to_cpu(hw->qual.asl_curr_bss), + le16_to_cpu(hw->qual.anl_curr_fc)); } /* Get the signal rate */ @@ -1929,8 +1887,8 @@ void prism2sta_commsqual_defer(struct work_struct *data) result = p80211req_dorequest(wlandev, (u8 *)&msg); if (result) { - pr_debug("get signal rate failed, result = %d\n", - result); + netdev_dbg(wlandev->netdev, + "get signal rate failed, result = %d\n", result); return; } @@ -1948,7 +1906,8 @@ void prism2sta_commsqual_defer(struct work_struct *data) hw->txrate = 110; break; default: - pr_debug("Bad ratebit (%d)\n", mibitem->data); + netdev_dbg(wlandev->netdev, "Bad ratebit (%d)\n", + mibitem->data); } /* Lastly, we need to make sure the BSSID didn't change on us */ @@ -1956,8 +1915,9 @@ void prism2sta_commsqual_defer(struct work_struct *data) HFA384x_RID_CURRENTBSSID, wlandev->bssid, WLAN_BSSID_LEN); if (result) { - pr_debug("getconfig(0x%02x) failed, result = %d\n", - HFA384x_RID_CURRENTBSSID, result); + netdev_dbg(wlandev->netdev, + "getconfig(0x%02x) failed, result = %d\n", + HFA384x_RID_CURRENTBSSID, result); return; } @@ -1965,8 +1925,9 @@ void prism2sta_commsqual_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, &ssid, sizeof(ssid)); if (result) { - pr_debug("getconfig(0x%02x) failed, result = %d\n", - HFA384x_RID_CURRENTSSID, result); + netdev_dbg(wlandev->netdev, + "getconfig(0x%02x) failed, result = %d\n", + HFA384x_RID_CURRENTSSID, result); return; } prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid, |