Commit Graph

505 Commits

Author SHA1 Message Date
ravi vaishnav
6edb33b992 Wifi-3490. Opensync workaround for 0 NF reported.
Sometimes, the driver reports 0 Noise Floor value which is
not a valid data point. Adding a workaround in Opensync layer
to consider previous recorded NF value when 0 NF is reported.

Signed-off-by: ravi vaishnav <ravi.vaishnav@netexperience.com>
2021-08-19 07:01:25 -04:00
Nagendrababu
f4e483f7b4 WIFI-3244-WF610D-Config-Reset-Over-Sysupgrade
This patch will fix configuration restore problem over sysupgrade
on WF610D
Even though there is a configuration data in the /dev/mtdblock12, it is getting erased while reading it beacuse of JFFS2 empty bitmask code. So I added a condition to check whether the datatype available is JFFS2 or not, and making sure it is not empty before returning the JFFS2 flag to restore the configuration.

Signed-off-by: Nagendrababu <nagendrababu.bonkuri@connectus.ai>
v1.2.0 v1.2.0-rc2
2021-08-16 23:46:52 -04:00
ravi vaishnav
4beda3ab66 Wifi-3463. Fix for scan timeout with scan on same interface
Successive scan requests on same interface cause scan timeout.
Scan requests are enqueued at the Opensync layer and is designed
to handle the requests sequentially. If there are successive
scan requests for the same interface, then we end up deleteling
an on-going scan context. This is due to the interface name being
used as key for the AVL entries, and we were trying to reuse the
AVL entry if one already exist.
Solution is to always allocate a new entry without any reuse.

Signed-off-by: ravi vaishnav <ravi.vaishnav@netexperience.com>
2021-08-13 12:19:00 -04:00
Chaitanya Godavarthi
3531b884c1 wifi-3258: Fix bridge client traffic on same wifi interface
Allow bridging broadcast and multicast traffic within same
bridge port if hairpinmode is enabled for that port.
This fixes the ARP packet between clients on same wifi interface
being dropped.

Signed-off-by: Chaitanya Godavarthi <chaitanya.kiran@netexperience.com>
v1.2.0-rc1
2021-08-09 18:39:54 -04:00
Chaitanya Godavarthi
5ef0556406 wifi-3051: Set proper mode & freq in RRM NF chan switch
For RRM noise floor driven channel change:
1. Set HT VHT HE based on the hw_mode
2. Set secondary frequency (center_freq1) based on bandwidth

Signed-off-by: Chaitanya Godavarthi <chaitanya.kiran@netexperience.com>
2021-08-06 09:12:45 -04:00
ravi vaishnav
bdbf536c85 Wifi-3246. Add chan_info data to existing survey info data
The data from the chan_info events were overwriting the data
to the existing survey info counters. The data in the chan_info
events were Read-On-Clear where as the Survey info was maintained
as incremental stats and the application in the User space
performs the calculations based on incremental survey info stats.
As an example, the survey->time was always stored as 150 due to
chan_info event's Clear-On-Read nature. And this lead to the
difference calcuation as 0 at the User space application.

Solution is to add the incoming chan_info data to the existing
survey info stats, instead of replacing the existing data with new.

Signed-off-by: ravi vaishnav <ravi.vaishnav@netexperience.com>
2021-08-05 18:02:32 -04:00
Owen Anderson
80bfd39857 WIFI-3306: Updated the LLDP description with firmware version info and br-wan IP
Signed-off-by: Owen Anderson <owenthomasanderson@gmail.com>
2021-08-05 12:38:44 -04:00
Owen Anderson
d3f8a54de5 WIFI-2059: Removed if statement that blocked some ip updates
Signed-off-by: Owen Anderson <owenthomasanderson@gmail.com>
2021-08-04 11:38:18 -04:00
Yashvardhan
8bec57d411 wifi-3331: Fix opensync Firmware version date format
- Opensync fw version date was getting trimmed.
   This patch fixes the same

