-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwifi_scanner_linux.cpp
More file actions
654 lines (547 loc) · 19.8 KB
/
Copy pathwifi_scanner_linux.cpp
File metadata and controls
654 lines (547 loc) · 19.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
#include "wifi_scanner_backend.h"
#include <linux/nl80211.h>
#include <netlink/attr.h>
#include <netlink/genl/genl.h>
#include <netlink/genl/ctrl.h>
#include <netlink/msg.h>
#include <netlink/socket.h>
#include <QDateTime>
#include <QProcess>
#include <QSet>
#include <QThread>
#include <poll.h>
#include <cstdint>
#include <utility>
namespace {
struct NlContext
{
nl_sock *socket = nullptr;
int familyId = -1;
};
struct WirelessInterface
{
int index = -1;
QString name;
};
struct InterfaceDumpContext
{
QVector<WirelessInterface> interfaces;
};
struct ScanWaitContext
{
bool completed = false;
bool aborted = false;
};
struct WiphyDumpContext
{
BandSupport support;
};
struct ScanDumpContext
{
QVector<WiFiNetwork> networks;
QSet<QString> seenBssids;
};
int handleNetlinkError(sockaddr_nl *, nlmsgerr *err, void *arg)
{
*static_cast<int *>(arg) = err->error;
return NL_STOP;
}
int handleNetlinkAck(nl_msg *, void *arg)
{
*static_cast<int *>(arg) = 0;
return NL_STOP;
}
int handleNetlinkFinish(nl_msg *, void *arg)
{
*static_cast<int *>(arg) = 0;
return NL_SKIP;
}
int ignoreValidMessage(nl_msg *, void *)
{
return NL_SKIP;
}
int executeNetlinkRequest(
nl_sock *socket,
nl_msg *message,
nl_recvmsg_msg_cb_t validHandler,
void *validHandlerData,
QString *errorMessage)
{
nl_cb *callbacks = nl_cb_alloc(NL_CB_DEFAULT);
if (callbacks == nullptr) {
nlmsg_free(message);
if (errorMessage != nullptr) {
*errorMessage = "Failed to allocate libnl callbacks.";
}
return -NLE_NOMEM;
}
int status = 1;
nl_cb_set(callbacks, NL_CB_VALID, NL_CB_CUSTOM, validHandler, validHandlerData);
nl_cb_err(callbacks, NL_CB_CUSTOM, handleNetlinkError, &status);
nl_cb_set(callbacks, NL_CB_FINISH, NL_CB_CUSTOM, handleNetlinkFinish, &status);
nl_cb_set(callbacks, NL_CB_ACK, NL_CB_CUSTOM, handleNetlinkAck, &status);
const int sendStatus = nl_send_auto(socket, message);
if (sendStatus < 0) {
if (errorMessage != nullptr) {
*errorMessage = QString("Failed to send nl80211 request: %1").arg(nl_geterror(sendStatus));
}
nl_cb_put(callbacks);
nlmsg_free(message);
return sendStatus;
}
while (status > 0) {
const int receiveStatus = nl_recvmsgs(socket, callbacks);
if (receiveStatus < 0) {
status = receiveStatus;
break;
}
}
if (status < 0 && errorMessage != nullptr) {
*errorMessage = QString("nl80211 request failed: %1").arg(nl_geterror(status));
}
nl_cb_put(callbacks);
nlmsg_free(message);
return status;
}
bool openNetlinkContext(NlContext *context, QString *errorMessage)
{
context->socket = nl_socket_alloc();
if (context->socket == nullptr) {
if (errorMessage != nullptr) {
*errorMessage = "Failed to allocate libnl socket.";
}
return false;
}
const int connectStatus = genl_connect(context->socket);
if (connectStatus < 0) {
if (errorMessage != nullptr) {
*errorMessage = QString("Failed to connect to generic netlink: %1").arg(nl_geterror(connectStatus));
}
nl_socket_free(context->socket);
context->socket = nullptr;
return false;
}
context->familyId = genl_ctrl_resolve(context->socket, NL80211_GENL_NAME);
if (context->familyId < 0) {
if (errorMessage != nullptr) {
*errorMessage = QString("Failed to resolve nl80211 family: %1").arg(nl_geterror(context->familyId));
}
nl_socket_free(context->socket);
context->socket = nullptr;
return false;
}
return true;
}
void closeNetlinkContext(NlContext *context)
{
if (context->socket != nullptr) {
nl_socket_free(context->socket);
context->socket = nullptr;
}
}
WiFiBand bandFromFrequency(int frequencyMHz)
{
if (frequencyMHz >= 5925) {
return WiFiBand::Band6;
}
if (frequencyMHz >= 5000) {
return WiFiBand::Band5;
}
return WiFiBand::Band24;
}
int channelFromFrequency(int frequencyMHz)
{
if (frequencyMHz == 2484) {
return 14;
}
if (frequencyMHz >= 2412 && frequencyMHz <= 2472) {
return (frequencyMHz - 2407) / 5;
}
if (frequencyMHz >= 5000 && frequencyMHz <= 5895) {
return (frequencyMHz - 5000) / 5;
}
if (frequencyMHz >= 5955) {
return (frequencyMHz - 5950) / 5;
}
return 0;
}
QString parseSsidFromInformationElements(const uint8_t *data, int length)
{
int offset = 0;
while (offset + 2 <= length) {
const uint8_t elementId = data[offset];
const int elementLength = data[offset + 1];
offset += 2;
if (offset + elementLength > length) {
break;
}
if (elementId == 0) {
return QString::fromUtf8(reinterpret_cast<const char *>(data + offset), elementLength);
}
offset += elementLength;
}
return QString();
}
int signalDbmFromAttributes(const nlattr *signalMbmAttr, const nlattr *signalUnspecAttr)
{
if (signalMbmAttr != nullptr) {
const auto milliBelMillwatt = static_cast<int32_t>(nla_get_u32(signalMbmAttr));
return milliBelMillwatt / 100;
}
if (signalUnspecAttr != nullptr) {
const int signalPercent = nla_get_u8(signalUnspecAttr);
return -100 + qBound(0, signalPercent, 100) / 2;
}
return -100;
}
int interfaceDumpCallback(nl_msg *message, void *arg)
{
auto *context = static_cast<InterfaceDumpContext *>(arg);
nlmsghdr *header = nlmsg_hdr(message);
genlmsghdr *genlHeader = static_cast<genlmsghdr *>(nlmsg_data(header));
nlattr *attributes[NL80211_ATTR_MAX + 1] = {};
nla_parse(attributes, NL80211_ATTR_MAX, genlmsg_attrdata(genlHeader, 0), genlmsg_attrlen(genlHeader, 0), nullptr);
if (attributes[NL80211_ATTR_IFINDEX] == nullptr) {
return NL_SKIP;
}
const int interfaceIndex = nla_get_u32(attributes[NL80211_ATTR_IFINDEX]);
for (const WirelessInterface &iface : std::as_const(context->interfaces)) {
if (iface.index == interfaceIndex) {
return NL_SKIP;
}
}
WirelessInterface iface;
iface.index = interfaceIndex;
if (attributes[NL80211_ATTR_IFNAME] != nullptr) {
iface.name = QString::fromUtf8(static_cast<const char *>(nla_data(attributes[NL80211_ATTR_IFNAME])));
}
context->interfaces.append(iface);
return NL_SKIP;
}
int wiphyDumpCallback(nl_msg *message, void *arg)
{
auto *context = static_cast<WiphyDumpContext *>(arg);
nlmsghdr *header = nlmsg_hdr(message);
genlmsghdr *genlHeader = static_cast<genlmsghdr *>(nlmsg_data(header));
nlattr *attributes[NL80211_ATTR_MAX + 1] = {};
nla_parse(attributes, NL80211_ATTR_MAX, genlmsg_attrdata(genlHeader, 0), genlmsg_attrlen(genlHeader, 0), nullptr);
if (attributes[NL80211_ATTR_WIPHY_BANDS] == nullptr) {
return NL_SKIP;
}
nlattr *bandAttr = nullptr;
int bandRemaining = 0;
nla_for_each_nested(bandAttr, attributes[NL80211_ATTR_WIPHY_BANDS], bandRemaining) {
nlattr *bandInfo[NL80211_BAND_ATTR_MAX + 1] = {};
nla_parse(bandInfo, NL80211_BAND_ATTR_MAX, static_cast<nlattr *>(nla_data(bandAttr)), nla_len(bandAttr), nullptr);
if (bandInfo[NL80211_BAND_ATTR_FREQS] == nullptr) {
continue;
}
nlattr *frequencyAttr = nullptr;
int frequencyRemaining = 0;
nla_for_each_nested(frequencyAttr, bandInfo[NL80211_BAND_ATTR_FREQS], frequencyRemaining) {
nlattr *frequencyInfo[NL80211_FREQUENCY_ATTR_MAX + 1] = {};
nla_parse(
frequencyInfo,
NL80211_FREQUENCY_ATTR_MAX,
static_cast<nlattr *>(nla_data(frequencyAttr)),
nla_len(frequencyAttr),
nullptr);
if (frequencyInfo[NL80211_FREQUENCY_ATTR_FREQ] == nullptr) {
continue;
}
const int frequencyMHz = nla_get_u32(frequencyInfo[NL80211_FREQUENCY_ATTR_FREQ]);
if (frequencyMHz >= 2400 && frequencyMHz <= 2500) {
context->support.has24GHz = true;
} else if (frequencyMHz >= 5000 && frequencyMHz < 5925) {
context->support.has5GHz = true;
} else if (frequencyMHz >= 5925) {
context->support.has6GHz = true;
}
}
}
return NL_SKIP;
}
int scanDumpCallback(nl_msg *message, void *arg)
{
auto *context = static_cast<ScanDumpContext *>(arg);
nlmsghdr *header = nlmsg_hdr(message);
genlmsghdr *genlHeader = static_cast<genlmsghdr *>(nlmsg_data(header));
nlattr *attributes[NL80211_ATTR_MAX + 1] = {};
nla_parse(attributes, NL80211_ATTR_MAX, genlmsg_attrdata(genlHeader, 0), genlmsg_attrlen(genlHeader, 0), nullptr);
if (attributes[NL80211_ATTR_BSS] == nullptr) {
return NL_SKIP;
}
nlattr *bss[NL80211_BSS_MAX + 1] = {};
nla_parse_nested(bss, NL80211_BSS_MAX, attributes[NL80211_ATTR_BSS], nullptr);
if (bss[NL80211_BSS_BSSID] == nullptr || bss[NL80211_BSS_FREQUENCY] == nullptr) {
return NL_SKIP;
}
const auto *bssid = static_cast<const uint8_t *>(nla_data(bss[NL80211_BSS_BSSID]));
const QString bssidText = QString("%1:%2:%3:%4:%5:%6")
.arg(bssid[0], 2, 16, QChar('0'))
.arg(bssid[1], 2, 16, QChar('0'))
.arg(bssid[2], 2, 16, QChar('0'))
.arg(bssid[3], 2, 16, QChar('0'))
.arg(bssid[4], 2, 16, QChar('0'))
.arg(bssid[5], 2, 16, QChar('0'))
.toUpper();
if (context->seenBssids.contains(bssidText)) {
return NL_SKIP;
}
const int frequencyMHz = nla_get_u32(bss[NL80211_BSS_FREQUENCY]);
const int channel = channelFromFrequency(frequencyMHz);
if (channel <= 0) {
return NL_SKIP;
}
QString ssid;
if (bss[NL80211_BSS_INFORMATION_ELEMENTS] != nullptr) {
ssid = parseSsidFromInformationElements(
static_cast<const uint8_t *>(nla_data(bss[NL80211_BSS_INFORMATION_ELEMENTS])),
nla_len(bss[NL80211_BSS_INFORMATION_ELEMENTS]));
}
if (ssid.isEmpty() && bss[NL80211_BSS_BEACON_IES] != nullptr) {
ssid = parseSsidFromInformationElements(
static_cast<const uint8_t *>(nla_data(bss[NL80211_BSS_BEACON_IES])),
nla_len(bss[NL80211_BSS_BEACON_IES]));
}
if (ssid.isEmpty()) {
ssid = QStringLiteral("<hidden>");
}
WiFiNetwork network;
network.ssid = ssid;
network.bssid = bssidText;
network.frequencyMHz = frequencyMHz;
network.channel = channel;
network.band = bandFromFrequency(frequencyMHz);
network.signalDbm = signalDbmFromAttributes(bss[NL80211_BSS_SIGNAL_MBM], bss[NL80211_BSS_SIGNAL_UNSPEC]);
context->seenBssids.insert(bssidText);
context->networks.append(network);
return NL_SKIP;
}
BandSupport queryBandSupport(NlContext *context, QString *errorMessage)
{
WiphyDumpContext dumpContext;
nl_msg *message = nlmsg_alloc();
if (message == nullptr) {
if (errorMessage != nullptr) {
*errorMessage = "Failed to allocate wiphy query message.";
}
return dumpContext.support;
}
genlmsg_put(message, 0, 0, context->familyId, 0, NLM_F_DUMP, NL80211_CMD_GET_WIPHY, 0);
nla_put_flag(message, NL80211_ATTR_SPLIT_WIPHY_DUMP);
executeNetlinkRequest(context->socket, message, wiphyDumpCallback, &dumpContext, errorMessage);
return dumpContext.support;
}
QVector<WirelessInterface> queryWirelessInterfaces(NlContext *context, QString *errorMessage)
{
InterfaceDumpContext dumpContext;
nl_msg *message = nlmsg_alloc();
if (message == nullptr) {
if (errorMessage != nullptr) {
*errorMessage = "Failed to allocate interface query message.";
}
return {};
}
genlmsg_put(message, 0, 0, context->familyId, 0, NLM_F_DUMP, NL80211_CMD_GET_INTERFACE, 0);
if (executeNetlinkRequest(context->socket, message, interfaceDumpCallback, &dumpContext, errorMessage) < 0) {
return {};
}
return dumpContext.interfaces;
}
QVector<WiFiNetwork> queryScanResults(NlContext *context, const QVector<WirelessInterface> &interfaces, QString *errorMessage)
{
ScanDumpContext dumpContext;
for (const WirelessInterface &iface : interfaces) {
nl_msg *message = nlmsg_alloc();
if (message == nullptr) {
if (errorMessage != nullptr) {
*errorMessage = "Failed to allocate scan query message.";
}
return {};
}
genlmsg_put(message, 0, 0, context->familyId, 0, NLM_F_DUMP, NL80211_CMD_GET_SCAN, 0);
nla_put_u32(message, NL80211_ATTR_IFINDEX, iface.index);
QString requestError;
if (executeNetlinkRequest(context->socket, message, scanDumpCallback, &dumpContext, &requestError) < 0) {
if (errorMessage != nullptr && errorMessage->isEmpty()) {
*errorMessage = requestError;
}
}
}
return dumpContext.networks;
}
bool triggerActiveScan(NlContext *context, const WirelessInterface &iface, QString *errorMessage)
{
nl_msg *message = nlmsg_alloc();
if (message == nullptr) {
if (errorMessage != nullptr) {
*errorMessage = "Failed to allocate active scan message.";
}
return false;
}
genlmsg_put(message, 0, 0, context->familyId, 0, 0, NL80211_CMD_TRIGGER_SCAN, 0);
nla_put_u32(message, NL80211_ATTR_IFINDEX, iface.index);
nlattr *ssidNest = nla_nest_start(message, NL80211_ATTR_SCAN_SSIDS);
if (ssidNest == nullptr) {
nlmsg_free(message);
if (errorMessage != nullptr) {
*errorMessage = "Failed to build scan SSID list.";
}
return false;
}
static const char wildcardSsid[] = "";
nla_put(message, 1, 0, wildcardSsid);
nla_nest_end(message, ssidNest);
return executeNetlinkRequest(context->socket, message, ignoreValidMessage, nullptr, errorMessage) >= 0;
}
int scanEventCallback(nl_msg *message, void *arg)
{
auto *context = static_cast<ScanWaitContext *>(arg);
nlmsghdr *header = nlmsg_hdr(message);
genlmsghdr *genlHeader = static_cast<genlmsghdr *>(nlmsg_data(header));
if (genlHeader->cmd == NL80211_CMD_NEW_SCAN_RESULTS) {
context->completed = true;
return NL_STOP;
}
if (genlHeader->cmd == NL80211_CMD_SCAN_ABORTED) {
context->aborted = true;
return NL_STOP;
}
return NL_SKIP;
}
bool waitForScanCompletion(nl_sock *socket, int timeoutMs)
{
nl_cb *callbacks = nl_cb_alloc(NL_CB_DEFAULT);
if (callbacks == nullptr) {
QThread::msleep(timeoutMs);
return false;
}
ScanWaitContext waitContext;
nl_cb_set(callbacks, NL_CB_VALID, NL_CB_CUSTOM, scanEventCallback, &waitContext);
const qint64 deadline = QDateTime::currentMSecsSinceEpoch() + timeoutMs;
while (!waitContext.completed && !waitContext.aborted) {
const qint64 remaining = deadline - QDateTime::currentMSecsSinceEpoch();
if (remaining <= 0) {
break;
}
pollfd fd = {};
fd.fd = nl_socket_get_fd(socket);
fd.events = POLLIN;
const int pollResult = poll(&fd, 1, static_cast<int>(qMin<qint64>(remaining, 750)));
if (pollResult > 0 && (fd.revents & POLLIN) != 0) {
nl_recvmsgs(socket, callbacks);
}
}
nl_cb_put(callbacks);
return waitContext.completed;
}
bool triggerScanWithNetworkManager(const QVector<WirelessInterface> &interfaces)
{
bool triggered = false;
for (const WirelessInterface &iface : interfaces) {
QStringList arguments = {QStringLiteral("device"), QStringLiteral("wifi"), QStringLiteral("rescan")};
if (!iface.name.isEmpty()) {
arguments << QStringLiteral("ifname") << iface.name;
}
QProcess nmcli;
nmcli.start(QStringLiteral("nmcli"), arguments);
if (nmcli.waitForFinished(7000) && nmcli.exitStatus() == QProcess::NormalExit && nmcli.exitCode() == 0) {
triggered = true;
}
}
return triggered;
}
QString normalizeScanFailureMessage(const QString &message)
{
if (message.contains("Network is down", Qt::CaseInsensitive)
|| message.contains("RF-kill", Qt::CaseInsensitive)
|| message.contains("No wireless interfaces", Qt::CaseInsensitive)) {
return "Wi-Fi appears to be turned off. Turn on Wi-Fi and try again.";
}
return message;
}
bool isWifiOffFailure(const QString &message)
{
return message.contains("Turn on Wi-Fi", Qt::CaseInsensitive)
|| message.contains("Network is down", Qt::CaseInsensitive)
|| message.contains("RF-kill", Qt::CaseInsensitive)
|| message.contains("No wireless interfaces", Qt::CaseInsensitive);
}
bool isRecoverableTriggerFailure(const QString &message)
{
return message.contains("busy", Qt::CaseInsensitive)
|| message.contains("Operation not permitted", Qt::CaseInsensitive)
|| message.contains("Permission denied", Qt::CaseInsensitive)
|| message.contains("Device or resource busy", Qt::CaseInsensitive);
}
WiFiScanOutcome performLinuxWifiScan()
{
WiFiScanOutcome outcome;
QString errorMessage;
NlContext context;
if (!openNetlinkContext(&context, &errorMessage)) {
outcome.errorMessage = errorMessage;
return outcome;
}
const BandSupport support = queryBandSupport(&context, nullptr);
outcome.support = support;
const QVector<WirelessInterface> interfaces = queryWirelessInterfaces(&context, &errorMessage);
if (interfaces.isEmpty()) {
closeNetlinkContext(&context);
if (errorMessage.isEmpty()) {
errorMessage = "No wireless interfaces were exposed by nl80211.";
}
outcome.errorMessage = normalizeScanFailureMessage(errorMessage);
return outcome;
}
const int scanGroupId = genl_ctrl_resolve_grp(context.socket, NL80211_GENL_NAME, "scan");
const bool receivesScanEvents = scanGroupId >= 0 && nl_socket_add_membership(context.socket, scanGroupId) >= 0;
QString triggerError;
bool triggerWorked = false;
for (const WirelessInterface &iface : interfaces) {
QString perInterfaceError;
if (triggerActiveScan(&context, iface, &perInterfaceError)) {
triggerWorked = true;
} else if (triggerError.isEmpty()) {
triggerError = perInterfaceError;
}
}
if (!triggerWorked) {
triggerError = normalizeScanFailureMessage(triggerError);
if (isWifiOffFailure(triggerError)) {
closeNetlinkContext(&context);
outcome.errorMessage = triggerError;
return outcome;
}
triggerWorked = triggerScanWithNetworkManager(interfaces);
}
if (triggerWorked) {
if (!receivesScanEvents || !waitForScanCompletion(context.socket, 8000)) {
QThread::msleep(2500);
}
}
const QVector<WiFiNetwork> networks = queryScanResults(&context, interfaces, &errorMessage);
closeNetlinkContext(&context);
if (networks.isEmpty()) {
if (!triggerWorked && isRecoverableTriggerFailure(triggerError)) {
outcome.errorMessage =
"No cached Wi-Fi scan results are available yet. "
"Try scanning once from the system Wi-Fi UI or wait a moment and refresh again.";
return outcome;
}
if (errorMessage.isEmpty()) {
errorMessage =
"nl80211 did not return any scan results. The interface may need a recent scan, or access may be restricted.";
}
outcome.errorMessage = normalizeScanFailureMessage(errorMessage);
return outcome;
}
outcome.networks = networks;
return outcome;
}
} // namespace
WiFiScanOutcome performWifiScan()
{
return performLinuxWifiScan();
}