qcacld-3.0: Update phymode during channel width updation
When roaming is completed if the phymode of the target AP is different from current phymode, then firmware will have updated phymode and host driver will have older phy mode. The host driver will update the opmode when new opmode is found over beacon or vht opmode action frame. During opmode updation over wma_process_update_opmode(), phymode is also sent to firmware. As the phymode on the host driver is not updated to new value after roaming and there will be mismatched phymode sent to firmware. Firmware will not be able to handle this and asserts. With current design, the channel width and frequency are updated to wma interface on roam synch complete. Fix is to update the phymode also after roam synch complete is received to wma iface based on the new channel width updated. Change-Id: I54aec080f53d3b49a309f9cb66553ec7c1805c50 CRs-Fixed: 2380456
This commit is contained in:
parent
286e7a3c53
commit
8b12fbe756
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@ -132,6 +132,16 @@ int wma_cli_set_command(int vdev_id, int param_id, int sval, int vpdev);
|
||||
int wma_cli_set2_command(int vdev_id, int param_id, int sval1,
|
||||
int sval2, int vpdev);
|
||||
|
||||
/**
|
||||
* wma_get_phy_mode_cb() - Callback to get current PHY Mode.
|
||||
* @chan: channel number
|
||||
* @chan_width: maximum channel width possible
|
||||
* @phy_mode: PHY Mode
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void wma_get_phy_mode_cb(uint8_t chan, uint32_t chan_width, uint32_t *phy_mode);
|
||||
|
||||
QDF_STATUS wma_set_htconfig(uint8_t vdev_id, uint16_t ht_capab, int value);
|
||||
|
||||
void wma_set_peer_authorized_cb(void *wma_ctx, wma_peer_authorized_fp auth_cb);
|
||||
|
@ -3120,16 +3120,7 @@ struct wlan_objmgr_psoc *wma_get_psoc_from_scn_handle(void *scn_handle)
|
||||
return wma_handle->psoc;
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_get_phy_mode_cb() - Callback to get current PHY Mode.
|
||||
* @chan: channel number
|
||||
* @chan_width: maximum channel width possible
|
||||
* @phy_mode: PHY Mode
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void wma_get_phy_mode_cb(uint8_t chan, uint32_t chan_width,
|
||||
uint32_t *phy_mode)
|
||||
void wma_get_phy_mode_cb(uint8_t chan, uint32_t chan_width, uint32_t *phy_mode)
|
||||
{
|
||||
uint32_t dot11_mode;
|
||||
struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
@ -46,6 +46,7 @@
|
||||
|
||||
#include "cds_utils.h"
|
||||
#include "wlan_policy_mgr_api.h"
|
||||
#include <wlan_utility.h>
|
||||
|
||||
#if !defined(REMOVE_PKT_LOG)
|
||||
#include "pktlog_ac.h"
|
||||
@ -2399,6 +2400,7 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
|
||||
tp_wma_handle wma = (tp_wma_handle) handle;
|
||||
roam_offload_synch_ind *roam_synch_ind_ptr = NULL;
|
||||
tpSirBssDescription bss_desc_ptr = NULL;
|
||||
uint8_t channel;
|
||||
uint16_t ie_len = 0;
|
||||
int status = -EINVAL;
|
||||
tSirRoamOffloadScanReq *roam_req;
|
||||
@ -2591,6 +2593,18 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
|
||||
if (roam_synch_ind_ptr->join_rsp)
|
||||
wma->interfaces[synch_event->vdev_id].chan_width =
|
||||
roam_synch_ind_ptr->join_rsp->vht_channel_width;
|
||||
/*
|
||||
* update phy_mode in wma to avoid mismatch in phymode between host and
|
||||
* firmware. The phymode stored in interface[vdev_id].chanmode is sent
|
||||
* to firmware as part of opmode update during either - vht opmode
|
||||
* action frame received or during opmode change detected while
|
||||
* processing beacon. Any mismatch of this value with firmware phymode
|
||||
* results in firmware assert.
|
||||
*/
|
||||
channel = wlan_freq_to_chan(wma->interfaces[synch_event->vdev_id].mhz);
|
||||
wma_get_phy_mode_cb(channel,
|
||||
wma->interfaces[synch_event->vdev_id].chan_width,
|
||||
&wma->interfaces[synch_event->vdev_id].chanmode);
|
||||
|
||||
wma->csr_roam_synch_cb((struct mac_context *)wma->mac_context,
|
||||
roam_synch_ind_ptr, bss_desc_ptr, SIR_ROAM_SYNCH_COMPLETE);
|
||||
|
Loading…
Reference in New Issue
Block a user