Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt fixes v2.5.1 #20

Closed
wants to merge 51 commits into from
Closed

Conversation

D-Triveni
Copy link
Collaborator

No description provided.

krish2718 and others added 30 commits August 2, 2023 20:44
Only build support to get things going.

Signed-off-by: Chaitanya Tata <[email protected]>
Remove starting newline and add ending newline.

Upstream-Pr: Wi-FiQuickTrack/Wi-FiQuickTrack-ControlAppC#2

Signed-off-by: Chaitanya Tata <[email protected]>
Without this the defaults are used which are incompatible with Zephyr's
coding guidelines. Also, modify the patch to extra scripts.

Signed-off-by: Chaitanya Tata <[email protected]>
fixup! [nrf noup] zephyr: Add support for Zephyr

Signed-off-by: Chaitanya Tata <[email protected]>
These functions are only applicable for the test platform, so, include
them only for it to avoid build errors.

Upstream-Pr: Wi-FiQuickTrack/Wi-FiQuickTrack-ControlAppC#5

Signed-off-by: Chaitanya Tata <[email protected]>
Cleanup OpenWRT code from zephyr specific files.

Signed-off-by: Triveni Danda <[email protected]>
Clean up the file operation based functionlaity,
as there is no support.

Signed-off-by: Triveni Danda <[email protected]>
fixup! [nrf noup] zephyr: Add support for Zephyr

To include posix reated API's.
Need to be enabled by application.

Signed-off-by: Triveni Danda <[email protected]>
Required for select() call.

fixup! [nrf noup] zephyr: Add support for Zephyr

Signed-off-by: Triveni Danda <[email protected]>
fixup! [nrf noup] zephyr: Add support for Zephyr

Alarm's are not supported in Zephyr, see [1].

[1] - https://docs.zephyrproject.org/latest/services/portability/posix.html

Signed-off-by: Triveni Danda <[email protected]>
Add new file for socket opeartions, for common use
across different OS.

Upstream-Pr: Wi-FiQuickTrack/Wi-FiQuickTrack-ControlAppC#6

Signed-off-by: Triveni Danda <[email protected]>
Add boot time thread to start QT.
Added option to select the log level.

fixup! [nrf noup] zephyr: Add support for Zephyr

Signed-off-by: Triveni Danda <[email protected]>
Update the license year.

squash! [nrf noup] zephyr: Add support for Zephyr.

Signed-off-by: Triveni Danda <[email protected]>
This is needed by CI.

Signed-off-by: Chaitanya Tata <[email protected]>
This runs basic checks on a commit, base taken from Zephyr with below
changes:

* Disable unrelated modules
* Add missing python requirements file
* Fix west init: We need to clone only downstream Zephyr, so, use git
  instead of west to save time and memory

Signed-off-by: Chaitanya Tata <[email protected]>
This should help solve basic compilation issues or warnings, and Zephyr
build is done on sdk-nrf manifest update.

Signed-off-by: Chaitanya Tata <[email protected]>
fixup! [nrf noup] ci: Use gitling from Zephyr

Signed-off-by: Chaitanya Tata <[email protected]>
fixup! [nrf noup] zephyr: qt: Add missing main and other dependent file

Add changes to fetch logger definition.
Fix the log level setting.

Signed-off-by: Triveni Danda <[email protected]>
fixup! [nrf noup] zephyr: qt: Add missing main and other dependent file.

Signed-off-by: Triveni Danda <[email protected]>
As QT Kconfig is unconditionally included for all builds where QT is
mostly not enabled this causes a Cmake warning "No SOURCES given", to
fix this warning add a check and return early if QT is not enabled.

Signed-off-by: Chaitanya Tata <[email protected]>
Add missing AP flag in zephyr specific file

Signed-off-by: Triveni Danda <[email protected]>
Set default wireless interface information.
Other API's read wireless interface information to
invoke control path.

Signed-off-by: Triveni Danda <[email protected]>
Replaced Linux version of opening/closing control interface
due to incompatibility with zephyr for supplicant connectivity.

Signed-off-by: Triveni Danda <[email protected]>
fixup! [nrf noup]: zephyr: qt: Add zephyr based control interface

When both unistd.h and net/socket.h are included, compiler
is listing below error for close() declaration.
error: static declaration of 'close' follows non-static declaration

To fix this, remove unistd.h as we need static declaration of
close() from net/socket.h

Signed-off-by: Triveni Danda <[email protected]>
fixup! [nrf noup]: zephyr: qt: Add zephyr based control interface

Definition of inet_ntop here is conflicting with
the definition from net/socket.h file. To fix the
error, remove definition here and fetch it from
header file.

Signed-off-by: Triveni Danda <[email protected]>
fixup! [nrf noup]: zephyr: qt: Add zephyr based control interface

Need to include unistd.h for sleep() declaration, but
by inlcuding it other compilation errors are seen.
To fix this, use k_sleep().

Signed-off-by: Triveni Danda <[email protected]>
Remove the newline character at the end of the file.
To meet the compliance requirements, there should be
no blank lines at the end of the file.

Signed-off-by: Triveni Danda <[email protected]>
D-Triveni and others added 21 commits September 20, 2023 13:31
fixup! [nrf noup] zephyr: qt: Fix the logger issues

Previously, the logger level was set to LOG_LEVEL_DEFAULT,
but this configuration was not producing any visible logs.
So, the logger level has been changed to LOG_LEVEL to ensure
that logs are displayed based on user-defined settings.

Signed-off-by: Triveni Danda <[email protected]>
Resetting the device within the `reset_device_handler` function
triggers a reboot, interrupting communication with the QT tool
before we could send the response.

To fix this issue, the reset operation is moved to the caller
function to ensure that the response is sent successfully
before resetting the device.

Signed-off-by: Triveni Danda <[email protected]>
Adjust the buffer sizes from 256 to 32 to optimize the
stack size. 32 bytes is sufficient to store the values
in the `reset_device_handler` function.

Signed-off-by: Triveni Danda <[email protected]>
Added zephyr-specific implementation for a station to
disconnect.

Signed-off-by: Triveni Danda <[email protected]>
Establish a control path connection and execute necesaary
commands to configure the DUT as station.

Signed-off-by: Triveni Danda <[email protected]>
Add zephyr-specific implementation for a station to associate
with an AP.

Signed-off-by: Triveni Danda <[email protected]>
Add changes to retrieve the mac address of wireless interface.

Signed-off-by: Triveni Danda <[email protected]>
Appending a subnet mask (e.g., /24) directly to an IP address
when configuring network settings is not supported in zephyr,
so remove the changes.

Add zephyr-specific changes to set netmask for an interface.

Signed-off-by: Triveni Danda <[email protected]>
Assign the IPv4 address received from QT tool to wireless
interface.

Signed-off-by: Triveni Danda <[email protected]>
Read IP address of wireless interface using wpa supplicant.

Signed-off-by: Triveni Danda <[email protected]>
After copying specified number of bytes,
null character is not being copied by memcpy.
So, add change to append null character

Upstream-PR: Wi-FiQuickTrack/Wi-FiQuickTrack-ControlAppC#8

Signed-off-by: Triveni Danda <[email protected]>
Replace use of inet_addr with net_addr_pton to enhance
IPv4 and IPv6 address handling in zephyr-based code.

Also, remove inet_addr definition as it is not needed
anymore.

Signed-off-by: Triveni Danda <[email protected]>
Optimize buffer size to fix stack overflow.

Reduce response buffer size to 8 bytes as it only stores
`ok` and `fail` strings in success and failure cases.

Signed-off-by: Triveni Danda <[email protected]>
Address compliance failure by removing unnecessary
blank lines at the end of the file.

Signed-off-by: Triveni Danda <[email protected]>
This change aligns with the existing behavior in Linux, where a
supplicant kill operation is performed in `DEVICE_RESET` and
`STA_DISCONNECT` api handlers.

Signed-off-by: Triveni Danda <[email protected]>
fixup! [nrf noup] ci: Add compliance check

This is a false negative and is also disabled in the sdk-zephyr.

Signed-off-by: Chaitanya Tata <[email protected]>
Previously, we had removed the disconnect functionality, as we
considered `kernel reboot` to be similar to a disconnection.

However, in one of the SVD test cases, it appears that the
access point (AP) required a deauthentication frame to clear
specific buffers, enabling the proper sending and receiving of
ICMP traffic. As a result, ICMP traffic from the AP is observed
to start with sequence number 8 after a reset.

To address this issue, add the functionality that implicitly sends
a Deauthentication frame to the AP. This change aligns with the
behavior observed in the Linux case, where terminating the supplicant
also triggers the sending of a Deauthentication frame.

Fixes SHEL-2062

Signed-off-by: Triveni Danda <[email protected]>
Also, use snprintf in place of sprintf.

Signed-off-by: Triveni Danda <[email protected]>
Signed-off-by: Triveni Danda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants