Skip to content

Commit

Permalink
Merge pull request #17 from rdkcentral/16_rebase_against_sprint_3rdDec
Browse files Browse the repository at this point in the history
#16 -  rebase against sprint 3rd dec
  • Loading branch information
Ulrond authored Dec 16, 2024
2 parents 302e411 + f1b02b5 commit 2799255
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 2 deletions.
47 changes: 45 additions & 2 deletions include/wifi_hal_ap.h
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,15 @@ typedef enum
WIFI_EAP_TYPE_EXPANDED = 254 /**< EAP-Expanded (RFC 3748). */
} wifi_eap_t;

typedef enum {
WIFI_EAP_PHASE2_EAP, /**< Enterprise EAP. */
WIFI_EAP_PHASE2_MSCHAPV2, /**< Enterprise MSCHAPV2. */
WIFI_EAP_PHASE2_MSCHAP, /**< Enterprise MSCHAP. */
WIFI_EAP_PHASE2_PAP, /**< Enterprise PAP. */
WIFI_EAP_PHASE2_CHAP, /**< Enterprise CHAP. */
WIFI_EAP_PHASE2_GTC /**< Enterprise GTC. */
} phase2_type;

/** @} */ //END OF GROUP WIFI_HAL_TYPES

/**
Expand Down Expand Up @@ -1591,6 +1600,34 @@ typedef INT ( * wifi_radiusEapFailure_callback)(INT apIndex, INT failure_reason)
*/
void wifi_radiusEapFailure_callback_register(wifi_radiusEapFailure_callback callback_proc);

/**
* @brief Callback function invoked when a RADIUS server fallback failure occurs.
*
* This callback function is invoked when a RADIUS server fallback failure occurs on
* the specified Access Point (AP).
*
* @param[in] apIndex Index of the Access Point.
* @param[in] failure_reason Reason for the failure.
*
* @returns The status of the operation.
* @retval WIFI_HAL_SUCCESS If successful.
* @retval WIFI_HAL_ERROR If any error is detected.
*
* In current implementation return value is WIFI_HAL_SUCCESS and any failure of the operation
* is updated in the failure_reason code.
*/
typedef INT ( * wifi_radiusFallback_failover_callback)(INT apIndex, INT failure_reason);

/**
* @brief Registers a callback function for RADIUS server fallback failure events.
*
* This function registers a callback function that will be invoked when a
* RADIUS server fallback failure occurs.
*
* @param callback_proc Pointer to the callback function to register.
*/
void wifi_radiusFallback_failover_callback_register(wifi_radiusFallback_failover_callback callback_proc);

/** @} */ //END OF GROUP WIFI_HAL_TYPES

/**
Expand All @@ -1602,7 +1639,6 @@ void wifi_radiusEapFailure_callback_register(wifi_radiusEapFailure_callback call
*
* This function registers a callback function that will be invoked when a
* Wi-Fi client disassociates from an Access Point (AP).
* This function must not suspend and must not invoke any blocking system calls.
*
* @param callback_proc Pointer to the callback function to register.
*/
Expand Down Expand Up @@ -2646,9 +2682,11 @@ typedef struct
char key[64]; /**< Primary RADIUS server secret. */
char identity[64]; /**< Primary RADIUS server identity. */
#ifdef WIFI_HAL_VERSION_3_PHASE2
ip_addr_t s_ip; /**< Secondary RADIUS server IP address. */
ip_addr_t s_ip; /**< Secondary RADIUS server IP address. */
ip_addr_t connectedendpoint; /**< The RADIUS server IP address which is currently in use. */
#else
unsigned char s_ip[45]; /**< Secondary RADIUS server IP address. */
unsigned char connectedendpoint[45]; /**< The RADIUS server IP address which is currently in use. */
#endif
unsigned short s_port; /**< Secondary RADIUS server port. */
char s_key[64]; /**< Secondary RADIUS server secret. */
Expand All @@ -2660,6 +2698,7 @@ typedef struct
UINT identity_req_retry_interval; /**< Identity request retry interval in seconds. */
UINT server_retries; /**< Number of RADIUS server retries. */
wifi_eap_t eap_type; /**< EAP type. */
phase2_type phase2; /**< Enterprise based eap type */
} __attribute__((packed)) wifi_radius_settings_t;

