10 years agowpa_supplicant: fix scan with more than max_sched_scan_ssids android_jb_mr1_39 ol_r8.a8.06 ol_r8.a8.07 ol_r8.a8.08 ol_r8.a8.09 ol_r8.a8.10
wpa_supplicant: fix scan with more than max_sched_scan_ssids
sched scan fills filter_ssids with non empty ssids
that may be non-hidden (not scan_ssid=1)
so we may get to a point where some hidden ssids aren't filtered
and we don't start a normal scan for them, since
total number of hidden ssid < max_sched_scan_ssids.
to solve this, we count all active ssids instead of just the
scan_ssid=1 ones
sched scan fills filter_ssids with non empty ssids
that may be non-hidden (not scan_ssid=1)
so we may get to a point where some hidden ssids aren't filtered
and we don't start a normal scan for them, since
total number of hidden ssid < max_sched_scan_ssids.
to solve this, we count all active ssids instead of just the
scan_ssid=1 ones
10 years agohostapd: Fix Max SP Length derivation from QoS Info ol_r8.a8.01 ol_r8.a8.02 ol_r8.a8.03 ol_r8.a8.04 ol_r8.a8.05
hostapd: Fix Max SP Length derivation from QoS Info
Hostapd provides QoS info of the STA (Service Period & AC mask) to the
kernel during wpa_driver_nl80211_sta_add call. Bit 5 and Bit 6 of QoS
info represents the Max SP length. Fix an issue in the code to fetch the
Max SP by shifting right the QoS info by value WMM_QOSINFO_STA_SP_SHIFT.
(operator ">" is replaced with ">>" operator).
Signed-off-by: Srinivasan <srinivasanb@posedge.com>
Hostapd provides QoS info of the STA (Service Period & AC mask) to the
kernel during wpa_driver_nl80211_sta_add call. Bit 5 and Bit 6 of QoS
info represents the Max SP length. Fix an issue in the code to fetch the
Max SP by shifting right the QoS info by value WMM_QOSINFO_STA_SP_SHIFT.
(operator ">" is replaced with ">>" operator).
Signed-off-by: Srinivasan <srinivasanb@posedge.com>
driver_nl80211: implement shared AP channel op
Dump all AP interfaces using NL80211_CMD_GET_INTERFACE and make sure
the wiphy matches ours.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Dump all AP interfaces using NL80211_CMD_GET_INTERFACE and make sure
the wiphy matches ours.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
hostapd: use new op to sync AP channels
A new op will be used to get the operational frequency and secondary
channel of any existing APs, even if operating in different processes.
Use this op to select the channel for the current AP, if dictated by
the ap_channel_sync config parameter.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
A new op will be used to get the operational frequency and secondary
channel of any existing APs, even if operating in different processes.
Use this op to select the channel for the current AP, if dictated by
the ap_channel_sync config parameter.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
hostapd: add hostapd.conf param to force AP channel sync
When ap_channel_sync=1 the 40Mhz operating channel of an AP will be
set to the channel of an existing AP operating on the same PHY (NIC).
Signed-off-by: Arik Nemtsov <arik@wizery.com>
When ap_channel_sync=1 the 40Mhz operating channel of an AP will be
set to the channel of an existing AP operating on the same PHY (NIC).
Signed-off-by: Arik Nemtsov <arik@wizery.com>
hostapd: ACS: set correct ht_capab when no HT40 is not chosen
If HT40 is enabled for ACS, but we fail to select a secondary channel
for any reason (usually regulatory), the ht_capab must be stripped
of the HT40-support capability.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
If HT40 is enabled for ACS, but we fail to select a secondary channel
for any reason (usually regulatory), the ht_capab must be stripped
of the HT40-support capability.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
hostapd: fix ACS behavior when 11n is disabled
If 11n is disabled during compile time (CONFIG_IEEE80211N) or during
runtime (ieee80211n=0), ACS code would fail to complete interface init.
Handle these cases correctly by calling the setup completion function.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
If 11n is disabled during compile time (CONFIG_IEEE80211N) or during
runtime (ieee80211n=0), ACS code would fail to complete interface init.
Handle these cases correctly by calling the setup completion function.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
driver_nl80211: set_country fix
Regulatory domain setting may take some time.
Getting reg domain info immediately after reg domain setting returns
invalid reg domain data. Loop is added to read reg domain info back and
to compare set country. If read country does not match, fail to 1 sec sleep
and retry get/compare again.
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Regulatory domain setting may take some time.
Getting reg domain info immediately after reg domain setting returns
invalid reg domain data. Loop is added to read reg domain info back and
to compare set country. If read country does not match, fail to 1 sec sleep
and retry get/compare again.
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
bgscan_learn: start scanning from the first freq
bgscan_learn_get_probe_freq() starts from returning
the second entry in the supp_freqs arrays.
Change its logic a bit to make it start from the first
entry.
Signed-hostap: Eliad Peller <eliad@wizery.com>
bgscan_learn_get_probe_freq() starts from returning
the second entry in the supp_freqs arrays.
Change its logic a bit to make it start from the first
entry.
Signed-hostap: Eliad Peller <eliad@wizery.com>
bgscan_learn: avoid redundant frequencies
Some hw modes (e.g. 11b and 11g) contain the same frequencies,
causing the supp_freqs array to be populated with redundant entries.
Check for the existence of the freq before adding it.
Signed-hostap: Eliad Peller <eliad@wizery.com>
Some hw modes (e.g. 11b and 11g) contain the same frequencies,
causing the supp_freqs array to be populated with redundant entries.
Check for the existence of the freq before adding it.
Signed-hostap: Eliad Peller <eliad@wizery.com>
bgscan: stop bgscan only on disassociaion
Stopping bgscan on any state other than COMPLETED results
in bgscan reset (stop + start) on every rekeying operation.
Signed-hostap: Eliad Peller <eliad@wizery.com>
Stopping bgscan on any state other than COMPLETED results
in bgscan reset (stop + start) on every rekeying operation.
Signed-hostap: Eliad Peller <eliad@wizery.com>
Revert "Revert "Initialize P2P on p2p0 and not wlan0 (JB)""
This reverts commit ff8600f0c5d08b245f1ec6e999b028ade86121bb.
This is required for normal operation of wlan0 + p2p0 interfaces
This reverts commit ff8600f0c5d08b245f1ec6e999b028ade86121bb.
This is required for normal operation of wlan0 + p2p0 interfaces
Revert "Initialize P2P on p2p0 and not wlan0 (JB)"
This reverts commit 1e513dec86ce7ca2b37d31ac2acd9901662e6611.
This reverts commit 1e513dec86ce7ca2b37d31ac2acd9901662e6611.
sync nl80211_copy.h
after the latest rebase, some command indices
had to move, so make sure we are aligned again.
Signed-off-by: Eliad Peller <eliad@wizery.com>
after the latest rebase, some command indices
had to move, so make sure we are aligned again.
Signed-off-by: Eliad Peller <eliad@wizery.com>
drivers.mak: don't use hardcoded libnl3 path (INTERNAL)
Using hardcoded libnl-3 path breaks cross-compilation.
Don't use it if LIBNL_PATH is defined.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Using hardcoded libnl-3 path breaks cross-compilation.
Don't use it if LIBNL_PATH is defined.
Signed-off-by: Eliad Peller <eliad@wizery.com>
ctrl_iface: block commands while in smart_config mode
block most of the ctrl_iface commands while the supplicant
is in smart_config mode.
Allow only a limited set of commands, as the driver/supplicant
is not fully functional in this stage.
Signed-off-by: Eliad Peller <eliad@wizery.com>
block most of the ctrl_iface commands while the supplicant
is in smart_config mode.
Allow only a limited set of commands, as the driver/supplicant
is not fully functional in this stage.
Signed-off-by: Eliad Peller <eliad@wizery.com>
smart_config: scan social channels first
scan on channels 1/6/11 first (that is the current requirement.
it doesn't seem very useful, though...)
we can also simplify the code by letting the driver check
whether the channel is disabled. however, the rest of the
scan code checks it in userspace as well, so do it also
here.
Signed-off-by: Eliad Peller <eliad@wizery.com>
scan on channels 1/6/11 first (that is the current requirement.
it doesn't seem very useful, though...)
we can also simplify the code by letting the driver check
whether the channel is disabled. however, the rest of the
scan code checks it in userspace as well, so do it also
here.
Signed-off-by: Eliad Peller <eliad@wizery.com>
ctrl_iface wpa_supplicant: handle SMART_CONFIG_SET_GROUP_KEY
Issue an internal SMART_CONFIG_SET_GROUP_KEY driver command.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Issue an internal SMART_CONFIG_SET_GROUP_KEY driver command.
Signed-off-by: Eliad Peller <eliad@wizery.com>
driver_nl80211: handle smart_config set group key command
Handle SMART_CONFIG_SET_GROUP_KEY command, by sending
the respective testmode command to the driver.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Handle SMART_CONFIG_SET_GROUP_KEY command, by sending
the respective testmode command to the driver.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wpa_cli: add smart_config set group key command
Add new smart_config_set_group_key wpa_cli command
to set a group key for the smart_config decode stage.
The relevnat key is later used in the smart_config
decode phase in order to decrypt the received
data (ssid, pwd).
Signed-off-by: Eliad Peller <eliad@wizery.com>
Add new smart_config_set_group_key wpa_cli command
to set a group key for the smart_config decode stage.
The relevnat key is later used in the smart_config
decode phase in order to decrypt the received
data (ssid, pwd).
Signed-off-by: Eliad Peller <eliad@wizery.com>
wpa_ctrl: add smart_config events
Add events for SYNC completion and DECODE completion.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Add events for SYNC completion and DECODE completion.
Signed-off-by: Eliad Peller <eliad@wizery.com>
events: add another network entry for smart_config WEP keys
in case of hex keys with len=10/26, add another network
block with wep encryption.
Signed-off-by: Eliad Peller <eliad@wizery.com>
in case of hex keys with len=10/26, add another network
block with wep encryption.
Signed-off-by: Eliad Peller <eliad@wizery.com>
events: add new network on decode
On successfull smart config decode, add a new enabled network,
and save it (if update_config=1).
Signed-off-by: Eliad Peller <eliad@wizery.com>
On successfull smart config decode, add a new enabled network,
and save it (if update_config=1).
Signed-off-by: Eliad Peller <eliad@wizery.com>
wpa_cli/ctrl_iface: handle SMART_CONFIG/STOP_SMART_CONFIG commands
simply call the respective wpa_supplicant_smart_config_start/stop
command.
Signed-off-by: Eliad Peller <eliad@wizery.com>
simply call the respective wpa_supplicant_smart_config_start/stop
command.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wpa_supplicant: handle smart_config_start/stop
handle smart_config start/stop commands.
Call the newly added stop function on SMART_CONFIG_DECODE event
as well, in order to avoid duplicated code.
On SMART_CONFIG_START we stop temporarily disable
all networks and disable the ongoing scans. Then,
we send testmode command to enter smart_config mode,
and initiate an empty scan (so the fw will try syncing
on a channel with smart_config data being transmitted)
Signed-off-by: Eliad Peller <eliad@wizery.com>
handle smart_config start/stop commands.
Call the newly added stop function on SMART_CONFIG_DECODE event
as well, in order to avoid duplicated code.
On SMART_CONFIG_START we stop temporarily disable
all networks and disable the ongoing scans. Then,
we send testmode command to enter smart_config mode,
and initiate an empty scan (so the fw will try syncing
on a channel with smart_config data being transmitted)
Signed-off-by: Eliad Peller <eliad@wizery.com>
driver_nl80211: register for testmode events
testmode events are used for smart_config
Signed-off-by: Eliad Peller <eliad@wizery.com>
testmode events are used for smart_config
Signed-off-by: Eliad Peller <eliad@wizery.com>
driver_nl80211: handle testmode events
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
allow sched_scan with no configured networks
In case of smart_config (during the sync stage), we want
to issue a sched_scan, while there are no configured networks.
Signed-off-by: Eliad Peller <eliad@wizery.com>
In case of smart_config (during the sync stage), we want
to issue a sched_scan, while there are no configured networks.
Signed-off-by: Eliad Peller <eliad@wizery.com>
events: add smart config events
On EVENT_SMART_CONFIG_SYNC event, start ROCing forever, until
the info is decoded successfully.
On EVENT_SMART_CONFIG_SYNC event, start ROCing forever, until
the info is decoded successfully.
driver_nl80211: add smart_config_start/stop functions
Add generic testmode command function, and use it in
order to send smart_config_start/stop commands.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Add generic testmode command function, and use it in
order to send smart_config_start/stop commands.
Signed-off-by: Eliad Peller <eliad@wizery.com>
driver_nl80211: define driver_cmd callback for non-android builds as well
call the original android implementation if ANDROID is defined,
otherwise, return -1.
we'll later extend this function to support testmode commands as well.
Signed-off-by: Eliad Peller <eliad@wizery.com>
call the original android implementation if ANDROID is defined,
otherwise, return -1.
we'll later extend this function to support testmode commands as well.
Signed-off-by: Eliad Peller <eliad@wizery.com>
add copy of testmode.h
Use a copy in order to sync testmode commands with the kernel
Signed-off-by: Eliad Peller <eliad@wizery.com>
Use a copy in order to sync testmode commands with the kernel
Signed-off-by: Eliad Peller <eliad@wizery.com>
wpa_s: fix hidden network connection (INTERNAL)
Scheduled scan can handle up to WPAS_MAX_SCAN_SSIDS per scan.
If the number of configured networks exceeds this limitation,
iterate over rest SSIDs (> WPAS_MAX_SCAN_SSIDS) with cyclic
normal scan.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Scheduled scan can handle up to WPAS_MAX_SCAN_SSIDS per scan.
If the number of configured networks exceeds this limitation,
iterate over rest SSIDs (> WPAS_MAX_SCAN_SSIDS) with cyclic
normal scan.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
p2p: always scan using p2p probes on GO/CLI interfaces (INTERNAL)
If we get BSS loss as a CLI, the interface is no longer in formation,
and we mistakenly use CCK rates in the scan.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
If we get BSS loss as a CLI, the interface is no longer in formation,
and we mistakenly use CCK rates in the scan.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
HACK: use android logic for p2p init by interface names
This prevents us from initializing p2p on the first interface.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
This prevents us from initializing p2p on the first interface.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
wpa_s: fix connection with WPSv2
Once a new scan results are available and no suitable
network found, enable a normal scan as it's preferable
for the WPS operations. This fixes some connections
problems with WPSv2.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Once a new scan results are available and no suitable
network found, enable a normal scan as it's preferable
for the WPS operations. This fixes some connections
problems with WPSv2.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
wpa_s: add DBUS support to defconfig
Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Ido Reis <idor@ti.com>
wpa_s: new override_p2p_go_intent conf parameter (INTERNAL)
If override_p2p_go_intent is set in the p2p/wpa_supplicant.conf
use it instead of the p2p_go_intent value passed from the frame
work.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
If override_p2p_go_intent is set in the p2p/wpa_supplicant.conf
use it instead of the p2p_go_intent value passed from the frame
work.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
P2P: wait on GO negotiation confirm
This commit reverts:
792c887 P2P: Send GO Negotiation Confirm without wait
Some drivers rely on the wait period for sending packets on the
off-channel. If the wait value is small there's a race condition where
the driver ROC might complete before the packet was sent out.
This doesn't impede other drivers, as the wait is cancelled when a
Tx-completion arrives from the remote peer.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
This commit reverts:
792c887 P2P: Send GO Negotiation Confirm without wait
Some drivers rely on the wait period for sending packets on the
off-channel. If the wait value is small there's a race condition where
the driver ROC might complete before the packet was sent out.
This doesn't impede other drivers, as the wait is cancelled when a
Tx-completion arrives from the remote peer.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Android/wpa_supplicant: revert enable mr/mc by default
No need to pass use_multi_chan_concurrent & use_p2p_group_interface
driver parameters as in JB MR1 driver_nl80211 sets
WPA_DRIVER_FLAGS_P2P_CONCURRENT and WPA_DRIVER_FLAGS_MULTI_CHANNEL_CONCURRENT
flags according to wifi capabilities.
Reverts commits:
4a23708 Android/wpa_supplicant: enable mr/mc by default
83d2f35 android: wpa_s template: set p2p_go_max_inactivity and p2p concurrency
Change-Id: I3c66af1f0e4eaa70dd425be6f80b46c1734ffc48
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
No need to pass use_multi_chan_concurrent & use_p2p_group_interface
driver parameters as in JB MR1 driver_nl80211 sets
WPA_DRIVER_FLAGS_P2P_CONCURRENT and WPA_DRIVER_FLAGS_MULTI_CHANNEL_CONCURRENT
flags according to wifi capabilities.
Reverts commits:
4a23708 Android/wpa_supplicant: enable mr/mc by default
83d2f35 android: wpa_s template: set p2p_go_max_inactivity and p2p concurrency
Change-Id: I3c66af1f0e4eaa70dd425be6f80b46c1734ffc48
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
P2P: accept provision discovery with bcast group ID
Some bogus devices send provision discovery requests with
bcast group id, which is invalid. However, as we currently
must accept these requests, as they are needed for certification.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Some bogus devices send provision discovery requests with
bcast group id, which is invalid. However, as we currently
must accept these requests, as they are needed for certification.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Android/wpa_supplicant: enable mr/mc by default
Change-Id: Ica21e3f16f27cb8815bb60243f4a83f55ee5b588
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Change-Id: Ica21e3f16f27cb8815bb60243f4a83f55ee5b588
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
P2P: Don't delete group on non P2P interfaces (UPSTREAM)
p2p_group_remove * calls wpas_p2p_disconnect on all
interfaces including non P2P ones. This has undesired
effects such as disconnecting concurrent connected STA
interfaces as well as emitting P2P-GROUP-REMOVED events
on all interfaces including ones that didn't actually
have a P2P CLI or GO running.
Instead fail explicitly when attempting to p2p disconnect
an interface with no P2P activity.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
p2p_group_remove * calls wpas_p2p_disconnect on all
interfaces including non P2P ones. This has undesired
effects such as disconnecting concurrent connected STA
interfaces as well as emitting P2P-GROUP-REMOVED events
on all interfaces including ones that didn't actually
have a P2P CLI or GO running.
Instead fail explicitly when attempting to p2p disconnect
an interface with no P2P activity.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
hostapd: add support for ACS whitelist and blacklist (INTERNAL)
Allow certain channels to be marked as forbidden for automatic channel
selection (ACS) via a blacklist. Also allow channels to be preferred
exclusively via a whitelist.
Both blacklist and whitelist can be configured via the hostapd.conf
file. Document these options in the sample hostapd.conf file given.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Allow certain channels to be marked as forbidden for automatic channel
selection (ACS) via a blacklist. Also allow channels to be preferred
exclusively via a whitelist.
Both blacklist and whitelist can be configured via the hostapd.conf
file. Document these options in the sample hostapd.conf file given.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
hostapd: auto-select secondary channel (INTERNAL)
Select a secondary channel according to regulatory class and ambient
noise constraints, as measured by the number of APs on the primary
channel.
If the user wants HT40 operation, try to select a secondary channel
where the level of noise is still minimal. If such one cannot be found,
we prefer to operate as an HT20 AP. The secondary channel selected also
has the minimum number of APs between all allowed secondary channels.
HT40 on 2.4Ghz is disallowed outright, since we can't fulfill all
regulatory constraints to operate in this mode.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Select a secondary channel according to regulatory class and ambient
noise constraints, as measured by the number of APs on the primary
channel.
If the user wants HT40 operation, try to select a secondary channel
where the level of noise is still minimal. If such one cannot be found,
we prefer to operate as an HT20 AP. The secondary channel selected also
has the minimum number of APs between all allowed secondary channels.
HT40 on 2.4Ghz is disallowed outright, since we can't fulfill all
regulatory constraints to operate in this mode.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
hostapd: auto-select AP channel (INTERNAL)
Find all BSSes in scan results and find a channel in our HW mode where
the number of BSSes is minimal. Ignore channels disabled by our regulatory
domain.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Find all BSSes in scan results and find a channel in our HW mode where
the number of BSSes is minimal. Ignore channels disabled by our regulatory
domain.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
hostapd: re-use auto-select scan result for 40Mhz pre-scan (INTERNAL)
We can use the scan done for selecting the channel for the mandatory
scan to be made for an 11a 40Mhz AP. Refactor some functions to be
able to use an existing scan_res structure.
Also make ieee80211n_check_scan() demand async completion, since the
interface is initialized by this function.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
We can use the scan done for selecting the channel for the mandatory
scan to be made for an 11a 40Mhz AP. Refactor some functions to be
able to use an existing scan_res structure.
Also make ieee80211n_check_scan() demand async completion, since the
interface is initialized by this function.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
hostapd: template function for auto-selection of channel (INTERNAL)
Don't fail when the configured AP channel is 0. Use it as a cue for
automatic channel selection. Move the code a bit up to avoid redundant
checks for channel validitly on the yet unselected channel.
Add an empty template function for auto-selecting a channel. At this point
a scan is initiated and its callback does nothing.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Don't fail when the configured AP channel is 0. Use it as a cue for
automatic channel selection. Move the code a bit up to avoid redundant
checks for channel validitly on the yet unselected channel.
Add an empty template function for auto-selecting a channel. At this point
a scan is initiated and its callback does nothing.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
p2p: accommodate peers that use the GO address in prov_disc_resp
Don't try to perform another PD with the remote peer if we already have
one with its interface (GO) address. Usually the dev address is used in
this case.
This is compatibility fix for the Google CTS testing suite.
Change-Id: Ie8c53fc66cc845c3e0c35ece88b520590045e350
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Don't try to perform another PD with the remote peer if we already have
one with its interface (GO) address. Usually the dev address is used in
this case.
This is compatibility fix for the Google CTS testing suite.
Change-Id: Ie8c53fc66cc845c3e0c35ece88b520590045e350
Signed-off-by: Arik Nemtsov <arik@wizery.com>
driver_nl80211: ignore useless driver commands (ANDROID)
These are not used, so just return success to avoid creating spurious
errors in logcat.
Change-Id: I458a8969647f3cff391766b9f86a046600ed7d36
Signed-off-by: Arik Nemtsov <arik@wizery.com>
These are not used, so just return success to avoid creating spurious
errors in logcat.
Change-Id: I458a8969647f3cff391766b9f86a046600ed7d36
Signed-off-by: Arik Nemtsov <arik@wizery.com>
android: remove redundant define from driver_nl80211
The AOSP libnl already contains this define. Defining it twice creates a
conflict during compilation.
Change-Id: I5a9183e1377f358b40ed3942cdde3da7dd229e3f
Signed-off-by: Arik Nemtsov <arik@wizery.com>
The AOSP libnl already contains this define. Defining it twice creates a
conflict during compilation.
Change-Id: I5a9183e1377f358b40ed3942cdde3da7dd229e3f
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Android.mk: update version string
Update version string to differentiate this tree from Google tree
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Update version string to differentiate this tree from Google tree
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Increase timeouts for p2p
Dongles can be slow to respond and a quick turn around time on packets does not help.
Allow for upto 350ms on retry attempts for provision discovery, negotiation and invitation
This will catch slow responses within the first attempt and prevent any kind of issues
with sequence number handling
Bug: 7445415
Change-Id: I88a849d400b10f42ac298bad6d01f49803fcc8ba
Dongles can be slow to respond and a quick turn around time on packets does not help.
Allow for upto 350ms on retry attempts for provision discovery, negotiation and invitation
This will catch slow responses within the first attempt and prevent any kind of issues
with sequence number handling
Bug: 7445415
Change-Id: I88a849d400b10f42ac298bad6d01f49803fcc8ba
Increase channel delay to 100ms
There is an inherent flaw in the p2p protocol design where an ACK loss right
before channel switch leads to peers being out of sync.
A work around of 50ms was added persistent case, but it turns out in heavy lossy
conditions that is not enough. Increase it to 100ms.
Experimental evaluation showed 100ms improves the reliability of p2p persistence
reinvocation.
Bug: 7359500
Change-Id: I73ab1b64e32b87101e95b0e487c90818c2c0aaf3
There is an inherent flaw in the p2p protocol design where an ACK loss right
before channel switch leads to peers being out of sync.
A work around of 50ms was added persistent case, but it turns out in heavy lossy
conditions that is not enough. Increase it to 100ms.
Experimental evaluation showed 100ms improves the reliability of p2p persistence
reinvocation.
Bug: 7359500
Change-Id: I73ab1b64e32b87101e95b0e487c90818c2c0aaf3
clear wfd_dev_info_hex before use
Change-Id: Ic5cdb4df220834faf9e7da5cc1cc0a4191e6abd1
Change-Id: Ic5cdb4df220834faf9e7da5cc1cc0a4191e6abd1
Add WFD dev info in device found event
Change-Id: If25804d41e7ea1d028a30c180290d8de547f43e8
Change-Id: If25804d41e7ea1d028a30c180290d8de547f43e8
Fix join for p2p_connect
wps_pbc with interface command stripped out ends up as a null character.
Supplicant tries to interpret that as a bssid. Fix it to ignore null
character as empty bssid
Change-Id: Ic91d6657efaf03fbe5c4a03e9e630b4b3ff5dec4
wps_pbc with interface command stripped out ends up as a null character.
Supplicant tries to interpret that as a bssid. Fix it to ignore null
character as empty bssid
Change-Id: Ic91d6657efaf03fbe5c4a03e9e630b4b3ff5dec4
hostapd: Allow hostapd_cli to work on Android
Add definitions of the Android specific directories used for control
interface sockets so that hostapd_cli can connect to the Android
hostapd.
Change-Id: Iabcd8d70ef61fae6656066991240d55e65a032e4
Add definitions of the Android specific directories used for control
interface sockets so that hostapd_cli can connect to the Android
hostapd.
Change-Id: Iabcd8d70ef61fae6656066991240d55e65a032e4
Restore p2p_group_formation pointer
Restore the pointer till the 4-way handshake completes for the p2p client
Change-Id: I976659ae5dac4cf01ecdd7995ff9abb6bf914bc1
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Restore the pointer till the 4-way handshake completes for the p2p client
Change-Id: I976659ae5dac4cf01ecdd7995ff9abb6bf914bc1
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
p2p: various fixes
- Allow group idle timeout to run during WPS disconnect
- Perform single channel scan if we know the channel of the GO joined
Change-Id: I7e9e15b9c44804196bc98c01d51a71e24412b91d
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
- Allow group idle timeout to run during WPS disconnect
- Perform single channel scan if we know the channel of the GO joined
Change-Id: I7e9e15b9c44804196bc98c01d51a71e24412b91d
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Add delimiter for bss command
With the availability of MASK option, the number of lines per BSS is not obvious,
add a delimiter to make parsing less flaky
Bug: 2961159
Change-Id: I9e5523f8da183e0735dbc06f0c09c9f841060504
With the availability of MASK option, the number of lines per BSS is not obvious,
add a delimiter to make parsing less flaky
Bug: 2961159
Change-Id: I9e5523f8da183e0735dbc06f0c09c9f841060504
Add action parameter to service discovery functionality
Change-Id: Ibc74c4053996e91f2f577b57695c68c86b5603c2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Change-Id: Ibc74c4053996e91f2f577b57695c68c86b5603c2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Use bssid instead of pending_bssid
pending_bssid is not valid during roaming, use bssid
Bug: 6915644
Change-Id: Ib2181a41845f90812bd7428dbef6433adfe9f749
pending_bssid is not valid during roaming, use bssid
Bug: 6915644
Change-Id: Ib2181a41845f90812bd7428dbef6433adfe9f749
Get rid of LOCAL_MODULE_TAGS := user
Change-Id: I6d9ed4e6e1d94cfedcb703eec4adfe227d35b473
Change-Id: I6d9ed4e6e1d94cfedcb703eec4adfe227d35b473
Use SSL_OP_NO_TLSv1_1 SSL_OP_NO_TLSv1_2 SSL_OP_NO_TICKET for better wpa_supplicant_8 interoperability
Bug: https://bugs.launchpad.net/ubuntu/+source/wpasupplicant/+bug/969343/comments/72
Bug: http://w1.fi/bugz/show_bug.cgi?id=447#c7
Bug: http://code.google.com/p/android/issues/detail?id=34212
Bug: 6883259
Change-Id: Ib53326cc8cd40e800454b7b92586c052bc910ba8
Bug: https://bugs.launchpad.net/ubuntu/+source/wpasupplicant/+bug/969343/comments/72
Bug: http://w1.fi/bugz/show_bug.cgi?id=447#c7
Bug: http://code.google.com/p/android/issues/detail?id=34212
Bug: 6883259
Change-Id: Ib53326cc8cd40e800454b7b92586c052bc910ba8
wpa_supplicant: Remove snprintf call from interface= extension
BUG: b/6826116
Change-Id: I35023ce94152a402da94c34083de8ea1387cc758
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
BUG: b/6826116
Change-Id: I35023ce94152a402da94c34083de8ea1387cc758
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Do not delay p2p search in case of concurrent operations (INTERNAL)
In our case there's no real need for the 500ms delay.
Canceling it improves the peer detection speed and user experience.
If a STA is connected then the p2p find won't affect it except
for a possible throughput hit but we prefer a better that in order
to get a beter user experience during the find.
If a STA is attempting to connect or scanning the p2p find will
be restarted as it's resilient to failures in scan and listen phases.
Change-Id: I455ce99be9fa54521cf2cea96bd023e9f14b64eb
Signed-off-by: Eyal Shapira <eyal@wizery.com>
In our case there's no real need for the 500ms delay.
Canceling it improves the peer detection speed and user experience.
If a STA is connected then the p2p find won't affect it except
for a possible throughput hit but we prefer a better that in order
to get a beter user experience during the find.
If a STA is attempting to connect or scanning the p2p find will
be restarted as it's resilient to failures in scan and listen phases.
Change-Id: I455ce99be9fa54521cf2cea96bd023e9f14b64eb
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Don't stop scan results processing due to pending P2P (INTERNAL)
The removed code unnecessarily discarded scan results
as well as fueled a ping pong between P2P search scans
and STA scans.
In Android whenever STA is connected further frameworks scans
are performed with changing ap_scan to 2 prior to the actual scan.
The combo of the current code and ap_scan == 2 would sometimes
lead to P2P search getting stuck as it wasn't being restarted
following STA scan.
[A similar patch by Neeraj is discussed on hostap but hasn't been
taken yet due to Jouni's rejection so currently mark this as INTERNAL
and consider replacing it with the upstream version once approved]
Change-Id: I86abb93587e76f90b2c63280f596133e02f163bd
Signed-off-by: Eyal Shapira <eyal@wizery.com>
The removed code unnecessarily discarded scan results
as well as fueled a ping pong between P2P search scans
and STA scans.
In Android whenever STA is connected further frameworks scans
are performed with changing ap_scan to 2 prior to the actual scan.
The combo of the current code and ap_scan == 2 would sometimes
lead to P2P search getting stuck as it wasn't being restarted
following STA scan.
[A similar patch by Neeraj is discussed on hostap but hasn't been
taken yet due to Jouni's rejection so currently mark this as INTERNAL
and consider replacing it with the upstream version once approved]
Change-Id: I86abb93587e76f90b2c63280f596133e02f163bd
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Avoid sched scan flood in case of mismatched security (UPSTREAM)
Current sched scan in the kernel is limited to SSID matching.
A rare corner case is when an AP with a matching SSID but unmatching
security to a saved profile is in the vicinity. In such a case
sched scan results will immediately be returned after initiating sched
scan however no match will be found due to the security mismatch.
This goes on in a tight loop which is bad as it will effectively
prevent the host from suspending and scan results will eventually
contain the single AP matched by the sched scan due to expiration
of other APs scanned in normal scans which are less frequent.
Avoid this by stopping sched scan after detecting sched scan results
were received but no matched network. Don't start another sched
scan immediately but wait for the next normal scan without any results
to restart it. This prevents the tight loop.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Current sched scan in the kernel is limited to SSID matching.
A rare corner case is when an AP with a matching SSID but unmatching
security to a saved profile is in the vicinity. In such a case
sched scan results will immediately be returned after initiating sched
scan however no match will be found due to the security mismatch.
This goes on in a tight loop which is bad as it will effectively
prevent the host from suspending and scan results will eventually
contain the single AP matched by the sched scan due to expiration
of other APs scanned in normal scans which are less frequent.
Avoid this by stopping sched scan after detecting sched scan results
were received but no matched network. Don't start another sched
scan immediately but wait for the next normal scan without any results
to restart it. This prevents the tight loop.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Android: Initiate a periodic normal scan in addition to sched scan (ANDROID)
Android assumes wpa_s performs periodic broadcast scans whenever there are
saved networks. It relies on these scans for the "open networks detection"
feature. Whenever there aren't any saved networks the framework will initiate
these periodic scans on its own. Switching to using sched scan in wpa_s
effectively disabled these periodic broadcast scans as no results are returned
from the sched scan until a saved network is seen.
Fix this by initiating a normal scan every scan interval following no match
when handling scan results.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Android assumes wpa_s performs periodic broadcast scans whenever there are
saved networks. It relies on these scans for the "open networks detection"
feature. Whenever there aren't any saved networks the framework will initiate
these periodic scans on its own. Switching to using sched scan in wpa_s
effectively disabled these periodic broadcast scans as no results are returned
from the sched scan until a saved network is seen.
Fix this by initiating a normal scan every scan interval following no match
when handling scan results.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Distinguish between sched scan results and normal scan results (UPSTREAM)
In case concurrent normal scan and sched scan is supported we'd like
to avoid restarting sched scan upon receiving normal scan results.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
In case concurrent normal scan and sched scan is supported we'd like
to avoid restarting sched scan upon receiving normal scan results.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
WPS: Select only correct AP following provisioning (UPSTREAM)
If there are other saved enabled networks a scan following
a successful WPS provisioing may connect to one of those
instead of the AP with which the provisioning was just done.
Avoid that by allowing only selection of a scan result with
a matching bssid to the WPS AP. This will be limited to a number
of scans following WPS provisioing using the same counter
wpa_s->after_wps used to optimize scan frequency post provisioning.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
If there are other saved enabled networks a scan following
a successful WPS provisioing may connect to one of those
instead of the AP with which the provisioning was just done.
Avoid that by allowing only selection of a scan result with
a matching bssid to the WPS AP. This will be limited to a number
of scans following WPS provisioing using the same counter
wpa_s->after_wps used to optimize scan frequency post provisioning.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
wpa_s: restart sched scan on channel list change
The channel list can be changed as a result of arriving
beacon hints during normal scan or as a result of local
Reg-Domain change, some passive channels can become
active and shall be reconfigured accordingly for the
scheduled scan.
This fixes the connection to hidden SSIDs on 5Ghz band
during default Reg-Domain 00 (world roaming).
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
The channel list can be changed as a result of arriving
beacon hints during normal scan or as a result of local
Reg-Domain change, some passive channels can become
active and shall be reconfigured accordingly for the
scheduled scan.
This fixes the connection to hidden SSIDs on 5Ghz band
during default Reg-Domain 00 (world roaming).
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Add API and CLI command to control sched scan intervals (UPSTREAM)
Enable control over the sched scan intervals parameters
through a new wpa_s API (SCHED_SCAN_INTERVALS) and a
matching wpa_cli command.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Enable control over the sched scan intervals parameters
through a new wpa_s API (SCHED_SCAN_INTERVALS) and a
matching wpa_cli command.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
sched scan: Add config parameters for short and long intervals (UPSTREAM)
Part of support for short and long intervals
Part of support for short and long intervals
sched scan: add support for short and long intervals (UPSTREAM)
Configure sched scan to use short and long intervals
if the driver supports it
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Configure sched scan to use short and long intervals
if the driver supports it
Signed-off-by: Eyal Shapira <eyal@wizery.com>
sched scan: read driver support for sched scan intervals (UPSTREAM)
Use the feature flag reported by NL80211 to know
if the driver supports short and long intervals in
the sched scan API. This is a prep patch for the
actual handling of this flag.
Use the feature flag reported by NL80211 to know
if the driver supports short and long intervals in
the sched scan API. This is a prep patch for the
actual handling of this flag.
Don't scan ssids that were sched scanned (UPSTREAM)
When having more than max_sched_scan_ssids ssids, scanning
of the remaining ssids (not included in the sched scan)
might take a while.
Reduce this time by avoiding scanning of ssids that
were already included in the scheduled scan.
Signed-off-by: Eliad Peller <eliad@wizery.com>
When having more than max_sched_scan_ssids ssids, scanning
of the remaining ssids (not included in the sched scan)
might take a while.
Reduce this time by avoiding scanning of ssids that
were already included in the scheduled scan.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Change sched_scan logic for large number of configured networks (UPSTREAM)
One of the major motivations behind sched scan is offloading
periodic scanning to the device firmware so that the host can
suspend and only be woken up when a known network is close by.
When there are more than max_match_sets or max_sched_scan_ssids
networks in the configuration the current logic will attempt to sched
scan a maximal group up to a certain timeout and then switch to
the next group. The timeout also changes with a backoff.
There are a couple of problems with this approach:
1. The host can suspend while we are sched scanning an arbitrary
sub group of networks from all the configured networks. The
device will keep searching only for these networks while suspended
and other configured networks won't be scanned for.
2. The current backoff mechanism won't handle well large
number of networks
Instead of this we switch to a simpler logic whose principles are:
1. We sched scan only a single group of networks which are determined
according to those networks with the highest priority. This way
when the host suspends we'll be scanning the highest priority networks.
2. If there are more networks than sched scan can handle it will
fallback to normal scan so we can still scan for the lower priority
networks.
3. As there's no need to switch groups there's no need for
timeout and backoff.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
One of the major motivations behind sched scan is offloading
periodic scanning to the device firmware so that the host can
suspend and only be woken up when a known network is close by.
When there are more than max_match_sets or max_sched_scan_ssids
networks in the configuration the current logic will attempt to sched
scan a maximal group up to a certain timeout and then switch to
the next group. The timeout also changes with a backoff.
There are a couple of problems with this approach:
1. The host can suspend while we are sched scanning an arbitrary
sub group of networks from all the configured networks. The
device will keep searching only for these networks while suspended
and other configured networks won't be scanned for.
2. The current backoff mechanism won't handle well large
number of networks
Instead of this we switch to a simpler logic whose principles are:
1. We sched scan only a single group of networks which are determined
according to those networks with the highest priority. This way
when the host suspends we'll be scanning the highest priority networks.
2. If there are more networks than sched scan can handle it will
fallback to normal scan so we can still scan for the lower priority
networks.
3. As there's no need to switch groups there's no need for
timeout and backoff.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Cancel sched scan upon assoc event (UPSTREAM)
Looks like since scan is canceled so should any sched scan.
This should probably not occur as both are canceled upon
attempting to connect.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Looks like since scan is canceled so should any sched scan.
This should probably not occur as both are canceled upon
attempting to connect.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Restart sched scan following remove network (UPSTREAM)
As the enabled networks list changes sched scan should
be restarted with the new networks list to avoid keep scanning
for removed networks.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
As the enabled networks list changes sched scan should
be restarted with the new networks list to avoid keep scanning
for removed networks.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
wpa_supplicant: use a different function to enable a network
Use a function to enable a network, and then start scan if needed.
Stop scheduled scan, if exists, before starting a regular scan.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Use a function to enable a network, and then start scan if needed.
Stop scheduled scan, if exists, before starting a regular scan.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
wpa_supplicant: add function that enables one network
This function enables one network, clears temp_disabled, notifies
About changing status and toggles reassociate if we are disconnected.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
This function enables one network, clears temp_disabled, notifies
About changing status and toggles reassociate if we are disconnected.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Fix use-after-free when removing all networks (UPSTREAM)
commit 59ff6653
"Fix REMOVE_NETWORK to not run operations with invalid current_ssid"
fixed the removal of a single network but the same use-after-free
issue exists when removing all networks.
As part of the fix refactor ctrl_iface_remove_network to use
wpa_supplicant_remove_network which actually does the work.
This should help with fixing the use-after-free issue also when
remove network is done via dbus.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
commit 59ff6653
"Fix REMOVE_NETWORK to not run operations with invalid current_ssid"
fixed the removal of a single network but the same use-after-free
issue exists when removing all networks.
As part of the fix refactor ctrl_iface_remove_network to use
wpa_supplicant_remove_network which actually does the work.
This should help with fixing the use-after-free issue also when
remove network is done via dbus.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Allow a new sched scan to replace an existing one (UPSTREAM)
Sched scan needs to be restarted in cases where the enabled
networks list changes. Make wpa_supplicant_req_sched_scan
cancel the previous scan in case there's an ongoing one and
start a new one with the updated networks list.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Sched scan needs to be restarted in cases where the enabled
networks list changes. Make wpa_supplicant_req_sched_scan
cancel the previous scan in case there's an ongoing one and
start a new one with the updated networks list.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Avoid changing state to WPA_SCANNING for sched scan (UPSTREAM)
This prevents manual scan requests from the control iface
in case of sched scan and normal scan can run concurrently.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
This prevents manual scan requests from the control iface
in case of sched scan and normal scan can run concurrently.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Do not sched scan if no enabled networks (UPSTREAM)
There is no point to sched scan when there are no enabled networks.
With some drivers initiating such an empty sched scan causes
returning of scan results with zero results. If this is repeated
it leads to clearing of wpa_s scan results.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
There is no point to sched scan when there are no enabled networks.
With some drivers initiating such an empty sched scan causes
returning of scan results with zero results. If this is repeated
it leads to clearing of wpa_s scan results.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
wpa_s: don't accumulate delayed sched scan requests (UPSTREAM)
Clear any previous pending timeouts before scheduling
a new delayed sched scan.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Clear any previous pending timeouts before scheduling
a new delayed sched scan.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
nl80211: add support for DRIVER COUNTRY command
Add this for supporting country command coming as DRIVER command in Android.
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Add this for supporting country command coming as DRIVER command in Android.
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
hostapd: enable dynamic modification of acl policy
add APIs for dynamically changing the macaddr_acl
policy and mac addresses lists.
once changed, hostapd will deauth stations which
do not pass the new policy.
Signed-off-by: Nadim Zubidat <nadimz@ti.com>
add APIs for dynamically changing the macaddr_acl
policy and mac addresses lists.
once changed, hostapd will deauth stations which
do not pass the new policy.
Signed-off-by: Nadim Zubidat <nadimz@ti.com>
P2P: Fix broken rx action frame handling (INTERNAL-SQUASH)
The root cause of the duplication lies within the Rx path in mac80211
in Johannes` patch "mac80211: accept public action frames with mismatched BSSID".
When wpa_s works with a separate group interface this creates a duplicated Rx
on both the P2P dev interface and the GO interface.
Fix the issue by canceling the duplication in wpa_s and discarding
public action frames with unmatching bssid arriving on a dedicated GO interface
[Arik - for upstream we can't do this since it can break non-mac80211
drivers. Maybe set a flag in wiphy capabilities for when the kernel driver
does this?]
Signed-off-by: Eyal Shapira <eyal@wizery.com>
The root cause of the duplication lies within the Rx path in mac80211
in Johannes` patch "mac80211: accept public action frames with mismatched BSSID".
When wpa_s works with a separate group interface this creates a duplicated Rx
on both the P2P dev interface and the GO interface.
Fix the issue by canceling the duplication in wpa_s and discarding
public action frames with unmatching bssid arriving on a dedicated GO interface
[Arik - for upstream we can't do this since it can break non-mac80211
drivers. Maybe set a flag in wiphy capabilities for when the kernel driver
does this?]
Signed-off-by: Eyal Shapira <eyal@wizery.com>
P2P: cancel action frame offchan wait after recv go neg resp (UPSTREAM)
A wait of 200ms is configured after sending the go neg request.
The go neg process can end quickly within less than 200ms. If this wait
isn't canceled it can cause the beaconing of the GO to start while
mac80211 is still off channel on the listen channel and this may cause
beaconing on the wrong channel if oper channel is different from
the listen channel.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
A wait of 200ms is configured after sending the go neg request.
The go neg process can end quickly within less than 200ms. If this wait
isn't canceled it can cause the beaconing of the GO to start while
mac80211 is still off channel on the listen channel and this may cause
beaconing on the wrong channel if oper channel is different from
the listen channel.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Don't disable and select new network if SETBAND didn't change (ANDROID)
Current SETBAND would trigger network selection and as part of this
a scan attempt. This is not required in case SETBAND didn't change the
existing setting.
In Android which sends SETBAND immediately after WiFi startup this
would trigger needless scan attempts which would usually fail with -EBUSY
as another framework triggers scan was already going on.
The retry mechanism would then attempt further scans every 1 sec.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Current SETBAND would trigger network selection and as part of this
a scan attempt. This is not required in case SETBAND didn't change the
existing setting.
In Android which sends SETBAND immediately after WiFi startup this
would trigger needless scan attempts which would usually fail with -EBUSY
as another framework triggers scan was already going on.
The retry mechanism would then attempt further scans every 1 sec.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
android: wpa_s template: enable concurrent_sched_scan (ANDROID)
Our solution supports this and it speeds up initial connection
to hidden networks.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Our solution supports this and it speeds up initial connection
to hidden networks.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Allow concurrent normal scan and sched scan (UPSTREAM)
Some drivers support sched scan and normal scan. Enable this
by configuration of concurrent_sched_scan=1
This can speed up connection to scan_ssid=1 networks as
the sched scan doesn't get interrupted by a normal scan
for wildcard SSID.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Some drivers support sched scan and normal scan. Enable this
by configuration of concurrent_sched_scan=1
This can speed up connection to scan_ssid=1 networks as
the sched scan doesn't get interrupted by a normal scan
for wildcard SSID.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Avoid normal scans before sched scan if max_scan_ssids=1 (UPSTREAM)
In the case of max_scan_ssids=1 we may fallback to normal scan
if there's a single scan_ssid network. However the normal scan
can't add a wildcard SSID to the ssid list as it's limited to a single
entry. This delays getting broadcast scan results.
Always prefer to do a sched scan in such a case.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
In the case of max_scan_ssids=1 we may fallback to normal scan
if there's a single scan_ssid network. However the normal scan
can't add a wildcard SSID to the ssid list as it's limited to a single
entry. This delays getting broadcast scan results.
Always prefer to do a sched scan in such a case.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Disable p2p on wlan0 (JB)
This prevents P2P IEs from being added to probes of scans on the
STA interface. These are not needed and prolong required channel
dwell time and Tx of probes.
This is somewhat of a hack but was a preferred approach on adding
framework changes to add p2p_disabled=1 to p2p_supplicant.conf and
not to wpa_supplicant.conf when both are created from the same template.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
This prevents P2P IEs from being added to probes of scans on the
STA interface. These are not needed and prolong required channel
dwell time and Tx of probes.
This is somewhat of a hack but was a preferred approach on adding
framework changes to add p2p_disabled=1 to p2p_supplicant.conf and
not to wpa_supplicant.conf when both are created from the same template.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
P2P: speed up scans when connecting to persistent GO (UPSTREAM)
In the case of a persistent GO invoking a P2P group by invite
the P2P client starts scanning for the GO but it might still
not be up. If not found the next scan is scheduled for scan_interval
secs but this too long.
Speed up scans to find GO like it's being done in P2P provisioing.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
In the case of a persistent GO invoking a P2P group by invite
the P2P client starts scanning for the GO but it might still
not be up. If not found the next scan is scheduled for scan_interval
secs but this too long.
Speed up scans to find GO like it's being done in P2P provisioing.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
wpa_s: fix bss selection on identical SSIDs with WEP+AES/TKIP
Configuring two identical SSIDs - one with WEP-SHARED
security and one with AES/TKIP breaks any authentication
attempt with WEP-SHARED SSID.
Reason for this behavior is that during BSS selection
from the priority group wrong BSS (with AES/TKIP) was
selected. Fix this by disallowing "non-WPA/WPA2" BSS
selection with defined rsn_ie/wpa_ie.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Configuring two identical SSIDs - one with WEP-SHARED
security and one with AES/TKIP breaks any authentication
attempt with WEP-SHARED SSID.
Reason for this behavior is that during BSS selection
from the priority group wrong BSS (with AES/TKIP) was
selected. Fix this by disallowing "non-WPA/WPA2" BSS
selection with defined rsn_ie/wpa_ie.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
P2P: cancel action frame offchan wait after recv go neg conf
The missing call to scan_action_done keeps us offchan
on the listen channel for 250ms following sending go neg resp.
In case the oper channel is different from the listen channel
and we're GO a race could lead to start beaconing while offchan.
This causes the beacons to go out on the listen channel instead
of the oper channel.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
The missing call to scan_action_done keeps us offchan
on the listen channel for 250ms following sending go neg resp.
In case the oper channel is different from the listen channel
and we're GO a race could lead to start beaconing while offchan.
This causes the beacons to go out on the listen channel instead
of the oper channel.
Signed-off-by: Eyal Shapira <eyal@wizery.com>