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

middleware: wifi_nxp: add wifi driver #416

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MaochenWang1
Copy link

Add wifi driver code inside the hal_nxp.

Add wifi driver code.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
@MaochenWang1
Copy link
Author

MaochenWang1 commented Aug 5, 2024

Hi @dleach02 @mmahadevan108 please review this wifi core driver

Copy link
Collaborator

@danieldegrasse danieldegrasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few general requests related to folders we can remove:

  • can we remove the cli folder?
  • are we enabling DHCP server support in Zephyr? If not, can we remove the dhcpd folder?
  • we should remove the example folder
  • we should drop the internal folder
  • binary files in lib need to be removed (likely just remove the folder, we can't have binary files)
  • we should drop the nw_utils folder and telent folder
  • binary firmware blobs in fw_bins need to be dropped, we need to add support for pulling these in via west blobs by defining the URL to pull them from in the module.yml file: https://github.com/zephyrproject-rtos/hal_nxp/blob/master/zephyr/module.yml#L9

Also, what is the code for sigma_agent? If this is a sample/test application, we should not ship it with our HAL driver code

mcux/middleware/wifi_nxp/CMakeLists.txt Show resolved Hide resolved
mcux/middleware/wifi_nxp/CMakeLists.txt Show resolved Hide resolved
mcux/middleware/wifi_nxp/CMakeLists.txt Show resolved Hide resolved
mcux/middleware/wifi_nxp/CMakeLists.txt Show resolved Hide resolved
@@ -0,0 +1,65 @@
const unsigned char ca_der[] = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can tell, these files are being used for WPA enterprise support? Are these files something that needs to be configured for customer applications, or are they hardcoded?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are as an example, can be used or just generated by cmd (our user manual has the steps to generate)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, is there a way to replace these files in a build without editing them? IE can the user set a new path to these files using a KConfig or CMake variable? We should not require users to modify the NXP HAL in order to generate different CA certificates

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is way to generate, and merged upstream in Zephyr, but not verified downstream. so currently we keep this old way to use. Maybe in the future can remove this.

mcux/middleware/wifi_nxp/dhcpd/dhcp-priv.h Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is zephyr specific since it uses the SDIO APIs. Do we want to include the FreeRTOS version of this file as well, so we can use a single source tree for FreeRTOS and Zephyr?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needed for rt platform

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure- what I'm asking is if we want to have a "zephyr" version and "freertos" version of this file. The advantage of this would be that we can use one source tree for the WIFI NXP driver, and not need to release a "zephyr" version of this file and "freertos" version

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wifi_nxp code/branch is specific for zephyr, and all the freertos related are removed

#include <mlan_sdio_api.h>
#include <osa.h>
#include <fsl_common.h>
#include <fsl_gpio.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the fsl_xx includes here, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are needed for sdio case

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I missing somewhere in this file where we use FSL APIs? We should not do this- we want to make sure the SDIO code can run on non-nxp platforms, so we should use Zephyr APIS, not SDK APIs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaochenWang1 ping on this question

@dleach02
Copy link
Member

@MaochenWang1 we need a Zephyr side PR that brings this in

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.

4 participants