Signed-off-by: Yashvardhan <yashvardhan@netexperience.com>
2021-08-03 23:50:02 -04:00
Arif Alam
36b10b5048 WIFI-3023: fix mac assign on ath11k
Port over mac assign fix from v2.

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2021-07-31 08:19:42 -04:00
Chaitanya Godavarthi
a019801c15 wifi-3301:Sync Wifi_associated_Clients if opensync restarts
Query the driver and update the wifi_associated_clients list
during wm initialization.

Signed-off-by: Chaitanya Godavarthi <chaitanya.kiran@netexperience.com>
2021-07-31 08:18:07 -04:00
Yashvardhan
dee3bd0d76 Wifi-3309: Fix Tx power reporting
- AP was not reporting the Channel Tx power currently set in
   the firmware. This patch reads the Tx power from debugFS stats
   and reports it to cloud through Wifi_Radio_State table

Signed-off-by: Yashvardhan <yashvardhan@netexperience.com>
2021-07-31 08:15:39 -04:00
John Crispin
8d09f695a2 ipq807x: fix the reset buttons on the CIG units
Signed-off-by: John Crispin <john@phrozen.org>
2021-07-29 16:43:17 -04:00
Owen Anderson
3a195281a9 WIFI-2844: Removed the fallback case for when country code isn't set
Signed-off-by: Owen Anderson <owenthomasanderson@gmail.com>
2021-07-29 16:37:40 -04:00
Chaitanya Godavarthi
ce33028760 wifi-3288:Fix Associated clients in case of roaming
Associated clients list decrements when client roams
from vifX to vifY. In this case, the client is
first added to the global client list as part of it
associating with vifY (but in actual it doesnt add as
the entry for client already exists) and then deleted
from the same as part of dissassociating from vifX.

Fix is to change the vif the client entry points to
instead of add/delete the client entry.

Signed-off-by: Chaitanya Godavarthi <chaitanya.kiran@netexperience.com>
2021-07-29 16:35:22 -04:00
Owen Anderson
d5320b26c2 WIFI-3236: Added reason code to switch_chan ubus call
Signed-off-by: Owen Anderson <owenthomasanderson@gmail.com>
2021-07-29 14:42:58 -04:00
Yashvardhan
0d48934f34 Wifi-3237: Fix missing and duplicate client events
Some client events are duplicated and some of them are missing in the
client event report.

Root Cause 1: Processed clients events were not tagged in hostapd and
were thus getting duplicated during subsequent polling of client events.
Root Cause 2: Race between processing and clearing of client sessions
was leading to missing events.

Solution 1: Processed client events are tagged in hostapd and are reported only once.
Solution 2: Sessions are cleared only after they are processed by SM.

Also got rid of some unnecessary logs.

Acceptance Criteria: No duplicate client events in the mqtt report send by AP.
Sessions in the hostapd are successfully cleared after being processed by SM.

Signed-off-by: Yashvardhan <yashvardhan@netexperience.com>
2021-07-28 09:59:45 -04:00
Chaitanya Godavarthi
0ec23e8dba wifi-2940: Add ath11k beacon and mcast rate
Add support for changing mcast and beacon rate
in opensync for ath11k
Add debugfs entry for ath11k driver to set mcast,
beacon and mgmt rate.
For help:
cat /sys/kernel/debug/ieee80211/phyX/ath11k/set_rates

Eg: Set beacon rate to 12Mbps for iface wlan0 5G band
echo "wlan0 beacon 5 0x10000002" > /sys/kernel/debug/ieee80211/phy0/ath11k/set_rates

Signed-off-by: Chaitanya Godavarthi <chaitanya.kiran@netexperience.com>
2021-07-28 09:12:46 -04:00
Yashvardhan
0d1096b754 wifi-3203 Fix ath10k version in the rx_bss patch
- Fix rx_bss patch to compile for the current ath10k version used
   which is ath10k-5.7

Signed-off-by: Yashvardhan <yashvardhan@netexperience.com>
2021-07-22 09:54:34 -04:00
Arthur Su
de16ed3a49 wifi-2984: tplink device mount manufacturing data and certificates
The TP-Link device mounts the production_info partition, and apnos will
access the manufacturing data and copy the certificate to its use when
it is first booted.

Signed-off-by: Arthur Su <arthur.su@tp-link.com>

wifi-2984: tplink device mount manufacturing data and certificates

The EX227 and EX447 devices are added ath11k_generate_macs method.

Signed-off-by: Arthur Su <arthur.su@tp-link.com>
2021-07-21 09:54:45 -04:00
Chaitanya Godavarthi
7436923e62 wifi-2982 wifi-2944: Fix DFS channel switch for RRM
Switch to a DFS channel by RRM failed
since cac was not being run. We set the Beacon
CSA IE and reload the interface with new channel.

Signed-off-by: Chaitanya Godavarthi <chaitanya.kiran@netexperience.com>
2021-07-21 09:48:36 -04:00
Owen Anderson
f49c70d864 WIFI-3063: Changed the way that we fetch the interface name so the interface doesn't need to be online
Signed-off-by: Owen Anderson <owenthomasanderson@gmail.com>
2021-07-20 09:44:55 -04:00
Yashvardhan
b613c1815a WIFI-3055: Fix data metric reporting inconsistency
Inconsistency(gaps in reporting) was noticed when metrics were observed
for 24 hours.

Root Cause: One of the sockets created and used in SM for periodic network-probe reporting
was not getting closed. Due to this system wide limit for maximum open file descriptors
was getting exhausted over a period of time and thus not allowing to create any more
sockets to send data.

Signed-off-by: Yashvardhan <yashvardhan@netexperience.com>
2021-07-15 22:43:22 -04:00
Chaitanya Godavarthi
11af12a786 wifi-2981: Send proper mode and freq in channel switching
1. Set HT VHT HE based on the hw_mode
2. Set secondary frequency (center_freq1) based on bandwidth
3. Add HE parameter in ubus call switch_chan

Signed-off-by: Chaitanya Godavarthi <chaitanya.kiran@netexperience.com>
2021-07-15 16:04:15 -04:00
ravi vaishnav
17f86797d7 Wifi-3021. Avoid creating VLAN interface on LAN side
Under Bridged mode of configuration, when creating VLAN interface,
we create VLAN for both WAN and LAN side, whereas LAN side VLAN is
not requried.

Signed-off-by: ravi vaishnav <ravi.vaishnav@netexperience.com>
2021-07-14 18:14:05 -04:00
Arif Alam
29290b5b85 WIFI-2939: Add offset to channel noisefloor
Add offset to channel noisefloor stats.

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2021-07-14 09:12:26 -04:00
Nagendrababu
9796b90bf3 WiFi-1997-LEDs-Incorrect-Service-State
This Patch fixes leds incorrect service state issue, and correct the
label names for all wifi6 APs

Signed-off-by: Nagendrababu <nagendrababu.bonkuri@connectus.ai>
2021-07-13 19:39:30 -04:00
Nagendrababu
bf5fac9d97 WiFi5-APs-LED-label-Name-Change
This patch will change the ecw5410, ecw5211, and wf610D's LED label name

Signed-off-by: Nagendrababu <nagendrababu.bonkuri@connectus.ai>
2021-07-13 19:34:02 -04:00
Owen Anderson
52867a65b4 WIFI-2814: Removed duplicate entries from hostapd.sh
Signed-off-by: Owen Anderson <owenthomasanderson@gmail.com>
2021-07-13 19:19:33 -04:00
Arthur Su
95f43d6da0 WIFI-2978 - Fix EC420 reset button
The EC420 reset button don't work, so it cannot be restarted or restored
to factory settings. The reset button is fixed to gpio18.

