Skip to content

Commit 9d54619

Browse files
Souptick JoarderKalle Valo
authored andcommitted
rtlwifi: Replace hardcode value with macro
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 <[email protected]> Acked-by: Larry Finger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent e7ece05 commit 9d54619

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

drivers/net/wireless/realtek/rtlwifi/base.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,8 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
426426
hw->extra_tx_headroom = RTL_TX_HEADER_SIZE;
427427

428428
/* TODO: Correct this value for our hw */
429-
/* TODO: define these hard code value */
430-
hw->max_listen_interval = 10;
431-
hw->max_rate_tries = 4;
429+
hw->max_listen_interval = MAX_LISTEN_INTERVAL;
430+
hw->max_rate_tries = MAX_RATE_TRIES;
432431
/* hw->max_rates = 1; */
433432
hw->sta_data_size = sizeof(struct rtl_sta_info);
434433

drivers/net/wireless/realtek/rtlwifi/base.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ enum ap_peer {
6565
#define FRAME_OFFSET_ADDRESS3 16
6666
#define FRAME_OFFSET_SEQUENCE 22
6767
#define FRAME_OFFSET_ADDRESS4 24
68+
#define MAX_LISTEN_INTERVAL 10
69+
#define MAX_RATE_TRIES 4
6870

6971
#define SET_80211_HDR_FRAME_CONTROL(_hdr, _val) \
7072
WRITEEF2BYTE(_hdr, _val)

0 commit comments

Comments
 (0)