diff options
author | Andrey Shevchenko <ashevchenko@quantenna.com> | 2018-05-29 15:00:03 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-05-30 22:20:13 +0300 |
commit | f5d2ff43b9ed9f56e7ff67640aa593fcb8fa56c1 (patch) | |
tree | e598adacbe3a09a587e1fd58af36ae3ce1340137 /drivers/net/wireless/quantenna/qtnfmac/commands.c | |
parent | b60769e2dff0b168dfe3f03fe0d1950963c3c3da (diff) | |
download | blackbird-op-linux-f5d2ff43b9ed9f56e7ff67640aa593fcb8fa56c1.tar.gz blackbird-op-linux-f5d2ff43b9ed9f56e7ff67640aa593fcb8fa56c1.zip |
qtnfmac: fix bg_scan_period parameter processing
Do not process bg_scan_period parameter in qtnfmac driver.
Pass correct values as is. In the case of invalid values
pass default value. Leave further processing to firmware.
Signed-off-by: Andrey Shevchenko <ashevchenko@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/quantenna/qtnfmac/commands.c')
-rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/commands.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index e2fc57be1cdd..5eb143667539 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -2339,13 +2339,11 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, else eth_zero_addr(cmd->prev_bssid); - if ((sme->bg_scan_period > 0) && - (sme->bg_scan_period <= QTNF_MAX_BG_SCAN_PERIOD)) + if ((sme->bg_scan_period >= 0) && + (sme->bg_scan_period <= SHRT_MAX)) cmd->bg_scan_period = cpu_to_le16(sme->bg_scan_period); - else if (sme->bg_scan_period == -1) - cmd->bg_scan_period = cpu_to_le16(QTNF_DEFAULT_BG_SCAN_PERIOD); else - cmd->bg_scan_period = 0; /* disabled */ + cmd->bg_scan_period = cpu_to_le16(-1); /* use default value */ if (sme->flags & ASSOC_REQ_DISABLE_HT) connect_flags |= QLINK_STA_CONNECT_DISABLE_HT; |