Signed-off-by: Arthur Su <arthur.su@tp-link.com>
2021-07-13 19:15:16 -04:00
Yashvardhan
60072a8ad6 ath10/11k: Report amount of time the radio spent receiving data on a local BSS
- Currently ath10/11k reports time_bss_rx (amount of time the radio spent receiving data on a local BSS)
   inside time_rx (amount of time the radio spent receiving data). This patch fixes the behavior.
 - Added support to report time_bss_rx over nl80211

Signed-off-by: Yashvardhan <yashvardhan@netexperience.com>
2021-07-08 14:00:01 -04:00
Yashvardhan
6ca49d80fc WIFI-2954 - Fix channel survey dump
Channel time, busy and other survey counters are showing incorrect values (less than previous or sometimes zero).
Consecutive survey dumps are expected to return monotonically increasing counter values.

Root Cause:
Clear on read in ath10k was leading to this issue.

Solution: Use the non-clearing
WMI_BSS_SURVEY_REQ_TYPE_READ wmi_bss_survey_req_type

Note: ath11k already has this fix.

Patch also fixes the utilization percentage calculation for different survey parameters in opensync

Signed-off-by: Yashvardhan <yashvardhan@netexperience.com>
2021-07-08 13:55:40 -04:00
ravi vaishnav
3cefdead18 Wifi-2952. Fix for flooding client events for Auth and Assoc
Sometimes we see a Client session created with sessionId=0,
and this never gets deleted. The AP keep on sending this event
as long as it exist in the events list.
SessionId=0 is invalid. Adding checks to avoid creating session
with Id=0. Also added a check in the opensync ubus to skip
already processed events.

Signed-off-by: ravi vaishnav <ravi.vaishnav@netexperience.com>
2021-07-07 23:41:09 -04:00
Ammad Rehmat
f5470bf439 Wifi-2538 : clients dropped on RRM rebalance
Add rrm channel setting through radio config. This
allows channel change through radio config in the
case where vif is not reloaded.

The below commit disables reload of vif when setting
RRM parameters:
"wifi-2648:Config RRM params without wifi vif reload"

Signed-off-by: Ammad Rehmat <ammad.rehmat@connectus.ai>
Signed-off-by: Chaitanya Godavarthi <chaitanya.kiran@netexperience.com>
2021-07-06 22:07:47 -04:00
Chaitanya Godavarthi
519898ea3b wifi-2648:Config RRM params without wifi vif reload
Configure the following without vif reload:
Tx power
probe_response_threshold
client disconnect threshold
Beacon and multicast rates

Signed-off-by: Chaitanya Godavarthi <chaitanya.kiran@netexperience.com>
2021-07-06 15:53:22 -04:00
Arif Alam
dedbb75ae6 WIFI-2626: radius proxy: fix wildcard realm config
Wildcard realm needs to be configured as the very last item.

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2021-07-05 14:39:21 -04:00
Arif Alam
837b4511a1 WIFI-2691: Enable proxy arp by default
wifi6 AP does not forward broadcast ARP request sent from one wifi
client to another wifi client.  Enable proxy arp by default to have the
AP respond to ARP requests on behalf of the client.

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2021-07-04 14:37:44 -04:00
Owen Anderson
bab7b18724 WIFI-2594: Added functionality to close lan ssh port in deployment
Signed-off-by: Owen Anderson <owenthomasanderson@gmail.com>
Signed-off-by: Yashvardhan <yashvardhan@netexperience.com>
2021-06-29 22:16:35 -04:00
Owen Anderson
5bf882b0e0 WIFI-2681: Allow re-trying a failed upgrade
Signed-off-by: Owen Anderson <owenthomasanderson@gmail.com>
2021-06-25 15:24:37 -04:00
ravi vaishnav
0546954693 Wifi-2690. ipq807x:Enable bridge-mgr to control port mac address learning
Merging from uCentral-trunk.
The switch in the IPQ807x/IPQ60xx devices will automatically learn the mac
addresses behind a port. But it will not unlearn this entry when some mac
switches from the ethernet port to the CPU port. This will for example
happens when a device roams from on AP to another AP. At least when both
are APs are bridging the wifi traffic directly or indirectly (mesh) to the
same ethernet broadcast domain.

