s5pv210-Linux驱动之安装wpa_supplicant

本文档详细介绍了如何在基于S5PV210芯片的TQ210核心板上,运行Linux3.10.46内核和UBoot2014.12版本的环境下,移植和使用wpa_supplicant。首先,介绍了开发环境和已具备的WIFI驱动情况。接着,逐步讲解了libnl、libopenssl和wpa_supplicant的源码下载、解压及编译过程。最后,简要说明了wpa_supplicant的使用方法和移植总结。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、开发环境

硬件平台:我用的是TQ210核心板,板载S5PV210芯片
软件平台:开发板移植的是Linux3.10.46内核,UBOOT移植的是2014.12版本

二、资源简介

WIFI模块已经可以驱动起来,可以连接没有密码的无线热点

三、移植步骤

(一)安装libnl

1、下载源码

http://www.infradead.org/~tgr/libnl/

The latest stable release is: 3.2.25 (Released on Jul 16, 2014)


2、解压源码

34th_rtl8189es$ tar -zxf libnl-3.2.25.tar.gz

3、进入文件夹

/34th_rtl8189es$ cd libnl-3.2.25/

4、配制

./configure --host=arm-linux --prefix=$PWD/tmp --disable-static
出现错误:

configure: WARNING: bison not found. Please install before continuing.
configure: WARNING: flex not found. Please install before continuing.
configure: error: Required packages are missing. Please install them and rerun ./configure
解决办法:

确定系统的软件源是最新的,可以在这个网站更新:https://repogen.simplylinux.ch/

/libnl-3.2.25$ sudo apt-get install bison
/libnl-3.2.25$ sudo apt-get install flex

5、编译安装

/libnl-3.2.25$ make && make install

在当前目录下的tmp目录下就生成了相关的文件,把相应的lib和include 复制到交叉编译工具链中。


(二)安装libopenssl

1、下载源码

ftp://ftp.openssl.org/source/

当前最新版是openssl-1.0.2m


diff --git a/wpa_supplicant-2.9_standard/wpa_supplicant/events.c b/wpa_supplicant-2.9_standard/wpa_supplicant/events.c index a075284..4351d8a 100644 --- a/wpa_supplicant-2.9_standard/wpa_supplicant/events.c +++ b/wpa_supplicant-2.9_standard/wpa_supplicant/events.c @@ -4057,13 +4057,29 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s, wpa_s, WLAN_REASON_DEAUTH_LEAVING); return; } -#ifdef CONFIG_MLD_PATCH - if (wpa_drv_get_mlo_info(wpa_s) < 0) { - wpa_dbg(wpa_s, MSG_ERROR, "Failed to get MLO connection info"); - wpa_supplicant_deauthenticate(wpa_s, - WLAN_REASON_DEAUTH_LEAVING); - return; - } + +#ifdef CONFIG_SAE +#ifdef CONFIG_DRIVER_NL80211_SPRD + /* process SAE PMK & PMKID */ + if (wpa_key_mgmt_sae(wpa_s->key_mgmt) && + wpa_s->sme.sae_pmksa_caching == 0) { + const u8 *pmk = wpa_get_vendor_ie(data->assoc_info.resp_ies, + data->assoc_info.resp_ies_len, SPRD_SAE_CNN_RES); + if (!pmk) { + wpa_dbg(wpa_s, MSG_ERROR, "SPRD SAE fatal error: no PMK found"); + wpa_supplicant_deauthenticate( + wpa_s, WLAN_REASON_DEAUTH_LEAVING); + return; + } + wpa_hexdump(MSG_INFO, "SPRD SAE auth results-1:", pmk, 2 + 4 + PMK_LEN + PMKID_LEN); + pmk += 6; /* skip vendor IE header: 1 id + 1 len + 4 OUI */ + wpa_hexdump(MSG_INFO, "SPRD SAE auth results-2:", pmk, PMK_LEN); + wpa_hexdump(MSG_INFO, "SPRD SAE auth results-3:", pmk + PMK_LEN, PMKID_LEN); + wpa_printf(MSG_INFO, "SPRD SAE completed - SET PMK for 4-way handshake"); + /* 32 bytes PMK + 16 bytes PMKID from CP2 SAE auth */ + wpa_sm_set_pmk(wpa_s->wpa, pmk, PMK_LEN, pmk + PMK_LEN, bssid); + } +#endif #endif if (data && wpa_supplicant_event_associnfo(wpa_s, data) < 0) return;
最新发布
07-13
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值