wlcore: CAC only in case of usable DFS channel
The current flow of configuring the ap (including channel
contexts) after the initial CAC is completed, results in
another quick CAC (start + stop) being sent, which
the phy doesn't handle well.
Look for the channel dfs state when radar_enabled is set,
and start CAC only if the channel is usable.
Signed-off-by: Eliad Peller <eliad@wizery.com>
The current flow of configuring the ap (including channel
contexts) after the initial CAC is completed, results in
another quick CAC (start + stop) being sent, which
the phy doesn't handle well.
Look for the channel dfs state when radar_enabled is set,
and start CAC only if the channel is usable.
Signed-off-by: Eliad Peller <eliad@wizery.com>
9 years agomac80211: update dot11MulticastTransmittedFrameCount correctly ol_r8.a9.18 ol_r8.a9.19 ol_r8.a9.20
mac80211: update dot11MulticastTransmittedFrameCount correctly
dot11MulticastTransmittedFrameCount should be updated according
to the DA, which might be different from hdr1.
(Checking hdr1 results in the counter being 0, as TODS frames
use hdr1 for the bssid address)
Signed-off-by: Eliad Peller <eliad@wizery.com>
dot11MulticastTransmittedFrameCount should be updated according
to the DA, which might be different from hdr1.
(Checking hdr1 results in the counter being 0, as TODS frames
use hdr1 for the bssid address)
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: don't WARN_ON in case of existing ROC
When working with AP + P2P, it's possible to get into
a state when the AP is in ROC (due to assiciating station)
while trying to ROC on the P2P interface.
Replace the WARN_ON with wl1271_error to avoid warnings
in this case.
Signed-off-by: Eliad Peller <eliad@wizery.com>
When working with AP + P2P, it's possible to get into
a state when the AP is in ROC (due to assiciating station)
while trying to ROC on the P2P interface.
Replace the WARN_ON with wl1271_error to avoid warnings
in this case.
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: allow ROC while radar detect is enabled
remove the check for radar_detect_enabled when
starting ROC, as we support it.
should be squashed with:
"mac80211: allow scanning while radar detect is enabled"
TODO:
1. add hw flag
2. it doesn't make sense to queue the ROC in such case
(as it might take a while), but simply return -EBUSY
3. radar_detect_enabled never get cleared on channel removal
(ieee80211_recalc_radar_chanctx() is not being called)
Signed-off-by: Eliad Peller <eliad@wizery.com>
remove the check for radar_detect_enabled when
starting ROC, as we support it.
should be squashed with:
"mac80211: allow scanning while radar detect is enabled"
TODO:
1. add hw flag
2. it doesn't make sense to queue the ROC in such case
(as it might take a while), but simply return -EBUSY
3. radar_detect_enabled never get cleared on channel removal
(ieee80211_recalc_radar_chanctx() is not being called)
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: remove redundant wlcore_probe_of error message (SQUASH)
The fallback might succeed, so don't print confusing
error message at this stage (another one will be printed
if the fallback will fall as well)
Signed-off-by: Eliad Peller <eliad@wizery.com>
The fallback might succeed, so don't print confusing
error message at this stage (another one will be printed
if the fallback will fall as well)
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: properly flush delayed scan work on interface removal
When an interface is deleted, an ongoing hardware scan is canceled and
the driver must abort the scan, at the very least reporting completion
while the interface is removed.
However, if it scheduled the work that might only run after everything
is said and done, which leads to cfg80211 warning that the scan isn't
reported as finished yet; this is no fault of the driver, it already
did, but mac80211 hasn't processed it.
To fix this situation, flush the delayed work when the interface being
removed is the one that was executing the scan.
Reported-by: Sujith Manoharan <sujith@msujith.org>
Tested-by: Sujith Manoharan <sujith@msujith.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
When an interface is deleted, an ongoing hardware scan is canceled and
the driver must abort the scan, at the very least reporting completion
while the interface is removed.
However, if it scheduled the work that might only run after everything
is said and done, which leads to cfg80211 warning that the scan isn't
reported as finished yet; this is no fault of the driver, it already
did, but mac80211 hasn't processed it.
To fix this situation, flush the delayed work when the interface being
removed is the one that was executing the scan.
Reported-by: Sujith Manoharan <sujith@msujith.org>
Tested-by: Sujith Manoharan <sujith@msujith.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
wlcore/wl18xx: handle rc updates in a separate work
sta_rc_update runs in atomic context. thus, a new work
should be scheduled in order to configure the fw
with the required configuration.
Signed-off-by: Eliad Peller <eliad@wizery.com>
sta_rc_update runs in atomic context. thus, a new work
should be scheduled in order to configure the fw
with the required configuration.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: add antenna diversity reading
update the rssi reading on rx_status
to read both RSSI level (7 bits) and
antenna diversity (msb)
Signed-off-by: Guy Mishol <guym@ti.com>
update the rssi reading on rx_status
to read both RSSI level (7 bits) and
antenna diversity (msb)
Signed-off-by: Guy Mishol <guym@ti.com>
wlcore/wl18xx: add radar_debug_mode handling
add debugfs key to set/clear radar_debug_mode.
in this mode, the driver simply ignores radar
events (but prints them).
the fw is also notified about this mode through
a special generic_cfg_feature command.
this mode is relevant only for ap mode. look for
it when initializing ap vif.
Signed-off-by: Eliad Peller <eliad@wizery.com>
add debugfs key to set/clear radar_debug_mode.
in this mode, the driver simply ignores radar
events (but prints them).
the fw is also notified about this mode through
a special generic_cfg_feature command.
this mode is relevant only for ap mode. look for
it when initializing ap vif.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: add generic_cfg_feature command definitions
Add definitions and function prototypes for generic_cfg
command.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Add definitions and function prototypes for generic_cfg
command.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Revert "mac80211: add radar_debug_mode debugfs file"
This reverts commit e00b036bb6f2f8ed092d536d341ac618d525e6dc.
do it in wlcore instead (as we need to configure the fw as well)
Signed-off-by: Eliad Peller <eliad@wizery.com>
This reverts commit e00b036bb6f2f8ed092d536d341ac618d525e6dc.
do it in wlcore instead (as we need to configure the fw as well)
Signed-off-by: Eliad Peller <eliad@wizery.com>
wl18xx: add radar type on radar detection event
The radar type is sent on radar detection event in addition
to the channel number.
Signed-off-by: Guy Mishol <guym@ti.com>
Signed-off-by: Yaniv Machani <yanivma@ti.com>
The radar type is sent on radar detection event in addition
to the channel number.
Signed-off-by: Guy Mishol <guym@ti.com>
Signed-off-by: Yaniv Machani <yanivma@ti.com>
mac80211: add radar_debug_mode debugfs file
add radar debug mode to allow testing the radar
functionality (without having any effect)
Signed-off-by: Eliad Peller <eliad@wizery.com>
add radar debug mode to allow testing the radar
functionality (without having any effect)
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: check request is not null in wl1271_reg_notify (SQUASH)
request can be NULL (in case of radar update), so check
before dereferencing it.
should be squashed into aeab4cf ("wlcore: add dfs region to
reg domain update cmd")
Signed-off-by: Eliad Peller <eliad@wizery.com>
request can be NULL (in case of radar update), so check
before dereferencing it.
should be squashed into aeab4cf ("wlcore: add dfs region to
reg domain update cmd")
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: add dfs region to reg domain update cmd
The dfs region was added to the reg domain
channel update command.
Signed-off-by: Guy Mishol <guym@ti.com>
The dfs region was added to the reg domain
channel update command.
Signed-off-by: Guy Mishol <guym@ti.com>
wlcore: remove IBSS support indication
IBSS is not supported any more.
remove BIT(NL80211_IFTYPE_ADHOC) from
wl->hw->wiphy->interface_modes
Signed-off-by: Guy Mishol <guym@ti.com>
IBSS is not supported any more.
remove BIT(NL80211_IFTYPE_ADHOC) from
wl->hw->wiphy->interface_modes
Signed-off-by: Guy Mishol <guym@ti.com>
wl18xx: allow ap+p2p combinations
Allow ap+p2p_go single channel and ap+p2p_cl
multi-channel combinations
Signed-off-by: Guy Mishol <guym@ti.com>
Allow ap+p2p_go single channel and ap+p2p_cl
multi-channel combinations
Signed-off-by: Guy Mishol <guym@ti.com>
wlcore: always set MMC_PM_KEEP_POWER (workaround)
Due to some mmc layer issues, the system automatically
powers us up on resume, which later cause issues when
we try to restore_power again explicitly.
temporarily workaround it by always asking to keep power.
this is fine as driver controls the chip power anyway.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
Due to some mmc layer issues, the system automatically
powers us up on resume, which later cause issues when
we try to restore_power again explicitly.
temporarily workaround it by always asking to keep power.
this is fine as driver controls the chip power anyway.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
wlcore : Version release string update (INTERNAL)
Updated to ol_r8.a9.14
Signed-off-by: Yaniv Machani <yanivma@ti.com>
Updated to ol_r8.a9.14
Signed-off-by: Yaniv Machani <yanivma@ti.com>
mac80211: avoid deleting unreg_list (INTERNAL)
commit 87757a9 ("net: force a list_del() in
unregister_netdevice_many()") changed unregister_netdevice_many()
to delete the list by itself, and removing the list_del
from ieee80211_remove_interfaces().
Some kernels backport this patch, resulting in unreg_list
bein deleted twice (which cause panic). avoid it by not
deleting unreg_list.
In order to avoid leaving active list head on stack (see
commit f87e6f4) if the "old" unregister_netdevice_many()
is used, convert unreg_list to static struct.
Signed-off-by: Eliad Peller <eliad@wizery.com>
commit 87757a9 ("net: force a list_del() in
unregister_netdevice_many()") changed unregister_netdevice_many()
to delete the list by itself, and removing the list_del
from ieee80211_remove_interfaces().
Some kernels backport this patch, resulting in unreg_list
bein deleted twice (which cause panic). avoid it by not
deleting unreg_list.
In order to avoid leaving active list head on stack (see
commit f87e6f4) if the "old" unregister_netdevice_many()
is used, convert unreg_list to static struct.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: backport wlcore_probe_of() function from upstream (INTERNAL)
we want to be able to recognize kernels using the updated
DT structure as well, so backport the parsing function.
Signed-off-by: Eliad Peller <eliad@wizery.com>
we want to be able to recognize kernels using the updated
DT structure as well, so backport the parsing function.
Signed-off-by: Eliad Peller <eliad@wizery.com>
netdevice: add queue selection fallback handler for ndo_select_queue
Add a new argument for ndo_select_queue() callback that passes a
fallback handler. This gets invoked through netdev_pick_tx();
fallback handler is currently __netdev_pick_tx() as most drivers
invoke this function within their customized implementation in
case for skbs that don't need any special handling. This fallback
handler can then be replaced on other call-sites with different
queue selection methods (e.g. in packet sockets, pktgen etc).
This also has the nice side-effect that __netdev_pick_tx() is
then only invoked from netdev_pick_tx() and export of that
function to modules can be undone.
Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Add a new argument for ndo_select_queue() callback that passes a
fallback handler. This gets invoked through netdev_pick_tx();
fallback handler is currently __netdev_pick_tx() as most drivers
invoke this function within their customized implementation in
case for skbs that don't need any special handling. This fallback
handler can then be replaced on other call-sites with different
queue selection methods (e.g. in packet sockets, pktgen etc).
This also has the nice side-effect that __netdev_pick_tx() is
then only invoked from netdev_pick_tx() and export of that
function to modules can be undone.
Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore/wl18xx/wl12xx: convert bitmaps to unsigned longs
The *_bit operations expects unsigned longs.
Instead of casting the pointers, simply define various
bitmaps as unsigned long (instead of u32).
Signed-off-by: Eliad Peller <eliad@wizery.com>
The *_bit operations expects unsigned longs.
Instead of casting the pointers, simply define various
bitmaps as unsigned long (instead of u32).
Signed-off-by: Eliad Peller <eliad@wizery.com>
wl18xx: make sure fw_status->priv exists before deref
In some corner cases with specific timings, we might
try dequeueing tx before we got information about
the link status (e.g. due to recovery during tx).
Instead of NULL dereference, assume all
the links in this case have low priorities.
Signed-off-by: Eliad Peller <eliad@wizery.com>
In some corner cases with specific timings, we might
try dequeueing tx before we got information about
the link status (e.g. due to recovery during tx).
Instead of NULL dereference, assume all
the links in this case have low priorities.
Signed-off-by: Eliad Peller <eliad@wizery.com>
9 years agocfg80211: add debugfs file to reset dfs channels (INTERNAL) ap_dfs_mbss_all R8.4 ol_r8.a9.14
cfg80211: add debugfs file to reset dfs channels (INTERNAL)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
cfg80211: don't WARN if CAC ended prematurely (INTERNAL)
this can happen when we "optimize" CAC management
and end all the relevant CACs when one of them
was finished.
Signed-off-by: Eliad Peller <eliad@wizery.com>
this can happen when we "optimize" CAC management
and end all the relevant CACs when one of them
was finished.
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: disable CAC works on CAC optimization (squash)
disable pending CAC works when we signal CAC finished
for other interfaces.
Signed-off-by: Eliad Peller <eliad@wizery.com>
disable pending CAC works when we signal CAC finished
for other interfaces.
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: fix use-after-free on CSA (squash)
the channel context was rcu freed, but then it
was used again. move the kfree_rcu call after it.
Signed-off-by: Eliad Peller <eliad@wizery.com>
the channel context was rcu freed, but then it
was used again. move the kfree_rcu call after it.
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: finish all CACs at once
Having one interface beaconing while another one in CAC
(on the same channel) doesn't make much sense, and
introduces issues when radar is detected (because
the CAC moves to a new channel while the AP wasn't
handled yet).
Solve it by simply notifying all the relevant interfaces
when a CAC was finished on any interface.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Having one interface beaconing while another one in CAC
(on the same channel) doesn't make much sense, and
introduces issues when radar is detected (because
the CAC moves to a new channel while the AP wasn't
handled yet).
Solve it by simply notifying all the relevant interfaces
when a CAC was finished on any interface.
Signed-off-by: Eliad Peller <eliad@wizery.com>
cfg80211: fix elapsed_jiffies calculation
MAX_JIFFY_OFFSET has no meaning when calculating the
elapsed jiffies, as jiffies run out until ULONG_MAX.
This miscalculation results in erroneous values
in case of a wrap-around.
(since this function is currently used only
for returning values to userspace (e.g. time
in current dfs state), it's probably not
needed for stable)
Signed-off-by: Eliad Peller <eliad@wizery.com>
MAX_JIFFY_OFFSET has no meaning when calculating the
elapsed jiffies, as jiffies run out until ULONG_MAX.
This miscalculation results in erroneous values
in case of a wrap-around.
(since this function is currently used only
for returning values to userspace (e.g. time
in current dfs state), it's probably not
needed for stable)
Signed-off-by: Eliad Peller <eliad@wizery.com>
cfg80211: disable dfs channel on CAC as well (squash?)
dfs channels were not disabled if the radar event came
during CAC.
refactor the channel disabling code into a separate function,
and call it on CAC as well.
(note: this problem probably introduced by one of our
previous patches, so might have to squash it)
Signed-off-by: Eliad Peller <eliad@wizery.com>
dfs channels were not disabled if the radar event came
during CAC.
refactor the channel disabling code into a separate function,
and call it on CAC as well.
(note: this problem probably introduced by one of our
previous patches, so might have to squash it)
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: move elp_wakeup on op_resume down (SQUASH)
wlcore_irq_locked() wakes up and configures elp into
sleep, so make sure the move the elp_wakeup call
after it.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore_irq_locked() wakes up and configures elp into
sleep, so make sure the move the elp_wakeup call
after it.
Signed-off-by: Eliad Peller <eliad@wizery.com>
9 years agomac80211: use reserved_radar_required also in reserved_compat case ol_r8.a9.10 ol_r8.a9.11
mac80211: use reserved_radar_required also in reserved_compat case
sdata->reserved_radar_required was used only when
ieee80211_vif_use_reserved_incompat was called,
but not with ieee80211_vif_use_reserved_compat,
leading to invalid sdata->radar_required configuration
in some cases.
Signed-off-by: Eliad Peller <eliad@wizery.com>
sdata->reserved_radar_required was used only when
ieee80211_vif_use_reserved_incompat was called,
but not with ieee80211_vif_use_reserved_compat,
leading to invalid sdata->radar_required configuration
in some cases.
Signed-off-by: Eliad Peller <eliad@wizery.com>
9 years agoRevert "nl80211: report stopped sched scan only after driver does (INTERNAL)" ol_r8.a9.09
Revert "nl80211: report stopped sched scan only after driver does (INTERNAL)"
This reverts commit 697a04a5b75e35b7166494deabbdf94f35e8be34.
This reverts commit 697a04a5b75e35b7166494deabbdf94f35e8be34.
mac80211: fix sched_scan restart on recovery
In case we were not suspended, the reconfig function returns without
configuring the scheduled scan.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
In case we were not suspended, the reconfig function returns without
configuring the scheduled scan.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
mac80211: allow scanning while radar detect is enabled
(we might have to add a new hw feature flag for upstream, though)
Signed-off-by: Eliad Peller <eliad@wizery.com>
(we might have to add a new hw feature flag for upstream, though)
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: handle change_chanctx(CHANGE_RADAR) notifications
Due to recent change in mac80211 radar_required calculation
it usually assign chanctx with radar_enabled=false and
changes it only later. start CAC in this case.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Due to recent change in mac80211 radar_required calculation
it usually assign chanctx with radar_enabled=false and
changes it only later. start CAC in this case.
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: consider only relevant vifs for radar_required calculation
no need to consider all the vifs, but only the ones
that have this context assigned.
Signed-off-by: Eliad Peller <eliad@wizery.com>
no need to consider all the vifs, but only the ones
that have this context assigned.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wl18xx: allow dfs in standard combinations as well
Declare support for AP DFS + station on the same channel.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Declare support for AP DFS + station on the same channel.
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: allow multichannel AP DFS + non-AP combinations
narrow down the single-channel DFS limitation only
for AP/GO, in order to allow other harmless combinatios
(e.g. AP DFS + station on different channels)
Signed-off-by: Eliad Peller <eliad@wizery.com>
narrow down the single-channel DFS limitation only
for AP/GO, in order to allow other harmless combinatios
(e.g. AP DFS + station on different channels)
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: move wl1271_configure_wowlan call back to the correct place (SQUASH)
commit "wlcore: enable AP wowlan" moved wl1271_configure_wowlan
call from wl1271_configure_resume to wl1271_op_resume, making it
being called also in some invalid scenarios (e.g. not connected
station).
move it back to wl1271_configure_resume and simply consider
the started ap case as well.
Signed-off-by: Eliad Peller <eliad@wizery.com>
commit "wlcore: enable AP wowlan" moved wl1271_configure_wowlan
call from wl1271_configure_resume to wl1271_op_resume, making it
being called also in some invalid scenarios (e.g. not connected
station).
move it back to wl1271_configure_resume and simply consider
the started ap case as well.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: remove redundant elp_wakeup/sleep in suspend/resume (SQUASH)
commit "wlcore: add ability to reduce FW interrupts during suspend"
added elp_wakeup/sleep calls to wl1271_op_suspend/resume, but didn't
remove the respective calls from the inner functions.
Signed-off-by: Eliad Peller <eliad@wizery.com>
commit "wlcore: add ability to reduce FW interrupts during suspend"
added elp_wakeup/sleep calls to wl1271_op_suspend/resume, but didn't
remove the respective calls from the inner functions.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: fix op_suspend "if" block (SQUASH)
commit "wlcore: add ability to reduce FW interrupts during suspend"
added parenthesis in the wrong place, preventing the mutex
from being released. fix it.
Signed-off-by: Eliad Peller <eliad@wizery.com>
commit "wlcore: add ability to reduce FW interrupts during suspend"
added parenthesis in the wrong place, preventing the mutex
from being released. fix it.
Signed-off-by: Eliad Peller <eliad@wizery.com>
nl80211: make the custom attributes a bit more future-proof (INTERNAL)
This way we should be able to rebase our version easily
without breaking userspace.
Signed-off-by: Eliad Peller <eliad@wizery.com>
This way we should be able to rebase our version easily
without breaking userspace.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wl18xx: increase simple config pwd to 64 bit
Simple Config: The password field is now support up to 64bit length.
This change is not backward compatible to previous FWs
so bump the version as well.
Signed-off-by: Guy Mishol <guym@ti.com>
Simple Config: The password field is now support up to 64bit length.
This change is not backward compatible to previous FWs
so bump the version as well.
Signed-off-by: Guy Mishol <guym@ti.com>
wl12xx/wl18xx: temporarily disable rx stbc (INTERNAL)
The certification requires rx stbc disabled in the OOB
configuration, so temporarily disable it for now.
Signed-off-by: Eliad Peller <eliad@wizery.com>
The certification requires rx stbc disabled in the OOB
configuration, so temporarily disable it for now.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: use correct LAA bit
The LAA bit is BIT(1) of the MSB, not of the
third byte.
Signed-off-by: Eliad Peller <eliad@wizery.com>
The LAA bit is BIT(1) of the MSB, not of the
third byte.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore/wl18xx: add elp calls to radar_detection debugfs (SQUASH)
export the ps_elp_sleep/wakeup in order to be able
to call them from wl18xx.
Signed-off-by: Eliad Peller <eliad@wizery.com>
export the ps_elp_sleep/wakeup in order to be able
to call them from wl18xx.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: add missing elp calls to dfs assign/unassign (squash)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Makefile: take release_version.h from src instead of obj (INTERNAL)
This should fix some out-of-tree compilation errors.
Signed-off-by: Eliad Peller <eliad@wizery.com>
This should fix some out-of-tree compilation errors.
Signed-off-by: Eliad Peller <eliad@wizery.com>
cfg80211: add dfs_cac/nop_time_ms module params (INTERNAL)
Add new cac_time_ms module param to allow setting
the dfs CAC and NOP times (in milliseconds)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Add new cac_time_ms module param to allow setting
the dfs CAC and NOP times (in milliseconds)
Signed-off-by: Eliad Peller <eliad@wizery.com>
wl18xx: fix last tx rate calculation
The last tx rate calculation didn't take into account
the different indices of 11a and 11g rates tables.
Add the required alignment (count only from the first
11a rate in case of 11a)
Signed-off-by: Eliad Peller <eliad@wizery.com>
The last tx rate calculation didn't take into account
the different indices of 11a and 11g rates tables.
Add the required alignment (count only from the first
11a rate in case of 11a)
Signed-off-by: Eliad Peller <eliad@wizery.com>
regulatory: don't rule out some valid rules
commit 6d87df6 ("regdb: allow 40 MHz on world roaming
channels 12/13") in wireless-regdb did the following
change:
- # Channel 12 - 13. No HT40 channel fits here
- (2457 - 2482 @ 20), (3, 20), PASSIVE-SCAN, NO-IBSS
+ # Channel 12 - 13.
+ (2457 - 2482 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
in order to allow HT40+ on lower channels (such as 9).
However, the current regulatory rules verification forbids
such rules, as 2482 - 2457 < 40.
Remove this requirement from the rules verification function.
Signed-off-by: Eliad Peller <eliad@wizery.com>
commit 6d87df6 ("regdb: allow 40 MHz on world roaming
channels 12/13") in wireless-regdb did the following
change:
- # Channel 12 - 13. No HT40 channel fits here
- (2457 - 2482 @ 20), (3, 20), PASSIVE-SCAN, NO-IBSS
+ # Channel 12 - 13.
+ (2457 - 2482 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
in order to allow HT40+ on lower channels (such as 9).
However, the current regulatory rules verification forbids
such rules, as 2482 - 2457 < 40.
Remove this requirement from the rules verification function.
Signed-off-by: Eliad Peller <eliad@wizery.com>
cfg80211: regulatory: fix some kernel panic (INTERNAL)
don't kfree the last request
This was fixed upstream by:
c888393 cfg80211: avoid freeing last_request while in flight
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
don't kfree the last request
This was fixed upstream by:
c888393 cfg80211: avoid freeing last_request while in flight
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: wl18xx: change the number of WLAN addrs per chip
Each 18xx chip contains only 2 real MAC addresses usable for WLAN,
forcing us to use the LAA bit approach to obtain a third MAC address.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Each 18xx chip contains only 2 real MAC addresses usable for WLAN,
forcing us to use the LAA bit approach to obtain a third MAC address.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
wlcore: enable sleep during AP mode operation
Enable ELP authorization in AP mode and enable the use of the wakeup bit
in the ELP register.
Introduce AP role sleep configuration which is disabled by default. When
configured, it allows the AP to actually sleep when ELP is authorized
for it.
Signed-off-by: Kobi L <kobi.lev100@gmail.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Enable ELP authorization in AP mode and enable the use of the wakeup bit
in the ELP register.
Introduce AP role sleep configuration which is disabled by default. When
configured, it allows the AP to actually sleep when ELP is authorized
for it.
Signed-off-by: Kobi L <kobi.lev100@gmail.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
wlcore: enable AP wowlan
configure wowlan when host is suspended in AP mode, since the FW can now
wake the host up on Rx.
Signed-off-by: Kobi L <kobi.lev100@gmail.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
configure wowlan when host is suspended in AP mode, since the FW can now
wake the host up on Rx.
Signed-off-by: Kobi L <kobi.lev100@gmail.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
wlcore: add ability to reduce FW interrupts during suspend
Added the ability to mask FW interrupts on RX BA activity, PSM
entry/exit and fast-link notifications. This is used when the host
is suspended in order to decrease redundant wake ups.
Signed-off-by: Ram Amrani <ramrani@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Added the ability to mask FW interrupts on RX BA activity, PSM
entry/exit and fast-link notifications. This is used when the host
is suspended in order to decrease redundant wake ups.
Signed-off-by: Ram Amrani <ramrani@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
wlcore: use $(PWD) for file existence checking
When checking for git existence in wlcore's Makefile,
use $(PWD), as the built-in wildcard function returns
unexpected results when working against remote
makefile (e.g. when using backports).
Signed-off-by: Eliad Peller <eliad@wizery.com>
When checking for git existence in wlcore's Makefile,
use $(PWD), as the built-in wildcard function returns
unexpected results when working against remote
makefile (e.g. when using backports).
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: avoid referencing pdata->gpio if irq is defined (INTERNAL)
Older kernel might not have gpio memeber in their platform_data,
resulting in unintialized pdata->gpio being freed.
Since the gpio and irq are mutual exclusive, free the gpio
only if irq not defined.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Older kernel might not have gpio memeber in their platform_data,
resulting in unintialized pdata->gpio being freed.
Since the gpio and irq are mutual exclusive, free the gpio
only if irq not defined.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wl12xx : move platform_data->gpio to match old kernels (INTERNAL)
Older kernels don't have the gpio field defined.
In order to be able to work against them, move the gpio
field to the end of the struct, and add a comment
to avoid using it if unsure.
(it is safe to use it if the whole struct is defined
by the driver, specifically in the case of device-tree
without platform_data defined in the kernel)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Older kernels don't have the gpio field defined.
In order to be able to work against them, move the gpio
field to the end of the struct, and add a comment
to avoid using it if unsure.
(it is safe to use it if the whole struct is defined
by the driver, specifically in the case of device-tree
without platform_data defined in the kernel)
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: recalc radar correctly on channel switch
When creating a new context, its radar_enabled is set
according to the current sdata configuration.
However, since we change the sdata right after creating
the context, we need to recalc.
This should be done before assigning the vif, as
otherwise we'll try CAC on invalid channels.
Signed-off-by: Eliad Peller <eliad@wizery.com>
When creating a new context, its radar_enabled is set
according to the current sdata configuration.
However, since we change the sdata right after creating
the context, we need to recalc.
This should be done before assigning the vif, as
otherwise we'll try CAC on invalid channels.
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: allow injecting frames on usable dfs channels
mac80211 drops any injected frame on dfs channels, even
if the channel is usable. This cause troubles when
working with old kernel/supplicant that use
monitor interface for AP mode.
Fix it by allowing injection if beaconing is allowed
for this chandef.
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211 drops any injected frame on dfs channels, even
if the channel is usable. This cause troubles when
working with old kernel/supplicant that use
monitor interface for AP mode.
Fix it by allowing injection if beaconing is allowed
for this chandef.
Signed-off-by: Eliad Peller <eliad@wizery.com>
enable channel switch again
fix some recent dfs bugs
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: change current dir before running git describe (INTERNAL)
git describe --dirty doesn't work well when specfiying
git-dir and work-tree parameters (git diff-index doesn't
run against the work-tree, resulting in -dirty always
being set).
workaround it by changing the current directory to the
git directory before running the command.
Signed-off-by: Eliad Peller <eliad@wizery.com>
git describe --dirty doesn't work well when specfiying
git-dir and work-tree parameters (git diff-index doesn't
run against the work-tree, resulting in -dirty always
being set).
workaround it by changing the current directory to the
git directory before running the command.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: generate version.h from original git in case of backports (INTERNAL)
if we use backports to compile our driver, the compilation
is done on the target kernel, but we want to generate the
version tag from the driver git.
check for the existence of KLIB_BUILD and GIT_TREE params,
and generate version.h from the GIT_TREE if they both
exist.
(note that backports doesn't require GIT_TREE to be
defined, so it has to be part of the build script)
Signed-off-by: Eliad Peller <eliad@wizery.com>
if we use backports to compile our driver, the compilation
is done on the target kernel, but we want to generate the
version tag from the driver git.
check for the existence of KLIB_BUILD and GIT_TREE params,
and generate version.h from the GIT_TREE if they both
exist.
(note that backports doesn't require GIT_TREE to be
defined, so it has to be part of the build script)
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: add explicit version.h dependency (INTERNAL)
There are some reports of compilation errors due
to missing version.h
This probably means that version.h wasn't recognized
as a dependency, and wasn't generated.
Declare this dependency explicitly in order to make
sure version.h will be generated.
Signed-off-by: Eliad Peller <eliad@wizery.com>
There are some reports of compilation errors due
to missing version.h
This probably means that version.h wasn't recognized
as a dependency, and wasn't generated.
Declare this dependency explicitly in order to make
sure version.h will be generated.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: use hardcoded version.h if .git doesn't exist (INTERNAL)
In environments without .git folder,
use release_version.h instead.
Since wlcore's version should be enough,
remove the wl12xx/wl18xx versions.
Signed-off-by: Eliad Peller <eliad@wizery.com>
In environments without .git folder,
use release_version.h instead.
Since wlcore's version should be enough,
remove the wl12xx/wl18xx versions.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Revert "cfg80211: decrease CAC time to 15 seconds (DEBUG)"
This reverts commit 460dbd2cbeddeaa4c4a2a3e2077975f426671723.
Signed-off-by: Eliad Peller <eliad@wizery.com>
This reverts commit 460dbd2cbeddeaa4c4a2a3e2077975f426671723.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: declare support for ht40 dfs as well (squash)
this should be squashed into the iface combination patch
Signed-off-by: Eliad Peller <eliad@wizery.com>
this should be squashed into the iface combination patch
Signed-off-by: Eliad Peller <eliad@wizery.com>
wl18xx: support 2 rx stbc streams
The wl18xx chip supports 2 rx stbc streams.
Declare this support in the ht_cap attributes.
Signed-off-by: Eliad Peller <eliad@wizery.com>
The wl18xx chip supports 2 rx stbc streams.
Declare this support in the ht_cap attributes.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: change wlcore_cmd_dfs_master_restart implementation (squash)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: change dfs_master_restart api (squash)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
wl18xx: fix channel switch supported rates in ap case (squash?)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: stop cac on ap start
(do we want to re-start it on ap stop?)
Signed-off-by: Eliad Peller <eliad@wizery.com>
(do we want to re-start it on ap stop?)
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: update channel info on op_change_chanctx
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: consider dfs in regdomain configuration
consider the channel available in case of dfs
channel with dfs_available state.
TODO: we might want to no automatically set
NO_IR in case of radar (instead of setting
it and then checking for it explicitly here...)
Signed-off-by: Eliad Peller <eliad@wizery.com>
consider the channel available in case of dfs
channel with dfs_available state.
TODO: we might want to no automatically set
NO_IR in case of radar (instead of setting
it and then checking for it explicitly here...)
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: add dfs master restart calls
call wlcore_cmd_dfs_master_restart when starting
the ap on a new channel.
Add a new WLVIF_FLAG_BEACON_DISABLED flag to
indicate that dfs_master_restart command
is required.
Signed-off-by: Eliad Peller <eliad@wizery.com>
call wlcore_cmd_dfs_master_restart when starting
the ap on a new channel.
Add a new WLVIF_FLAG_BEACON_DISABLED flag to
indicate that dfs_master_restart command
is required.
Signed-off-by: Eliad Peller <eliad@wizery.com>
cfg80211: notify dfs state changes
call the reg notifier on dfs state changes
Signed-off-by: Eliad Peller <eliad@wizery.com>
call the reg notifier on dfs state changes
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: add support for ap csa
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: report radar events with chanctx as well
TODO: get channel as param, etc.
Signed-off-by: Eliad Peller <eliad@wizery.com>
TODO: get channel as param, etc.
Signed-off-by: Eliad Peller <eliad@wizery.com>
cfg80211: decrease CAC time to 15 seconds (DEBUG)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: fix reporting of radar detection during CAC
Currently, when radar is detected during CAC, we
first cancel the cac (with CAC_ABORTED event) and
only then report RADAR_DETECTED.
This confuses userspace, as it reacts to the CAC_ABORTED
as CAC wasn't completed successfully.
Add event type to ieee80211_dfs_cac_cancel(), send
only RADAR_DETECTED event in this case.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Currently, when radar is detected during CAC, we
first cancel the cac (with CAC_ABORTED event) and
only then report RADAR_DETECTED.
This confuses userspace, as it reacts to the CAC_ABORTED
as CAC wasn't completed successfully.
Add event type to ieee80211_dfs_cac_cancel(), send
only RADAR_DETECTED event in this case.
Signed-off-by: Eliad Peller <eliad@wizery.com>
cfg80211: allow sending RADAR_DETECTED cac event
When radar was detected during cac, we should
just send RADAR_DETECTED event and stop the cac.
Make NL80211_RADAR_DETECTED a valid event param.
Signed-off-by: Eliad Peller <eliad@wizery.com>
When radar was detected during cac, we should
just send RADAR_DETECTED event and stop the cac.
Make NL80211_RADAR_DETECTED a valid event param.
Signed-off-by: Eliad Peller <eliad@wizery.com>
dfs: initial dfs commands implementation
Bump fw version to 8.9.*.*.1
Bump fw file name to wl18xx-fw-4.bin
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Guy Mishol <guym@ti.com>
Bump fw version to 8.9.*.*.1
Bump fw file name to wl18xx-fw-4.bin
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Guy Mishol <guym@ti.com>
declare support for ap dfs
and allow chanctx + dfs
Signed-off-by: Eliad Peller <eliad@wizery.com>
and allow chanctx + dfs
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: fix unused variables warnings (SQUASH)
If CONFIG_OF is not defined, the compiler complains about
some unused variables. solve it.
This patch should be squashed into
"wlcore: ifdef CONFIG_OF-dependant functions"
Signed-off-by: Eliad Peller <eliad@wizery.com>
If CONFIG_OF is not defined, the compiler complains about
some unused variables. solve it.
This patch should be squashed into
"wlcore: ifdef CONFIG_OF-dependant functions"
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: fix wowlan-related compilation error (squash, ANDROID)
The wowlan structs were changed a bit, so we
need to update our workaround patch as well.
should be squashed into
7ecbdd6 ('wlcore: set "any" trigger by default (ANDROID)')
Signed-off-by: Eliad Peller <eliad@wizery.com>
The wowlan structs were changed a bit, so we
need to update our workaround patch as well.
should be squashed into
7ecbdd6 ('wlcore: set "any" trigger by default (ANDROID)')
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211/drivers: fix remain_on_channel(_expired) users (SQUASH)
commit ec79d1b ("mac80211: add cookie to remain_on_channel callback")
broke the compilation of some drivers. fix it.
additionally, allow passing 0 as wildcard cookie.
Signed-off-by: Eliad Peller <eliad@wizery.com>
commit ec79d1b ("mac80211: add cookie to remain_on_channel callback")
broke the compilation of some drivers. fix it.
additionally, allow passing 0 as wildcard cookie.
Signed-off-by: Eliad Peller <eliad@wizery.com>
mac80211: use skb_tail_pointer (squash)
commit 7ae5c8e ("mac80211: extract basic rates on start_ap")
used skb->tail directly, which might generate warnings
under some configurations. use skb_tail_pointer() instead.
Signed-off-by: Eliad Peller <eliad@wizery.com>
commit 7ae5c8e ("mac80211: extract basic rates on start_ap")
used skb->tail directly, which might generate warnings
under some configurations. use skb_tail_pointer() instead.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wl18xx: update statistics acx and debugfs files
Sync the driver statistics acx and debugfs representation
with the current fw api.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Sync the driver statistics acx and debugfs representation
with the current fw api.
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: ifdef CONFIG_OF-dependant functions
some of_* functions are defined only if CONFIG_OF
is defined. make the relevant block dependant
on it.
make sure to handle invalid pdata now, as it might
not get overriden if CONFIG_OF is not defined.
Signed-off-by: Eyal Reizer <eyalr@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
some of_* functions are defined only if CONFIG_OF
is defined. make the relevant block dependant
on it.
make sure to handle invalid pdata now, as it might
not get overriden if CONFIG_OF is not defined.
Signed-off-by: Eyal Reizer <eyalr@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: configure rate policies for p2p mgmt interface (INTERNAL)
Otherwise p2p packets come out with arbitrary rates.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Otherwise p2p packets come out with arbitrary rates.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
wlcore: block most mac80211 ops on p2p mgmt iface (INTERNAL)
In general, p2p management interfaces cannot send vif-specific commands
to FW, as the vif role id is invalid. Only off-channel data and scans
happen on this vif, so most ops are not relevant.
If the vif is a p2p mgmt vif, block non relevant mac80211 ops.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
In general, p2p management interfaces cannot send vif-specific commands
to FW, as the vif role id is invalid. Only off-channel data and scans
happen on this vif, so most ops are not relevant.
If the vif is a p2p mgmt vif, block non relevant mac80211 ops.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
wlcore: scan on the dev role for the p2p mgmt iface (INTERNAL)
When starting a p2p mgmt interface, enable its device role. This
allows us to keep the sta role disabled and scan on the dev role.
In the scan code fallback to the dev role if the regular role id is
invalid.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
When starting a p2p mgmt interface, enable its device role. This
allows us to keep the sta role disabled and scan on the dev role.
In the scan code fallback to the dev role if the regular role id is
invalid.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
mac80211: mark the p2p0 interface with a special flag (INTERNAL)
This flag indicates the lower driver the interface will be used for
p2p management operations only (p2p find). This will be superseded
by pending upstream patches making p2p a wdev-only interface.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
This flag indicates the lower driver the interface will be used for
p2p management operations only (p2p find). This will be superseded
by pending upstream patches making p2p a wdev-only interface.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
wl18xx: handle dbg aggr size vs rate in a dedicated function (DEBUG)
Size of the output is approximately 2 pages. I am using seq_file API
to avoid overflow of the output buffer and ensure that all chars are
going through to the user space.
Signed-off-by: Arkady Miasnikov <a-miasnikov@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Size of the output is approximately 2 pages. I am using seq_file API
to avoid overflow of the output buffer and ensure that all chars are
going through to the user space.
Signed-off-by: Arkady Miasnikov <a-miasnikov@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
wlcore: update debugfs for tx aggregation stats
Use allocated size for aggr_pkts_reason instead of define
WLCORE_AGGR_MAX_PACKETS.
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Use allocated size for aggr_pkts_reason instead of define
WLCORE_AGGR_MAX_PACKETS.
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
wlcore: support short and long interval in sched scan (INTERNAL)
Configure sched scan in FW to use a short interval
for the first X cycles and the switch to a longer interval.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Configure sched scan in FW to use a short interval
for the first X cycles and the switch to a longer interval.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>