As result, the roaming device can no longer receive any ethernet packets
which the AP is expected to receive on the ethernet port. This state will
be kept for a couple of minutes until the entry in the FDB is dropped
automatically. But it is still possible for the wifi device to send data
via the ethernet during this whole time.

One solution is to just disable learning on all ports. The other option
would be to enable the qca bridge-mgr which takes care of gathering the
events from the bridge and forwards it to the qca-ssdk (to manipulate the
state of the switch). The latter option was chosen to follow the approach
which QCA is also using in their QSDK.

Signed-off-by: ravi vaishnav <ravi.vaishnav@netexperience.com>
2021-06-25 15:20:35 -04:00
Owen Anderson
b6743c34ee WIFI-2825: Supress noisy logs
Signed-off-by: Owen Anderson <owenthomasanderson@gmail.com>
2021-06-25 08:10:10 -04:00
Chaitanya Godavarthi
72fa379804 wifi-2649: Fix SM memory leak
memory leaks while reading apc state/config.
Change read method for apc state/config

Signed-off-by: Chaitanya Godavarthi <chaitanya.kiran@netexperience.com>
2021-06-25 08:06:16 -04:00
Nagendrababu
d852dcc8f2 WIFI-2728-captive-portal-config-parameters-overwriting-issue
This patch will add the conditions to respond captive portal API's to
only valid configuration

Signed-off-by: Nagendrababu <nagendrababu.bonkuri@connectus.ai>
2021-06-24 09:04:39 -04:00
Chaitanya Godavarthi
31abbf39ae wifi-2649 Fix Captive portal vifC vifS mismatch
Mismatch in vifC and vifS for captive portal is
leading to opennds restarts and memory leakage.
Fix by making sure the vifC and vifS are in parity.

uci_blob not being freed, fix by making uci_blob
as global so that it need not be freed and can
be reused instead.

Signed-off-by: Chaitanya Godavarthi <chaitanya.kiran@netexperience.com>

Cleaning up captive portal code to improve stability and reduce memory leaks

Signed-off-by: Nagendrababu <nagendrababu.bonkuri@connectus.ai>
2021-06-23 21:16:07 -04:00
Owen Anderson
63443bae1d WIFI-2685, WIFI-2694: Fixed issues in Luci http portal
Signed-off-by: Owen Anderson <owenthomasanderson@gmail.com>
2021-06-23 15:52:51 -04:00
cbuschfb
4662b33549 Merge branch 'staging-revert-wifi-2152' into pending.
Per Yash request.

Signed-off-by: Chris Busch chrisbusch@fb.com
2021-06-21 16:23:10 -04:00
Yashvardhan
7614fc335b Revert "WIFI-2152: Allow re-trying a failed upgrade"
This reverts commit d6d45ba609.
2021-06-21 12:17:36 -07:00
Owen Anderson
208b016570 WIFI-2671: Added codes 12 & 13 for rebbot & factory reset upgrade options
Signed-off-by: Owen Anderson <owenthomasanderson@gmail.com>
2021-06-18 16:47:41 -04:00
Owen Anderson
78b1f77a53 WIFI2680: Revert inactivefw if sysupgrade fails
Signed-off-by: Owen Anderson <owenthomasanderson@gmail.com>
2021-06-18 16:39:53 -04:00
Owen Anderson
d6d45ba609 WIFI-2152: Allow re-trying a failed upgrade 2021-06-18 12:55:37 -04:00