#include "control.h"
#include "rndis.h"
-#define SUPPORTED_WIRELESS_EXT 19
static const long frequency_list[] = {
2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 2484,
pItemSSID = (PWLAN_IE_SSID)abyScanSSID;
pItemSSID->byElementID = WLAN_EID_SSID;
memcpy(pItemSSID->abySSID, req->essid, (int)req->essid_len);
- if (pItemSSID->abySSID[req->essid_len - 1] == '\0') {
+ if (pItemSSID->abySSID[req->essid_len] == '\0') {
if (req->essid_len > 0)
- pItemSSID->len = req->essid_len - 1;
+ pItemSSID->len = req->essid_len;
} else {
pItemSSID->len = req->essid_len;
}
range->txpower[0] = 100;
range->num_txpower = 1;
range->txpower_capa = IW_TXPOW_MWATT;
- range->we_version_source = SUPPORTED_WIRELESS_EXT;
+ range->we_version_source = WIRELESS_EXT;
range->we_version_compiled = WIRELESS_EXT;
range->retry_capa = IW_RETRY_LIMIT | IW_RETRY_LIFETIME;
range->retry_flags = IW_RETRY_LIMIT;
pItemSSID->byElementID = WLAN_EID_SSID;
memcpy(pItemSSID->abySSID, extra, wrq->length);
- if (pItemSSID->abySSID[wrq->length - 1] == '\0') {
+ if (pItemSSID->abySSID[wrq->length] == '\0') {
if (wrq->length>0)
- pItemSSID->len = wrq->length - 1;
+ pItemSSID->len = wrq->length;
} else {
pItemSSID->len = wrq->length;
}
return 0;
if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
- wrq->value = (int)((pMgmt->wListenInterval * pMgmt->wCurrBeaconPeriod) << 10);
+ wrq->value = (int)((pMgmt->wListenInterval *
+ pMgmt->wCurrBeaconPeriod) / 100);
wrq->flags = IW_POWER_TIMEOUT;
} else {
- wrq->value = (int)((pMgmt->wListenInterval * pMgmt->wCurrBeaconPeriod) << 10);
+ wrq->value = (int)((pMgmt->wListenInterval *
+ pMgmt->wCurrBeaconPeriod) / 100);
wrq->flags = IW_POWER_PERIOD;
}
+
wrq->flags |= IW_POWER_ALL_R;
return 0;
}