* [PATCH v4] rtlwifi: Replace hardcode value with macro
@ 2017-08-02 11:59 Souptick Joarder
2017-08-02 12:10 ` Arend van Spriel
0 siblings, 1 reply; 7+ messages in thread
From: Souptick Joarder @ 2017-08-02 11:59 UTC (permalink / raw)
To: kvalo, Larry.Finger; +Cc: linux-wireless
In _rtl_init_mac80211(), hardcoded value for hw->max_listen_interval
and hw->max_rate_tries are replaced by macro and removed the comment.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
drivers/net/wireless/realtek/rtlwifi/base.c | 5 ++---
drivers/net/wireless/realtek/rtlwifi/base.h | 2 ++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
index 8b833e2..ea18aa7 100644
--- a/drivers/net/wireless/realtek/rtlwifi/base.c
+++ b/drivers/net/wireless/realtek/rtlwifi/base.c
@@ -426,9 +426,8 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
hw->extra_tx_headroom = RTL_TX_HEADER_SIZE;
/* TODO: Correct this value for our hw */
- /* TODO: define these hard code value */
- hw->max_listen_interval = 10;
- hw->max_rate_tries = 4;
+ hw->max_listen_interval = MAX_LISTEN_INTERVAL;
+ hw->max_rate_tries = MAX_RATE_TRIES;
/* hw->max_rates = 1; */
hw->sta_data_size = sizeof(struct rtl_sta_info);
diff --git a/drivers/net/wireless/realtek/rtlwifi/base.h b/drivers/net/wireless/realtek/rtlwifi/base.h
index ab7d819..c591d75 100644
--- a/drivers/net/wireless/realtek/rtlwifi/base.h
+++ b/drivers/net/wireless/realtek/rtlwifi/base.h
@@ -65,6 +65,8 @@ enum ap_peer {
#define FRAME_OFFSET_ADDRESS3 16
#define FRAME_OFFSET_SEQUENCE 22
#define FRAME_OFFSET_ADDRESS4 24
+#define MAX_LISTEN_INTERVAL 10
+#define MAX_RATE_TRIES 4
#define SET_80211_HDR_FRAME_CONTROL(_hdr, _val) \
WRITEEF2BYTE(_hdr, _val)
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v4] rtlwifi: Replace hardcode value with macro
2017-08-02 11:59 [PATCH v4] rtlwifi: Replace hardcode value with macro Souptick Joarder
@ 2017-08-02 12:10 ` Arend van Spriel
0 siblings, 0 replies; 7+ messages in thread
From: Arend van Spriel @ 2017-08-02 12:10 UTC (permalink / raw)
To: Souptick Joarder; +Cc: kvalo, Larry.Finger, linux-wireless
On 8/2/2017 1:59 PM, Souptick Joarder wrote:
> In _rtl_init_mac80211(), hardcoded value for hw->max_listen_interval
> and hw->max_rate_tries are replaced by macro and removed the comment.
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
> drivers/net/wireless/realtek/rtlwifi/base.c | 5 ++---
> drivers/net/wireless/realtek/rtlwifi/base.h | 2 ++
> 2 files changed, 4 insertions(+), 3 deletions(-)
[...]
> diff --git a/drivers/net/wireless/realtek/rtlwifi/base.h b/drivers/net/wireless/realtek/rtlwifi/base.h
> index ab7d819..c591d75 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/base.h
> +++ b/drivers/net/wireless/realtek/rtlwifi/base.h
> @@ -65,6 +65,8 @@ enum ap_peer {
> #define FRAME_OFFSET_ADDRESS3 16
> #define FRAME_OFFSET_SEQUENCE 22
> #define FRAME_OFFSET_ADDRESS4 24
> +#define MAX_LISTEN_INTERVAL 10
> +#define MAX_RATE_TRIES 4
It is not so nice to mix tabs and spaces like that. Better adhere to the
existing convention.
Regards,
Arend
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4] rtlwifi: Replace hardcode value with macro
2017-08-02 10:47 ` Souptick Joarder
@ 2017-08-02 10:50 ` Arend van Spriel
0 siblings, 0 replies; 7+ messages in thread
From: Arend van Spriel @ 2017-08-02 10:50 UTC (permalink / raw)
To: Souptick Joarder; +Cc: Kalle Valo, Larry Finger, linux-wireless
On 8/2/2017 12:47 PM, Souptick Joarder wrote:
> Hi Kalle,
>
> On Wed, Aug 2, 2017 at 2:51 PM, Kalle Valo <kvalo@codeaurora.org> wrote:
>> Larry Finger <Larry.Finger@lwfinger.net> writes:
>>
>>> On 07/31/2017 06:14 AM, Souptick Joarder wrote:
>>>> In _rtl_init_mac80211(), hardcoded value for hw->max_listen_interval
>>>> and hw->max_rate_tries are replaced by macro.
>>>
>>> That is NOT what your patch does. It only removes a comment! Granted,
>>> that comment is useless and should come out, but your commit message
>>> must be a little more accurate.
>>
>> Actually the patch does not even apply, I suspect that Souptick
>> incorrectly used v3 of his patch as the baseline for v4. Instead this v4
>> should be folded with v3.
>
> Do you mean I should address your comment in v3 and send v3 again
> instead of v4 ?
Your v4 patch should apply on top of wireless-drivers-next/master as is.
Regards,
Arend
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4] rtlwifi: Replace hardcode value with macro
2017-08-02 9:21 ` Kalle Valo
@ 2017-08-02 10:47 ` Souptick Joarder
2017-08-02 10:50 ` Arend van Spriel
0 siblings, 1 reply; 7+ messages in thread
From: Souptick Joarder @ 2017-08-02 10:47 UTC (permalink / raw)
To: Kalle Valo; +Cc: Larry Finger, linux-wireless
Hi Kalle,
On Wed, Aug 2, 2017 at 2:51 PM, Kalle Valo <kvalo@codeaurora.org> wrote:
> Larry Finger <Larry.Finger@lwfinger.net> writes:
>
>> On 07/31/2017 06:14 AM, Souptick Joarder wrote:
>>> In _rtl_init_mac80211(), hardcoded value for hw->max_listen_interval
>>> and hw->max_rate_tries are replaced by macro.
>>
>> That is NOT what your patch does. It only removes a comment! Granted,
>> that comment is useless and should come out, but your commit message
>> must be a little more accurate.
>
> Actually the patch does not even apply, I suspect that Souptick
> incorrectly used v3 of his patch as the baseline for v4. Instead this v4
> should be folded with v3.
Do you mean I should address your comment in v3 and send v3 again
instead of v4 ?
>
> --
> Kalle Valo
-Souptick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4] rtlwifi: Replace hardcode value with macro
2017-07-31 14:18 ` Larry Finger
@ 2017-08-02 9:21 ` Kalle Valo
2017-08-02 10:47 ` Souptick Joarder
0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2017-08-02 9:21 UTC (permalink / raw)
To: Larry Finger; +Cc: Souptick Joarder, linux-wireless
Larry Finger <Larry.Finger@lwfinger.net> writes:
> On 07/31/2017 06:14 AM, Souptick Joarder wrote:
>> In _rtl_init_mac80211(), hardcoded value for hw->max_listen_interval
>> and hw->max_rate_tries are replaced by macro.
>
> That is NOT what your patch does. It only removes a comment! Granted,
> that comment is useless and should come out, but your commit message
> must be a little more accurate.
Actually the patch does not even apply, I suspect that Souptick
incorrectly used v3 of his patch as the baseline for v4. Instead this v4
should be folded with v3.
--
Kalle Valo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4] rtlwifi: Replace hardcode value with macro
2017-07-31 11:14 Souptick Joarder
@ 2017-07-31 14:18 ` Larry Finger
2017-08-02 9:21 ` Kalle Valo
0 siblings, 1 reply; 7+ messages in thread
From: Larry Finger @ 2017-07-31 14:18 UTC (permalink / raw)
To: Souptick Joarder, kvalo; +Cc: linux-wireless
On 07/31/2017 06:14 AM, Souptick Joarder wrote:
> In _rtl_init_mac80211(), hardcoded value for hw->max_listen_interval
> and hw->max_rate_tries are replaced by macro.
That is NOT what your patch does. It only removes a comment! Granted, that
comment is useless and should come out, but your commit message must be a little
more accurate.
NACK.
Larry
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
> drivers/net/wireless/realtek/rtlwifi/base.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
> index f45d093..52f2d0b 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/base.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/base.c
> @@ -422,7 +422,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
> hw->extra_tx_headroom = RTL_TX_HEADER_SIZE;
>
> /* TODO: Correct this value for our hw */
> - /* defined these hard code values */
> hw->max_listen_interval = MAX_LISTEN_INTERVAL;
> hw->max_rate_tries = MAX_RATE_TRIES;
> /* hw->max_rates = 1; */
> --
> 1.9.1
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4] rtlwifi: Replace hardcode value with macro
@ 2017-07-31 11:14 Souptick Joarder
2017-07-31 14:18 ` Larry Finger
0 siblings, 1 reply; 7+ messages in thread
From: Souptick Joarder @ 2017-07-31 11:14 UTC (permalink / raw)
To: kvalo, Larry.Finger; +Cc: linux-wireless
In _rtl_init_mac80211(), hardcoded value for hw->max_listen_interval
and hw->max_rate_tries are replaced by macro.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
drivers/net/wireless/realtek/rtlwifi/base.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
index f45d093..52f2d0b 100644
--- a/drivers/net/wireless/realtek/rtlwifi/base.c
+++ b/drivers/net/wireless/realtek/rtlwifi/base.c
@@ -422,7 +422,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
hw->extra_tx_headroom = RTL_TX_HEADER_SIZE;
/* TODO: Correct this value for our hw */
- /* defined these hard code values */
hw->max_listen_interval = MAX_LISTEN_INTERVAL;
hw->max_rate_tries = MAX_RATE_TRIES;
/* hw->max_rates = 1; */
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-08-02 12:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-02 11:59 [PATCH v4] rtlwifi: Replace hardcode value with macro Souptick Joarder
2017-08-02 12:10 ` Arend van Spriel
-- strict thread matches above, loose matches on Subject: below --
2017-07-31 11:14 Souptick Joarder
2017-07-31 14:18 ` Larry Finger
2017-08-02 9:21 ` Kalle Valo
2017-08-02 10:47 ` Souptick Joarder
2017-08-02 10:50 ` Arend van Spriel
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).