we don't need to test available channels befor we run a driver test
@@ -7829,7 +7829,6 @@ if(showinterfaceflag == true)
return EXIT_SUCCESS;
}
-cpa = 0;
if(sl == 1)
{
while(channelscanlist1[cpa] != 0)
@@ -7984,12 +7983,6 @@ if(showchannelsflag == true)
globalclose();
}
-if(testscanlist() == false)
- {
- errorcount++;
- globalclose();
- }
-
if(checkdriverflag == true)
{
cpa = 0;
@@ -7999,6 +7992,12 @@ if(checkdriverflag == true)
return EXIT_SUCCESS;
}
+if(testscanlist() == false)
+ {
+ errorcount++;
+ globalclose();
+ }
+
if(pcapngoutname != NULL)
{
fd_pcapng = hcxcreatepcapngdump(pcapngoutname, mac_orig, interfacename, mac_myap, myrc, myanonce, mac_myclient, mysnonce, weakcandidatelen, weakcandidate);
