7
7
*
8
8
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
9
9
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
10
+ * Copyright(c) 2016 Intel Deutschland GmbH
10
11
*
11
12
* This program is free software; you can redistribute it and/or modify
12
13
* it under the terms of version 2 of the GNU General Public License as
33
34
*
34
35
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
35
36
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
37
+ * Copyright(c) 2016 Intel Deutschland GmbH
36
38
* All rights reserved.
37
39
*
38
40
* Redistribution and use in source and binary forms, with or without
@@ -297,6 +299,12 @@ void iwl_mvm_rx_lmac_scan_iter_complete_notif(struct iwl_mvm *mvm,
297
299
iwl_mvm_dump_channel_list (notif -> results ,
298
300
notif -> scanned_channels , buf ,
299
301
sizeof (buf )));
302
+
303
+ if (mvm -> sched_scan_pass_all == SCHED_SCAN_PASS_ALL_FOUND ) {
304
+ IWL_DEBUG_SCAN (mvm , "Pass all scheduled scan results found\n" );
305
+ ieee80211_sched_scan_results (mvm -> hw );
306
+ mvm -> sched_scan_pass_all = SCHED_SCAN_PASS_ALL_ENABLED ;
307
+ }
300
308
}
301
309
302
310
void iwl_mvm_rx_scan_match_found (struct iwl_mvm * mvm ,
@@ -380,6 +388,7 @@ void iwl_mvm_rx_lmac_scan_complete_notif(struct iwl_mvm *mvm,
380
388
381
389
mvm -> scan_status &= ~IWL_MVM_SCAN_SCHED ;
382
390
ieee80211_sched_scan_stopped (mvm -> hw );
391
+ mvm -> sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED ;
383
392
} else if (mvm -> scan_status & IWL_MVM_SCAN_REGULAR ) {
384
393
IWL_DEBUG_SCAN (mvm , "Regular scan %s, EBS status %s (FW)\n" ,
385
394
aborted ? "aborted" : "completed" ,
@@ -533,10 +542,13 @@ static bool iwl_mvm_scan_pass_all(struct iwl_mvm *mvm,
533
542
IWL_DEBUG_SCAN (mvm ,
534
543
"Sending scheduled scan with filtering, n_match_sets %d\n" ,
535
544
req -> n_match_sets );
545
+ mvm -> sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED ;
536
546
return false;
537
547
}
538
548
539
549
IWL_DEBUG_SCAN (mvm , "Sending Scheduled scan without filtering\n" );
550
+
551
+ mvm -> sched_scan_pass_all = SCHED_SCAN_PASS_ALL_ENABLED ;
540
552
return true;
541
553
}
542
554
@@ -788,6 +800,9 @@ static int iwl_mvm_scan_lmac_flags(struct iwl_mvm *mvm,
788
800
flags |= IWL_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE ;
789
801
#endif
790
802
803
+ if (mvm -> sched_scan_pass_all == SCHED_SCAN_PASS_ALL_ENABLED )
804
+ flags |= IWL_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE ;
805
+
791
806
if (iwl_mvm_is_regular_scan (params ) &&
792
807
vif -> type != NL80211_IFTYPE_P2P_DEVICE &&
793
808
params -> type != IWL_SCAN_TYPE_FRAGMENTED )
@@ -1074,6 +1089,9 @@ static u32 iwl_mvm_scan_umac_flags(struct iwl_mvm *mvm,
1074
1089
flags |= IWL_UMAC_SCAN_GEN_FLAGS_ITER_COMPLETE ;
1075
1090
#endif
1076
1091
1092
+ if (mvm -> sched_scan_pass_all == SCHED_SCAN_PASS_ALL_ENABLED )
1093
+ flags |= IWL_UMAC_SCAN_GEN_FLAGS_ITER_COMPLETE ;
1094
+
1077
1095
if (iwl_mvm_is_regular_scan (params ) &&
1078
1096
vif -> type != NL80211_IFTYPE_P2P_DEVICE &&
1079
1097
params -> type != IWL_SCAN_TYPE_FRAGMENTED )
@@ -1301,10 +1319,6 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
1301
1319
return - EBUSY ;
1302
1320
}
1303
1321
1304
- /* we don't support "match all" in the firmware */
1305
- if (!req -> n_match_sets )
1306
- return - EOPNOTSUPP ;
1307
-
1308
1322
ret = iwl_mvm_check_running_scans (mvm , type );
1309
1323
if (ret )
1310
1324
return ret ;
@@ -1400,6 +1414,7 @@ void iwl_mvm_rx_umac_scan_complete_notif(struct iwl_mvm *mvm,
1400
1414
iwl_mvm_unref (mvm , IWL_MVM_REF_SCAN );
1401
1415
} else if (mvm -> scan_uid_status [uid ] == IWL_MVM_SCAN_SCHED ) {
1402
1416
ieee80211_sched_scan_stopped (mvm -> hw );
1417
+ mvm -> sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED ;
1403
1418
}
1404
1419
1405
1420
mvm -> scan_status &= ~mvm -> scan_uid_status [uid ];
@@ -1434,6 +1449,12 @@ void iwl_mvm_rx_umac_scan_iter_complete_notif(struct iwl_mvm *mvm,
1434
1449
iwl_mvm_dump_channel_list (notif -> results ,
1435
1450
notif -> scanned_channels , buf ,
1436
1451
sizeof (buf )));
1452
+
1453
+ if (mvm -> sched_scan_pass_all == SCHED_SCAN_PASS_ALL_FOUND ) {
1454
+ IWL_DEBUG_SCAN (mvm , "Pass all scheduled scan results found\n" );
1455
+ ieee80211_sched_scan_results (mvm -> hw );
1456
+ mvm -> sched_scan_pass_all = SCHED_SCAN_PASS_ALL_ENABLED ;
1457
+ }
1437
1458
}
1438
1459
1439
1460
static int iwl_mvm_umac_scan_abort (struct iwl_mvm * mvm , int type )
@@ -1528,6 +1549,7 @@ void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm)
1528
1549
uid = iwl_mvm_scan_uid_by_status (mvm , IWL_MVM_SCAN_SCHED );
1529
1550
if (uid >= 0 && !mvm -> restart_fw ) {
1530
1551
ieee80211_sched_scan_stopped (mvm -> hw );
1552
+ mvm -> sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED ;
1531
1553
mvm -> scan_uid_status [uid ] = 0 ;
1532
1554
}
1533
1555
@@ -1549,8 +1571,11 @@ void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm)
1549
1571
* restart_hw, so do not report if FW is about to be
1550
1572
* restarted.
1551
1573
*/
1552
- if ((mvm -> scan_status & IWL_MVM_SCAN_SCHED ) && !mvm -> restart_fw )
1574
+ if ((mvm -> scan_status & IWL_MVM_SCAN_SCHED ) &&
1575
+ !mvm -> restart_fw ) {
1553
1576
ieee80211_sched_scan_stopped (mvm -> hw );
1577
+ mvm -> sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED ;
1578
+ }
1554
1579
}
1555
1580
}
1556
1581
@@ -1586,6 +1611,7 @@ int iwl_mvm_scan_stop(struct iwl_mvm *mvm, int type, bool notify)
1586
1611
ieee80211_scan_completed (mvm -> hw , true);
1587
1612
} else if (notify ) {
1588
1613
ieee80211_sched_scan_stopped (mvm -> hw );
1614
+ mvm -> sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED ;
1589
1615
}
1590
1616
1591
1617
return ret ;
0 commit comments