@@ -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;
@@ -44,8 +44,6 @@
#define QTNF_MAX_VSIE_LEN 255
#define QTNF_MAX_INTF 8
#define QTNF_MAX_EVENT_QUEUE_LEN 255
-#define QTNF_DEFAULT_BG_SCAN_PERIOD 300
-#define QTNF_MAX_BG_SCAN_PERIOD 0xffff
#define QTNF_SCAN_TIMEOUT_SEC 15
#define QTNF_DEF_BSS_PRIORITY 0