qcacmn: Add cfg80211 scan start and stop command

Add cfg80211 scan start and scan stop commands.

Change-Id: I20b6c7743496ae82cc3a93befb5b68812047ec1a
CRs-Fixed: 1095299
Цей коміт міститься в:
Sandeep Puligilla
2017-02-25 16:35:35 -08:00
зафіксовано Abhishek Singh
джерело 6a1c821afd
коміт 7acd31fa33
8 змінених файлів з 806 додано та 23 видалено

Переглянути файл

@@ -23,4 +23,22 @@
#ifndef _WLAN_UTILITY_H_
#define _WLAN_UTILITY_H_
#include <qdf_types.h>
/**
* wlan_chan_to_freq() - converts channel to frequency
* @chan: channel number
*
* @return frequency of the channel
*/
uint32_t wlan_chan_to_freq(uint8_t chan);
/*
* wlan_is_dsrc_channel() - is the channel DSRC
* @center_freq: center freq of the channel
*
* Return: true if DSRC channel or false otherwise
*/
bool wlan_is_dsrc_channel(uint16_t center_freq);
#endif /* _WLAN_UTILITY_H_ */

Переглянути файл

@@ -21,4 +21,30 @@
*/
#include "wlan_utility.h"
#include <wlan_cmn.h>
uint32_t wlan_chan_to_freq(uint8_t chan)
{
/* ch 0 - ch 13 */
if (chan < WLAN_24_GHZ_CHANNEL_14)
return WLAN_24_GHZ_BASE_FREQ + chan * WLAN_CHAN_SPACING_5MHZ;
else if (chan == WLAN_24_GHZ_CHANNEL_14)
return WLAN_CHAN_14_FREQ;
else if (chan < WLAN_24_GHZ_CHANNEL_27)
/* ch 15 - ch 26 */
return WLAN_CHAN_15_FREQ +
(chan - WLAN_24_GHZ_CHANNEL_15) * WLAN_CHAN_SPACING_20MHZ;
else if (chan == WLAN_5_GHZ_CHANNEL_170)
return WLAN_CHAN_170_FREQ;
else
return WLAN_5_GHZ_BASE_FREQ + chan * WLAN_CHAN_SPACING_5MHZ;
}
bool wlan_is_dsrc_channel(uint16_t center_freq)
{
if (center_freq >= 5852 &&
center_freq <= 5920)
return true;
return false;
}