/**
Expand Down Expand Up @@ -2794,6 +2833,10 @@ typedef struct
char minimum_advertised_mcs[32]; /**< Minimum advertised MCS. */
char sixGOpInfoMinRate[32]; /**< 6G operating information minimum rate. */
char client_deny_assoc_info[45]; /**< Client deny association information. */
int time_ms; /**< Time to wait for meeting minimum mgmt frames for TCM threshold calcultion */
int min_num_mgmt_frames; /**< Minimum number of mgmt frames required to compute the TCM threshold. */
char tcm_exp_weightage[32]; /**< Alpha/Exponential weight used in the Exponential Moving Average formula. */
char tcm_gradient_threshold[32]; /**< Threshold against which TCM Exponential Moving Average is computed. */
wifi_vap_name_t vap_name; /**< VAP name. */
} __attribute__((packed)) wifi_preassoc_control_t;

Expand Down
12 changes: 12 additions & 0 deletions include/wifi_hal_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ extern "C"{
#define WIFI_HAL_UNSUPPORTED -3 /**< Wi-Fi HAL unsupported operation status code. */
#define WIFI_HAL_INVALID_ARGUMENTS -4 /**< Wi-Fi HAL invalid arguments status code. */
#define WIFI_HAL_INVALID_VALUE -5 /**< Wi-Fi HAL invalid value status code. */
#define WIFI_HAL_NOT_READY -6 /**< Wi-Fi HAL not ready status code. */

#ifndef RADIO_INDEX_1
#define RADIO_INDEX_1 1 /**< Radio index 1. */
Expand Down Expand Up @@ -746,6 +747,11 @@ typedef enum {
wifi_countrycode_ZA, /**< SOUTH AFRICA */
wifi_countrycode_ZM, /**< ZAMBIA */
wifi_countrycode_ZW, /**< ZIMBABWE */
wifi_countrycode_AX, /**< ALAND_ISLANDS */
wifi_countrycode_BL, /**< SAINT_BARTHELEMY */
wifi_countrycode_CW, /**< CURACAO */
wifi_countrycode_MF, /**< SAINT_MARTIN */
wifi_countrycode_SX, /**< SINT_MAARTEN */
wifi_countrycode_max /**< Max number of country code */
} wifi_countrycode_type_t;

Expand Down Expand Up @@ -1075,6 +1081,12 @@ typedef enum
EAP_FAILURE /**< EAP failure. */
} radius_eap_failure_code_t;

typedef enum{
RADIUS_INIT, /**< RADIUS Initialization failure. */
RADIUS_FAILOVER, /**< RADIUS Failover. */
RADIUS_FALLBACK /**< RADIUS Fallback. */
}radius_fallback_failover_code_t;

#define MAX_NR 4 /**< Maximum number of receive antennas. */
#define MAX_NC 1 /**< Maximum number of transmit antennas. */
#define MAX_SUB_CARRIERS 256 /**< Maximum number of subcarriers. */
Expand Down
31 changes: 31 additions & 0 deletions include/wifi_hal_radio.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,35 @@ typedef struct
UCHAR punct_acs_threshold; /**< Puncturing ACS threshold. */
} __attribute__((packed)) wifi_radio_11be_puncturing_info_t;

/**
* @brief Maximum number of non operable channels in a channel.
* (TODO: Name to be changed in future revisions of interface for
* readability)
*/
#define MAXNUMNONOPERABLECHANNELS 10

/**
* @brief Maximum number of operating classes in a band.
* (TODO: Name to be changed in future revisions of interface for
* readability)
*/
#define MAXNUMOPERCLASSESPERBAND 20

/**
* @brief Operating Classes information.
*
* Structure that holds information of the operating class,
* such as maximum transmit power, array of non-operable channel
* associated with that operating class.
*/
typedef struct
{
UINT opClass; /**< Global operating Class value */
INT maxTxPower; /**< Max Tx Power */
UINT numberOfNonOperChan; /**< Number of Nonoperable channels */
UINT nonOperable[MAXNUMNONOPERABLECHANNELS]; /**< Array of Non Operable channel value */
} __attribute__((packed)) wifi_operating_classes_t;

/**
* @brief Radio temperature information.
*
Expand Down Expand Up @@ -151,6 +180,8 @@ typedef struct
BOOL amsduEnable; /**< Whether AMSDU is enabled. */
UINT DFSTimer; /**< DFS timer. */
char radarDetected[256]; /**< Radar detected information. */
UINT numOperatingClasses; /**< Number of valid operating classes in the array operatingClasses */
wifi_operating_classes_t operatingClasses[MAXNUMOPERCLASSESPERBAND]; /**< Array of supported Operating classes as per Data elements Schema */
} __attribute__((packed)) wifi_radio_operationParam_t;

/**
Expand Down

0 comments on commit 2799255

Please sign in to comment.