* [PATCH v2 0/3] staging: rtl8188eu: Remove unnecessary functions
@ 2015-10-29 6:15 Amitoj Kaur Chawla
2015-10-29 6:17 ` [PATCH v2 1/3] staging: rtl8188eu: core: rtw_ap : " Amitoj Kaur Chawla
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-29 6:15 UTC (permalink / raw)
To: outreachy-kernel
This patchset removes unnecessary functions that aren't used, or can
be replaced by a single line of code.
Changes in v2:
-Renamed function appropriately
Amitoj Kaur Chawla(3):
staging: rtl8188eu: core: rtw_ap : Remove unnecessary functions
staging: rtl8188eu: Remove unused function
staging: rtl8188eu: core: Remove wrapper function
drivers/staging/rtl8188eu/core/rtw_ap.c | 54 +--------------------------
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 41 +++++++++++---------
drivers/staging/rtl8188eu/core/rtw_xmit.c | 5 ---
drivers/staging/rtl8188eu/include/rtw_xmit.h | 1 -
4 files changed, 25 insertions(+), 76 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/3] staging: rtl8188eu: core: rtw_ap : Remove unnecessary functions
2015-10-29 6:15 [PATCH v2 0/3] staging: rtl8188eu: Remove unnecessary functions Amitoj Kaur Chawla
@ 2015-10-29 6:17 ` Amitoj Kaur Chawla
2015-10-29 6:18 ` [PATCH v2 2/3] staging: rtl8188eu: Remove unused function Amitoj Kaur Chawla
2015-10-29 6:22 ` [PATCH v2 3/3] staging: rtl8188eu: core: Remove wrapper function Amitoj Kaur Chawla
2 siblings, 0 replies; 6+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-29 6:17 UTC (permalink / raw)
To: outreachy-kernel
Drop unnecessary functions that are declared but not being used.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
Changes in v2:
-None
drivers/staging/rtl8188eu/core/rtw_ap.c | 54 +--------------------------------
1 file changed, 1 insertion(+), 53 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c
index 5c45f8a..aab9918 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ap.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ap.c
@@ -1240,11 +1240,6 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
return 0;
}
-static void update_bcn_fixed_ie(struct adapter *padapter)
-{
- DBG_88E("%s\n", __func__);
-}
-
static void update_bcn_erpinfo_ie(struct adapter *padapter)
{
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
@@ -1279,31 +1274,6 @@ static void update_bcn_erpinfo_ie(struct adapter *padapter)
}
}
-static void update_bcn_htcap_ie(struct adapter *padapter)
-{
- DBG_88E("%s\n", __func__);
-}
-
-static void update_bcn_htinfo_ie(struct adapter *padapter)
-{
- DBG_88E("%s\n", __func__);
-}
-
-static void update_bcn_rsn_ie(struct adapter *padapter)
-{
- DBG_88E("%s\n", __func__);
-}
-
-static void update_bcn_wpa_ie(struct adapter *padapter)
-{
- DBG_88E("%s\n", __func__);
-}
-
-static void update_bcn_wmm_ie(struct adapter *padapter)
-{
- DBG_88E("%s\n", __func__);
-}
-
static void update_bcn_wps_ie(struct adapter *padapter)
{
u8 *pwps_ie = NULL, *pwps_ie_src;
@@ -1354,22 +1324,12 @@ static void update_bcn_wps_ie(struct adapter *padapter)
kfree(pbackup_remainder_ie);
}
-static void update_bcn_p2p_ie(struct adapter *padapter)
-{
-}
-
static void update_bcn_vendor_spec_ie(struct adapter *padapter, u8 *oui)
{
DBG_88E("%s\n", __func__);
- if (!memcmp(RTW_WPA_OUI, oui, 4))
- update_bcn_wpa_ie(padapter);
- else if (!memcmp(WMM_OUI, oui, 4))
- update_bcn_wmm_ie(padapter);
- else if (!memcmp(WPS_OUI, oui, 4))
+ if (!memcmp(WPS_OUI, oui, 4))
update_bcn_wps_ie(padapter);
- else if (!memcmp(P2P_OUI, oui, 4))
- update_bcn_p2p_ie(padapter);
else
DBG_88E("unknown OUI type!\n");
}
@@ -1391,24 +1351,12 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
spin_lock_bh(&pmlmepriv->bcn_update_lock);
switch (ie_id) {
- case 0xFF:
- update_bcn_fixed_ie(padapter);/* 8: TimeStamp, 2: Beacon Interval 2:Capability */
- break;
case _TIM_IE_:
update_BCNTIM(padapter);
break;
case _ERPINFO_IE_:
update_bcn_erpinfo_ie(padapter);
break;
- case _HT_CAPABILITY_IE_:
- update_bcn_htcap_ie(padapter);
- break;
- case _RSN_IE_2_:
- update_bcn_rsn_ie(padapter);
- break;
- case _HT_ADD_INFO_IE_:
- update_bcn_htinfo_ie(padapter);
- break;
case _VENDOR_SPECIFIC_IE_:
update_bcn_vendor_spec_ie(padapter, oui);
break;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] staging: rtl8188eu: Remove unused function
2015-10-29 6:15 [PATCH v2 0/3] staging: rtl8188eu: Remove unnecessary functions Amitoj Kaur Chawla
2015-10-29 6:17 ` [PATCH v2 1/3] staging: rtl8188eu: core: rtw_ap : " Amitoj Kaur Chawla
@ 2015-10-29 6:18 ` Amitoj Kaur Chawla
2015-10-29 6:22 ` [PATCH v2 3/3] staging: rtl8188eu: core: Remove wrapper function Amitoj Kaur Chawla
2 siblings, 0 replies; 6+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-29 6:18 UTC (permalink / raw)
To: outreachy-kernel
Remove function that is declared but not called anywhere.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
Changes in v2:
-None
drivers/staging/rtl8188eu/core/rtw_xmit.c | 5 -----
drivers/staging/rtl8188eu/include/rtw_xmit.h | 1 -
2 files changed, 6 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index cabb810..11dbfc0 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -2186,11 +2186,6 @@ void rtw_sctx_done_err(struct submit_ctx **sctx, int status)
}
}
-void rtw_sctx_done(struct submit_ctx **sctx)
-{
- rtw_sctx_done_err(sctx, RTW_SCTX_DONE_SUCCESS);
-}
-
int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms)
{
struct submit_ctx *pack_tx_ops = &pxmitpriv->ack_tx_ops;
diff --git a/drivers/staging/rtl8188eu/include/rtw_xmit.h b/drivers/staging/rtl8188eu/include/rtw_xmit.h
index 62f5db1..b7c2088 100644
--- a/drivers/staging/rtl8188eu/include/rtw_xmit.h
+++ b/drivers/staging/rtl8188eu/include/rtw_xmit.h
@@ -197,7 +197,6 @@ enum {
void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms);
int rtw_sctx_wait(struct submit_ctx *sctx);
void rtw_sctx_done_err(struct submit_ctx **sctx, int status);
-void rtw_sctx_done(struct submit_ctx **sctx);
struct xmit_buf {
struct list_head list;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] staging: rtl8188eu: core: Remove wrapper function
2015-10-29 6:15 [PATCH v2 0/3] staging: rtl8188eu: Remove unnecessary functions Amitoj Kaur Chawla
2015-10-29 6:17 ` [PATCH v2 1/3] staging: rtl8188eu: core: rtw_ap : " Amitoj Kaur Chawla
2015-10-29 6:18 ` [PATCH v2 2/3] staging: rtl8188eu: Remove unused function Amitoj Kaur Chawla
@ 2015-10-29 6:22 ` Amitoj Kaur Chawla
2015-10-29 10:40 ` [Outreachy kernel] " Sudip Mukherjee
2 siblings, 1 reply; 6+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-29 6:22 UTC (permalink / raw)
To: outreachy-kernel
Remove wrapper function issue_probereq() that can be replaced by a
single line of code and rename _issue_probereq() to issue_probereq().
This patch also fixes line over 80 characters checkpatch.pl warning.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
Changes in v2:
-Renamed _issue_probereq() to issue_probereq()
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 41 ++++++++++++++++-----------
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index 0270755..d3b92c5 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -608,7 +608,7 @@ static void issue_probersp(struct adapter *padapter, unsigned char *da)
return;
}
-static int _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da, int wait_ack)
+static int issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da, int wait_ack)
{
int ret = _FAIL;
struct xmit_frame *pmgntframe;
@@ -701,12 +701,6 @@ exit:
return ret;
}
-static inline void issue_probereq(struct adapter *padapter,
- struct ndis_802_11_ssid *pssid, u8 *da)
-{
- _issue_probereq(padapter, pssid, da, false);
-}
-
static int issue_probereq_ex(struct adapter *padapter,
struct ndis_802_11_ssid *pssid, u8 *da,
int try_cnt, int wait_ms)
@@ -716,7 +710,7 @@ static int issue_probereq_ex(struct adapter *padapter,
u32 start = jiffies;
do {
- ret = _issue_probereq(padapter, pssid, da, wait_ms > 0 ? true : false);
+ ret = issue_probereq(padapter, pssid, da, wait_ms > 0 ? true : false);
i++;
@@ -2029,24 +2023,28 @@ static void site_survey(struct adapter *padapter)
for (i = 0; i < RTW_SSID_SCAN_AMOUNT; i++) {
if (pmlmeext->sitesurvey_res.ssid[i].SsidLength) {
/* todo: to issue two probe req??? */
- issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL);
+ issue_probereq(padapter,
+ &(pmlmeext->sitesurvey_res.ssid[i]),
+ NULL, false);
/* msleep(SURVEY_TO>>1); */
- issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL);
+ issue_probereq(padapter,
+ &(pmlmeext->sitesurvey_res.ssid[i]),
+ NULL, false);
}
}
if (pmlmeext->sitesurvey_res.scan_mode == SCAN_ACTIVE) {
/* todo: to issue two probe req??? */
- issue_probereq(padapter, NULL, NULL);
+ issue_probereq(padapter, NULL, NULL, false);
/* msleep(SURVEY_TO>>1); */
- issue_probereq(padapter, NULL, NULL);
+ issue_probereq(padapter, NULL, NULL, false);
}
if (pmlmeext->sitesurvey_res.scan_mode == SCAN_ACTIVE) {
/* todo: to issue two probe req??? */
- issue_probereq(padapter, NULL, NULL);
+ issue_probereq(padapter, NULL, NULL, false);
/* msleep(SURVEY_TO>>1); */
- issue_probereq(padapter, NULL, NULL);
+ issue_probereq(padapter, NULL, NULL, false);
}
}
@@ -4820,9 +4818,18 @@ void linked_status_chk(struct adapter *padapter)
} else {
if (rx_chk != _SUCCESS) {
if (pmlmeext->retry == 0) {
- issue_probereq(padapter, &pmlmeinfo->network.Ssid, pmlmeinfo->network.MacAddress);
- issue_probereq(padapter, &pmlmeinfo->network.Ssid, pmlmeinfo->network.MacAddress);
- issue_probereq(padapter, &pmlmeinfo->network.Ssid, pmlmeinfo->network.MacAddress);
+ issue_probereq(padapter,
+ &pmlmeinfo->network.Ssid,
+ pmlmeinfo->network.MacAddress,
+ false);
+ issue_probereq(padapter,
+ &pmlmeinfo->network.Ssid,
+ pmlmeinfo->network.MacAddress,
+ false);
+ issue_probereq(padapter,
+ &pmlmeinfo->network.Ssid,
+ pmlmeinfo->network.MacAddress,
+ false);
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH v2 3/3] staging: rtl8188eu: core: Remove wrapper function
2015-10-29 6:22 ` [PATCH v2 3/3] staging: rtl8188eu: core: Remove wrapper function Amitoj Kaur Chawla
@ 2015-10-29 10:40 ` Sudip Mukherjee
2015-10-29 10:53 ` Amitoj Kaur Chawla
0 siblings, 1 reply; 6+ messages in thread
From: Sudip Mukherjee @ 2015-10-29 10:40 UTC (permalink / raw)
To: Amitoj Kaur Chawla; +Cc: outreachy-kernel
On Thu, Oct 29, 2015 at 11:52:35AM +0530, Amitoj Kaur Chawla wrote:
> Remove wrapper function issue_probereq() that can be replaced by a
> single line of code and rename _issue_probereq() to issue_probereq().
>
> This patch also fixes line over 80 characters checkpatch.pl warning.
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> ---
> Changes in v2:
> -Renamed _issue_probereq() to issue_probereq()
>
> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 41 ++++++++++++++++-----------
> 1 file changed, 24 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> index 0270755..d3b92c5 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> @@ -608,7 +608,7 @@ static void issue_probersp(struct adapter *padapter, unsigned char *da)
> return;
> }
>
> -static int _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da, int wait_ack)
> +static int issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da, int wait_ack)
Not related to your patch. But maybe in a later patch you can change
int wait_ack to bool wait_ack, as it is only taking true and false as
its argument.
regards
sudip
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH v2 3/3] staging: rtl8188eu: core: Remove wrapper function
2015-10-29 10:40 ` [Outreachy kernel] " Sudip Mukherjee
@ 2015-10-29 10:53 ` Amitoj Kaur Chawla
0 siblings, 0 replies; 6+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-29 10:53 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: outreachy-kernel
On Thu, Oct 29, 2015 at 4:10 PM, Sudip Mukherjee
<sudipm.mukherjee@gmail.com> wrote:
> On Thu, Oct 29, 2015 at 11:52:35AM +0530, Amitoj Kaur Chawla wrote:
>> Remove wrapper function issue_probereq() that can be replaced by a
>> single line of code and rename _issue_probereq() to issue_probereq().
>>
>> This patch also fixes line over 80 characters checkpatch.pl warning.
>>
>> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
>> ---
>> Changes in v2:
>> -Renamed _issue_probereq() to issue_probereq()
>>
>> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 41 ++++++++++++++++-----------
>> 1 file changed, 24 insertions(+), 17 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
>> index 0270755..d3b92c5 100644
>> --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
>> +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
>> @@ -608,7 +608,7 @@ static void issue_probersp(struct adapter *padapter, unsigned char *da)
>> return;
>> }
>>
>> -static int _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da, int wait_ack)
>> +static int issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da, int wait_ack)
>
> Not related to your patch. But maybe in a later patch you can change
> int wait_ack to bool wait_ack, as it is only taking true and false as
> its argument.
>
> regards
> sudip
Okay, I'll send that as a separate patch.
--
Amitoj
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-29 10:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-29 6:15 [PATCH v2 0/3] staging: rtl8188eu: Remove unnecessary functions Amitoj Kaur Chawla
2015-10-29 6:17 ` [PATCH v2 1/3] staging: rtl8188eu: core: rtw_ap : " Amitoj Kaur Chawla
2015-10-29 6:18 ` [PATCH v2 2/3] staging: rtl8188eu: Remove unused function Amitoj Kaur Chawla
2015-10-29 6:22 ` [PATCH v2 3/3] staging: rtl8188eu: core: Remove wrapper function Amitoj Kaur Chawla
2015-10-29 10:40 ` [Outreachy kernel] " Sudip Mukherjee
2015-10-29 10:53 ` Amitoj Kaur Chawla
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.