* [PATCH 1/2] staging: r8188eu: remove unused function rtw_add_bcn_ie()
@ 2021-08-19 11:21 Michael Straube
2021-08-19 11:22 ` [PATCH 2/2] staging: r8188eu: remove unused function rtw_remove_bcn_ie() Michael Straube
2021-08-20 22:47 ` [PATCH 1/2] staging: r8188eu: remove unused function rtw_add_bcn_ie() Phillip Potter
0 siblings, 2 replies; 4+ messages in thread
From: Michael Straube @ 2021-08-19 11:21 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Function rtw_add_bcn_ie() is not used anywhere, remove it.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_ap.c | 63 ------------------------
drivers/staging/r8188eu/include/rtw_ap.h | 2 -
2 files changed, 65 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188eu/core/rtw_ap.c
index 1127e9a52458..0237b7f8e42f 100644
--- a/drivers/staging/r8188eu/core/rtw_ap.c
+++ b/drivers/staging/r8188eu/core/rtw_ap.c
@@ -139,69 +139,6 @@ static void update_BCNTIM(struct adapter *padapter)
set_tx_beacon_cmd(padapter);
}
-void rtw_add_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index, u8 *data, u8 len)
-{
- struct ndis_802_11_var_ie *pIE;
- u8 bmatch = false;
- u8 *pie = pnetwork->IEs;
- u8 *p = NULL, *dst_ie = NULL, *premainder_ie = NULL;
- u8 *pbackup_remainder_ie = NULL;
- u32 i, offset, ielen = 0, ie_offset, remainder_ielen = 0;
-
- for (i = sizeof(struct ndis_802_11_fixed_ie); i < pnetwork->IELength;) {
- pIE = (struct ndis_802_11_var_ie *)(pnetwork->IEs + i);
-
- if (pIE->ElementID > index) {
- break;
- } else if (pIE->ElementID == index) { /* already exist the same IE */
- p = (u8 *)pIE;
- ielen = pIE->Length;
- bmatch = true;
- break;
- }
- p = (u8 *)pIE;
- ielen = pIE->Length;
- i += (pIE->Length + 2);
- }
-
- if (p && ielen > 0) {
- ielen += 2;
-
- premainder_ie = p + ielen;
-
- ie_offset = (int)(p - pie);
-
- remainder_ielen = pnetwork->IELength - ie_offset - ielen;
-
- if (bmatch)
- dst_ie = p;
- else
- dst_ie = (p + ielen);
- }
-
- if (remainder_ielen > 0) {
- pbackup_remainder_ie = kmalloc(remainder_ielen, GFP_KERNEL);
- if (pbackup_remainder_ie && premainder_ie)
- memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
- }
-
- *dst_ie++ = index;
- *dst_ie++ = len;
-
- memcpy(dst_ie, data, len);
- dst_ie += len;
-
- /* copy remainder IE */
- if (pbackup_remainder_ie) {
- memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen);
-
- kfree(pbackup_remainder_ie);
- }
-
- offset = (uint)(dst_ie - pie);
- pnetwork->IELength = offset + remainder_ielen;
-}
-
void rtw_remove_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index)
{
u8 *p, *dst_ie = NULL, *premainder_ie = NULL;
diff --git a/drivers/staging/r8188eu/include/rtw_ap.h b/drivers/staging/r8188eu/include/rtw_ap.h
index b20edab3bb00..fffb6794b1ce 100644
--- a/drivers/staging/r8188eu/include/rtw_ap.h
+++ b/drivers/staging/r8188eu/include/rtw_ap.h
@@ -16,8 +16,6 @@ void rtw_indicate_sta_disassoc_event(struct adapter *padapter,
struct sta_info *psta);
void init_mlme_ap_info(struct adapter *padapter);
void free_mlme_ap_info(struct adapter *padapter);
-void rtw_add_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork,
- u8 index, u8 *data, u8 len);
void rtw_remove_bcn_ie(struct adapter *padapter,
struct wlan_bssid_ex *pnetwork, u8 index);
void update_beacon(struct adapter *padapter, u8 ie_id,
--
2.32.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] staging: r8188eu: remove unused function rtw_remove_bcn_ie()
2021-08-19 11:21 [PATCH 1/2] staging: r8188eu: remove unused function rtw_add_bcn_ie() Michael Straube
@ 2021-08-19 11:22 ` Michael Straube
2021-08-20 22:48 ` Phillip Potter
2021-08-20 22:47 ` [PATCH 1/2] staging: r8188eu: remove unused function rtw_add_bcn_ie() Phillip Potter
1 sibling, 1 reply; 4+ messages in thread
From: Michael Straube @ 2021-08-19 11:22 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Function rtw_remove_bcn_ie() is not used anywhere, remove it.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_ap.c | 38 ------------------------
drivers/staging/r8188eu/include/rtw_ap.h | 2 --
2 files changed, 40 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188eu/core/rtw_ap.c
index 0237b7f8e42f..1f3aa0092ef9 100644
--- a/drivers/staging/r8188eu/core/rtw_ap.c
+++ b/drivers/staging/r8188eu/core/rtw_ap.c
@@ -139,44 +139,6 @@ static void update_BCNTIM(struct adapter *padapter)
set_tx_beacon_cmd(padapter);
}
-void rtw_remove_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index)
-{
- u8 *p, *dst_ie = NULL, *premainder_ie = NULL;
- u8 *pbackup_remainder_ie = NULL;
- uint offset, ielen, ie_offset, remainder_ielen = 0;
- u8 *pie = pnetwork->IEs;
-
- p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, index, &ielen,
- pnetwork->IELength - _FIXED_IE_LENGTH_);
- if (p && ielen > 0) {
- ielen += 2;
-
- premainder_ie = p + ielen;
-
- ie_offset = (int)(p - pie);
-
- remainder_ielen = pnetwork->IELength - ie_offset - ielen;
-
- dst_ie = p;
- }
-
- if (remainder_ielen > 0) {
- pbackup_remainder_ie = kmalloc(remainder_ielen, GFP_KERNEL);
- if (pbackup_remainder_ie && premainder_ie)
- memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
- }
-
- /* copy remainder IE */
- if (pbackup_remainder_ie) {
- memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen);
-
- kfree(pbackup_remainder_ie);
- }
-
- offset = (uint)(dst_ie - pie);
- pnetwork->IELength = offset + remainder_ielen;
-}
-
static u8 chk_sta_is_alive(struct sta_info *psta)
{
u8 ret = false;
diff --git a/drivers/staging/r8188eu/include/rtw_ap.h b/drivers/staging/r8188eu/include/rtw_ap.h
index fffb6794b1ce..2eb556968509 100644
--- a/drivers/staging/r8188eu/include/rtw_ap.h
+++ b/drivers/staging/r8188eu/include/rtw_ap.h
@@ -16,8 +16,6 @@ void rtw_indicate_sta_disassoc_event(struct adapter *padapter,
struct sta_info *psta);
void init_mlme_ap_info(struct adapter *padapter);
void free_mlme_ap_info(struct adapter *padapter);
-void rtw_remove_bcn_ie(struct adapter *padapter,
- struct wlan_bssid_ex *pnetwork, u8 index);
void update_beacon(struct adapter *padapter, u8 ie_id,
u8 *oui, u8 tx);
void add_RATid(struct adapter *padapter, struct sta_info *psta,
--
2.32.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] staging: r8188eu: remove unused function rtw_add_bcn_ie()
2021-08-19 11:21 [PATCH 1/2] staging: r8188eu: remove unused function rtw_add_bcn_ie() Michael Straube
2021-08-19 11:22 ` [PATCH 2/2] staging: r8188eu: remove unused function rtw_remove_bcn_ie() Michael Straube
@ 2021-08-20 22:47 ` Phillip Potter
1 sibling, 0 replies; 4+ messages in thread
From: Phillip Potter @ 2021-08-20 22:47 UTC (permalink / raw)
To: Michael Straube
Cc: Larry.Finger, martin, fmdefrancesco, linux-staging, linux-kernel, gregkh
On Thu, 2021-08-19 at 13:21 +0200, Michael Straube wrote:
> Function rtw_add_bcn_ie() is not used anywhere, remove it.
>
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
> drivers/staging/r8188eu/core/rtw_ap.c | 63 ----------------------
> --
> drivers/staging/r8188eu/include/rtw_ap.h | 2 -
> 2 files changed, 65 deletions(-)
Dear Michael,
Looks good, thanks.
Acked-by: Phillip Potter <phil@philpotter.co.uk>
Regards,
Phil
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] staging: r8188eu: remove unused function rtw_remove_bcn_ie()
2021-08-19 11:22 ` [PATCH 2/2] staging: r8188eu: remove unused function rtw_remove_bcn_ie() Michael Straube
@ 2021-08-20 22:48 ` Phillip Potter
0 siblings, 0 replies; 4+ messages in thread
From: Phillip Potter @ 2021-08-20 22:48 UTC (permalink / raw)
To: Michael Straube
Cc: Larry.Finger, martin, fmdefrancesco, linux-staging, linux-kernel, gregkh
On Thu, 2021-08-19 at 13:22 +0200, Michael Straube wrote:
> Function rtw_remove_bcn_ie() is not used anywhere, remove it.
>
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
> drivers/staging/r8188eu/core/rtw_ap.c | 38 ------------------------
> drivers/staging/r8188eu/include/rtw_ap.h | 2 --
> 2 files changed, 40 deletions(-)
>
Dear Michael,
Looks good, thanks.
Acked-by: Phillip Potter <phil@philpotter.co.uk>
Regards,
Phil
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-20 22:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19 11:21 [PATCH 1/2] staging: r8188eu: remove unused function rtw_add_bcn_ie() Michael Straube
2021-08-19 11:22 ` [PATCH 2/2] staging: r8188eu: remove unused function rtw_remove_bcn_ie() Michael Straube
2021-08-20 22:48 ` Phillip Potter
2021-08-20 22:47 ` [PATCH 1/2] staging: r8188eu: remove unused function rtw_add_bcn_ie() Phillip Potter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).