mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-13 05:25:29 +07:00
wcn36xx: pass information elements in scan requests
When the wifi driver core passes IE elements in the scan request, append them to the firmware message. The driver currently tells the core that it is capable of attaching up to WCN36XX_MAX_SCAN_IE_LEN octets, but doesn't actually pass them to the the hardware. Note that this patch doesn't fix a bug that was observed. The change is merely done for the sake of completeness as the hardware supports appending IEs in scans. Tests show that network scans work fine with this patch applied. Some defines were moved around to avoid cyclic include dependencies. Signed-off-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
5a425c8b78
commit
4836ec42b0
@ -88,6 +88,12 @@
|
||||
/* version string max length (including NULL) */
|
||||
#define WCN36XX_HAL_VERSION_LENGTH 64
|
||||
|
||||
/* How many frames until we start a-mpdu TX session */
|
||||
#define WCN36XX_AMPDU_START_THRESH 20
|
||||
|
||||
#define WCN36XX_MAX_SCAN_SSIDS 9
|
||||
#define WCN36XX_MAX_SCAN_IE_LEN 500
|
||||
|
||||
/* message types for messages exchanged between WDI and HAL */
|
||||
enum wcn36xx_hal_host_msg_type {
|
||||
/* Init/De-Init */
|
||||
@ -1170,7 +1176,7 @@ struct wcn36xx_hal_start_scan_offload_req_msg {
|
||||
|
||||
/* IE field */
|
||||
u16 ie_len;
|
||||
u8 ie[0];
|
||||
u8 ie[WCN36XX_MAX_SCAN_IE_LEN];
|
||||
} __packed;
|
||||
|
||||
struct wcn36xx_hal_start_scan_offload_rsp_msg {
|
||||
|
@ -624,6 +624,9 @@ int wcn36xx_smd_start_hw_scan(struct wcn36xx *wcn, struct ieee80211_vif *vif,
|
||||
struct wcn36xx_hal_start_scan_offload_req_msg msg_body;
|
||||
int ret, i;
|
||||
|
||||
if (req->ie_len > WCN36XX_MAX_SCAN_IE_LEN)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&wcn->hal_mutex);
|
||||
INIT_HAL_MSG(msg_body, WCN36XX_HAL_START_SCAN_OFFLOAD_REQ);
|
||||
|
||||
@ -648,6 +651,14 @@ int wcn36xx_smd_start_hw_scan(struct wcn36xx *wcn, struct ieee80211_vif *vif,
|
||||
for (i = 0; i < msg_body.num_channel; i++)
|
||||
msg_body.channels[i] = req->channels[i]->hw_value;
|
||||
|
||||
msg_body.header.len -= WCN36XX_MAX_SCAN_IE_LEN;
|
||||
|
||||
if (req->ie_len > 0) {
|
||||
msg_body.ie_len = req->ie_len;
|
||||
msg_body.header.len += req->ie_len;
|
||||
memcpy(msg_body.ie, req->ie, req->ie_len);
|
||||
}
|
||||
|
||||
PREPARE_HAL_BUF(wcn->hal_buf, msg_body);
|
||||
|
||||
wcn36xx_dbg(WCN36XX_DBG_HAL,
|
||||
|
@ -32,12 +32,6 @@
|
||||
#define WLAN_NV_FILE "wlan/prima/WCNSS_qcom_wlan_nv.bin"
|
||||
#define WCN36XX_AGGR_BUFFER_SIZE 64
|
||||
|
||||
/* How many frames until we start a-mpdu TX session */
|
||||
#define WCN36XX_AMPDU_START_THRESH 20
|
||||
|
||||
#define WCN36XX_MAX_SCAN_SSIDS 9
|
||||
#define WCN36XX_MAX_SCAN_IE_LEN 500
|
||||
|
||||
extern unsigned int wcn36xx_dbg_mask;
|
||||
|
||||
enum wcn36xx_debug_mask {
|
||||
|
Loading…
Reference in New Issue
Block a user