jedrzejboczar / elf-size-analyze

Script for analyzing ELF memory usage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WPS disabling from WLAN_Lib_M2B_Standard_STA_AP

adlikari opened this issue · comments

To disable WPS feature from WLAN_Lib_M2B_Standard_STA_AP, I tried to change #define WLAN_CONFIG_WPS 0 in wlanconfig.h. The first problem faced it was in wps_supplicant.c and wps_supplicant.h files. For example in wps_supplicant.h, functions's declarations and definitions depend on #ifdef CONFIG_WPS and #else. But in wps_supplicant.c same functions are defined without condition on ifdef CONFIG_WPS. To resolve this problem of redefinitions I tried to comment functions in wps_suplicant.c and I kept the functions defined in wps_supplicant.h that they return just 0 without doing nothing. The second problem faced was of #define IEEE8021X_EAPOL that is defined in wlan_cfg.h like that:
#if WLAN_CONFIG_WPS
#define CONFIG_WPS 1
#define EAP_WSC 1
#ifdef CONFIG_AP
#define EAP_SERVER_WSC 1
#endif /* CONFIG_AP /
#define IEEE8021X_EAPOL 1
#define EAP_TLS_NONE 1
#endif
As I disabled WLAN_CONFIG_WPS, we don't have a definition of "IEEE8021X_EAPOL". I tried to build and I had this error:
C:/git/STM32_Wifi/Firmware/Middlewares/ST/WLAN_Lib/wpa_supplicant/wpa_supplicant_bsd3/wpa_supplicant/wps_supplicant.c:452:7: error: 'struct wpa_ssid' has no member named 'eap'
When I looked in config_ssid.h, I found ;
#ifdef IEEE8021X_EAPOL
#define EAPOL_FLAG_REQUIRE_KEY_UNICAST BIT(0)
#define EAPOL_FLAG_REQUIRE_KEY_BROADCAST BIT(1)
/
*
* eapol_flags - Bit field of IEEE 802.1X/EAPOL options (EAPOL_FLAG_*)
*/
int eapol_flags;

/**
 * eap - EAP peer configuration for this network
 */
struct eap_peer_config eap;

#endif /* IEEE8021X_EAPOL /
So the definition of eap struct depends on the definition of IEEE8021X_EAPOL in config_ssid.h but it doesn't depend on #ifdef IEEE8021X_EAPOL in wps_supplicant.c.
I need to understand this problem: why there are #ifdef IEEE8021X_EAPOL in file and not in other and also why we have #define IEEE8021X_EAPOL 1 inside of WPS enabling:
#if WLAN_CONFIG_WPS
#define CONFIG_WPS 1
#define EAP_WSC 1
#ifdef CONFIG_AP
#define EAP_SERVER_WSC 1
#endif /
CONFIG_AP */
#define IEEE8021X_EAPOL 1
#define EAP_TLS_NONE 1
#endif

Could we have a possibility to fully disable WPS feature independently as a module?

I don't see how this is related in any way to elf-size-analyze. Did you missclick repository or sth?