mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
qcacld-3.0: Add SSR support for monitor mode
Presently SSR is not supported in the monitor mode, in the debug builds the device enters bad state when the SSR is triggered in the monitor mode. Make changes to support SSR in monitor mode. Change-Id: Iee88a0c1aca1b093607cea20ee1957be55a33598 CRs-Fixed: 2034240
This commit is contained in:
parent
141f12cb55
commit
062fb036ec
6 changed files with 25 additions and 14 deletions
|
|
@ -1325,6 +1325,8 @@ struct hdd_adapter {
|
|||
bool con_status;
|
||||
bool dad;
|
||||
uint8_t active_ac;
|
||||
uint32_t mon_chan;
|
||||
uint32_t mon_bandwidth;
|
||||
};
|
||||
|
||||
#define WLAN_HDD_GET_STATION_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.station)
|
||||
|
|
|
|||
|
|
@ -464,4 +464,14 @@ int wlan_hdd_get_peer_info(struct hdd_adapter *adapter,
|
|||
struct qdf_mac_addr macaddress,
|
||||
struct sir_peer_info_ext *peer_info_ext);
|
||||
|
||||
/**
|
||||
* wlan_hdd_set_mon_chan() - Set capture channel on the monitor mode interface.
|
||||
* @adapter: Handle to adapter
|
||||
* @chan: Monitor mode channel
|
||||
* @bandwidth: Capture channel bandwidth
|
||||
*
|
||||
* Return: 0 on success else error code.
|
||||
*/
|
||||
int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan,
|
||||
uint32_t bandwidth);
|
||||
#endif /* __WEXT_IW_H__ */
|
||||
|
|
|
|||
|
|
@ -5154,7 +5154,12 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
|
|||
GFP_KERNEL);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case QDF_MONITOR_MODE:
|
||||
hdd_init_station_mode(adapter);
|
||||
hdd_set_mon_rx_cb(adapter->dev);
|
||||
wlan_hdd_set_mon_chan(adapter, adapter->mon_chan,
|
||||
adapter->mon_bandwidth);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1385,8 +1385,12 @@ QDF_STATUS hdd_wlan_re_init(void)
|
|||
pAdapter = hdd_get_adapter(hdd_ctx, QDF_SAP_MODE);
|
||||
if (!pAdapter) {
|
||||
pAdapter = hdd_get_adapter(hdd_ctx, QDF_IBSS_MODE);
|
||||
if (!pAdapter) {
|
||||
pAdapter = hdd_get_adapter(hdd_ctx,
|
||||
QDF_MONITOR_MODE);
|
||||
if (!pAdapter)
|
||||
hdd_err("Failed to get Adapter!");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1693,10 +1693,6 @@ int hdd_set_mon_rx_cb(struct net_device *dev)
|
|||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
void *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
qdf_mem_zero(&txrx_ops, sizeof(txrx_ops));
|
||||
txrx_ops.rx.rx = hdd_mon_rx_packet_cbk;
|
||||
hdd_monitor_set_rx_monitor_cb(&txrx_ops, hdd_rx_monitor_callback);
|
||||
|
|
|
|||
|
|
@ -12907,15 +12907,7 @@ static int iw_set_band_config(struct net_device *dev,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_hdd_set_mon_chan() - Set capture channel on the monitor mode interface.
|
||||
* @adapter: Handle to adapter
|
||||
* @chan: Monitor mode channel
|
||||
* @bandwidth: Capture channel bandwidth
|
||||
*
|
||||
* Return: 0 on success else error code.
|
||||
*/
|
||||
static int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan,
|
||||
int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan,
|
||||
uint32_t bandwidth)
|
||||
{
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
|
|
@ -12957,6 +12949,8 @@ static int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan,
|
|||
status);
|
||||
}
|
||||
|
||||
adapter->mon_chan = chan;
|
||||
adapter->mon_bandwidth = bandwidth;
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue