diff --git a/core/cds/inc/cds_reg_service.h b/core/cds/inc/cds_reg_service.h index 3803e5747317..5bc32ea79c55 100644 --- a/core/cds/inc/cds_reg_service.h +++ b/core/cds/inc/cds_reg_service.h @@ -39,23 +39,21 @@ #include "cdf_status.h" #define CDS_COUNTRY_CODE_LEN 2 -#define CDS_MAC_ADDRESS_LEN 6 +#define CDS_MAC_ADDRESS_LEN 6 -#define CDS_CHANNEL_STATE(enum) reg_channels[enum].enabled -#define CDS_CHANNEL_NUM(enum) chan_mapping[enum].chan_num -#define CDS_CHANNEL_FREQ(enum) chan_mapping[enum].center_freq +#define CDS_CHANNEL_STATE(chan_enum) reg_channels[chan_enum].state +#define CDS_CHANNEL_NUM(chan_enum) chan_mapping[chan_enum].chan_num +#define CDS_CHANNEL_FREQ(chan_enum) chan_mapping[chan_enum].center_freq #define CDS_IS_DFS_CH(chan_num) (cds_get_channel_state((chan_num)) == \ CHANNEL_STATE_DFS) #define CDS_IS_PASSIVE_OR_DISABLE_CH(chan_num) \ (cds_get_channel_state(chan_num) != CHANNEL_STATE_ENABLE) -#define CDS_MIN_24GHZ_CHANNEL_NUMBER \ - chan_mapping[MIN_24GHZ_CHANNEL].chan_num -#define CDS_MAX_24GHZ_CHANNEL_NUMBER \ - chan_mapping[MAX_24GHZ_CHANNEL].chan_num -#define CDS_MIN_5GHZ_CHANNEL_NUMBER chan_mapping[MIN_5GHZ_CHANNEL].chan_num -#define CDS_MAX_5GHZ_CHANNEL_NUMBER chan_mapping[MAX_5GHZ_CHANNEL].chan_num +#define CDS_MIN_24GHZ_CHANNEL_NUMBER chan_mapping[MIN_24GHZ_CHANNEL].chan_num +#define CDS_MAX_24GHZ_CHANNEL_NUMBER chan_mapping[MAX_24GHZ_CHANNEL].chan_num +#define CDS_MIN_5GHZ_CHANNEL_NUMBER chan_mapping[MIN_5GHZ_CHANNEL].chan_num +#define CDS_MAX_5GHZ_CHANNEL_NUMBER chan_mapping[MAX_5GHZ_CHANNEL].chan_num #define CDS_IS_CHANNEL_5GHZ(chan_num) \ ((chan_num >= CDS_MIN_5GHZ_CHANNEL_NUMBER) && \ @@ -65,9 +63,9 @@ ((chan_num >= CDS_MIN_24GHZ_CHANNEL_NUMBER) && \ (chan_num <= CDS_MAX_24GHZ_CHANNEL_NUMBER)) -#define CDS_IS_SAME_BAND_CHANNELS(ch1, ch2) \ - (ch1 && ch2 && \ - (CDS_IS_CHANNEL_5GHZ(ch1) == CDS_IS_CHANNEL_5GHZ(ch2))) +#define CDS_IS_SAME_BAND_CHANNELS(chan_num1, chan_num2) \ + (chan_num1 && chan_num2 && \ + (CDS_IS_CHANNEL_5GHZ(chan_num1) == CDS_IS_CHANNEL_5GHZ(chan_num2))) #define CDS_MIN_11P_CHANNEL chan_mapping[MIN_59GHZ_CHANNEL].chan_num @@ -79,7 +77,7 @@ typedef enum { REGDOMAIN_COUNT } v_REGDOMAIN_t; -typedef enum { +enum channel_enum { RF_CHAN_1 = 0, RF_CHAN_2, RF_CHAN_3, @@ -197,62 +195,104 @@ typedef enum { INVALID_RF_CHANNEL = 0xBAD, RF_CHANNEL_INVALID_MAX_FIELD = 0x7FFFFFFF -} eRfChannels; +}; -typedef enum { +/** + * enum channel_state: channel state + * + * @CHANNEL_STATE_DISABLE: channel disabled + * @CHANNEL_STATE_ENABLE: tx/rx enabled + * @CHANNEL_STATE_DFS: rx enabled, tx DFS + * @CHANNEL_STATE_INVALID: not a valid channel + */ +enum channel_state { CHANNEL_STATE_DISABLE, CHANNEL_STATE_ENABLE, CHANNEL_STATE_DFS, CHANNEL_STATE_INVALID -} CHANNEL_STATE; - -typedef int8_t tPowerdBm; - -struct regulatory_channel { - uint32_t enabled:4; - uint32_t flags:28; - tPowerdBm pwr_limit; }; +/** + * struct regulatory_channel: regulatory channel + * + * @state: channel state + * @flags: channel flags + * @pwr_limit: channel tx power limit + */ +struct regulatory_channel { + uint32_t state:4; + uint32_t flags:28; + int8_t pwr_limit; +}; + +/** + * struct chan_map: channel mapping + * + * @center_freq: channel center freq + * @chan_num: channel number + */ struct chan_map { uint16_t center_freq; uint16_t chan_num; }; -typedef struct { - uint8_t chanId; - tPowerdBm pwr; -} tChannelListWithPower; - -typedef enum { - COUNTRY_CODE_SET_BY_CORE, - COUNTRY_CODE_SET_BY_DRIVER, - COUNTRY_CODE_SET_BY_USER -} COUNTRY_CODE_SOURCE; +/** + * struct channel_power: channel power + * + * @chan_num: channel number + * @power: tx power + */ +struct channel_power { + uint8_t chan_num; + int8_t power; +}; +/** + * enum country_src: country source + * + * @SOURCE_QUERY: source query + * @SOURCE_CORE: source regulatory core + * @SOURCE_DRIVER: source driver + * @SOURCE_USERSPACE: source userspace + * @SOURCE_11D: source 11D + */ +enum country_src { + SOURCE_QUERY, + SOURCE_CORE, + SOURCE_DRIVER, + SOURCE_USERSPACE, + SOURCE_11D +}; +/** + * struct regulatory: regulatory information + * + * @reg_domain: regulatory domain pair + * @eeprom_rd_ext: eeprom value + * @country_code: current country in integer + * @alpha2: current alpha2 + * @def_country: default country alpha2 + * @def_region: DFS region + * @ctl_2g: 2G CTL value + * @ctl_5g: 5G CTL value + * @reg_pair: pointer to regulatory pair + * @cc_src: country code src + * @reg_flags: kernel regulatory flags + */ struct regulatory { uint32_t reg_domain; uint32_t eeprom_rd_ext; uint16_t country_code; - uint8_t alpha2[3]; - uint8_t def_country[3]; + uint8_t alpha2[CDS_COUNTRY_CODE_LEN + 1]; + uint8_t def_country[CDS_COUNTRY_CODE_LEN + 1]; uint8_t dfs_region; uint8_t ctl_2g; uint8_t ctl_5g; const void *regpair; - COUNTRY_CODE_SOURCE cc_src; + enum country_src cc_src; uint32_t reg_flags; }; -typedef enum { - COUNTRY_INIT, - COUNTRY_IE, - COUNTRY_USER, - COUNTRY_QUERY, - COUNTRY_MAX = COUNTRY_QUERY -} v_CountryInfoSource_t; - /** * enum chan_width: channel width * @@ -274,37 +314,32 @@ enum channel_width { CHAN_WIDTH_160MHZ }; -/** - * @country_code_t : typedef for country code. One extra - * char for holding null character - */ -typedef uint8_t country_code_t[CDS_COUNTRY_CODE_LEN + 1]; extern struct regulatory_channel reg_channels[NUM_RF_CHANNELS]; extern const struct chan_map chan_mapping[NUM_RF_CHANNELS]; CDF_STATUS cds_get_reg_domain_from_country_code(v_REGDOMAIN_t *pRegDomain, - const country_code_t countryCode, - v_CountryInfoSource_t source); + const uint8_t *country_alpha2, + enum country_src source); -CDF_STATUS cds_read_default_country(country_code_t default_country); +CDF_STATUS cds_read_default_country(uint8_t *default_country); -CDF_STATUS cds_get_channel_list_with_power(tChannelListWithPower +CDF_STATUS cds_get_channel_list_with_power(struct channel_power *base_channels, uint8_t *num_base_channels, - tChannelListWithPower - *pChannels40MHz, - uint8_t *); + struct channel_power + *channel_40mhz, + uint8_t *num_channels_40mhz); CDF_STATUS cds_set_reg_domain(void *client_ctxt, v_REGDOMAIN_t reg_domain); -CHANNEL_STATE cds_get_channel_state(uint32_t chan_num); +enum channel_state cds_get_channel_state(uint32_t chan_num); CDF_STATUS cds_regulatory_init(void); CDF_STATUS cds_get_dfs_region(uint8_t *dfs_region); CDF_STATUS cds_set_dfs_region(uint8_t dfs_region); bool cds_is_dsrc_channel(uint16_t); -CHANNEL_STATE cds_get_bonded_channel_state(uint32_t chan_num, +enum channel_state cds_get_bonded_channel_state(uint32_t chan_num, enum channel_width chan_width); enum channel_width cds_get_max_channel_bw(uint32_t chan_num); diff --git a/core/cds/src/cds_reg_service.c b/core/cds/src/cds_reg_service.c index c1f0213ede23..b4aa41aa7b24 100644 --- a/core/cds/src/cds_reg_service.c +++ b/core/cds/src/cds_reg_service.c @@ -211,33 +211,24 @@ const struct chan_map chan_mapping[NUM_RF_CHANNELS] = { {5815, 163}, }; +struct regulatory_channel reg_channels[NUM_RF_CHANNELS]; static bool init_by_driver; static bool init_by_reg_core; -struct regulatory_channel reg_channels[NUM_RF_CHANNELS]; - -/** - * cds_is_wwr_sku() - is regdomain world sku - * @regd: integer regulatory domain - * - * Return: bool - */ -static inline bool cds_is_wwr_sku(u16 regd) -{ - return ((regd & COUNTRY_ERD_FLAG) != COUNTRY_ERD_FLAG) && - (((regd & WORLD_SKU_MASK) == WORLD_SKU_PREFIX) || - (regd == WORLD)); -} - /** * cds_is_world_regdomain() - whether world regdomain * @regd: integer regulatory domain * * Return: bool */ -bool cds_is_world_regdomain(uint32_t regd) +bool cds_is_world_regdomain(uint32_t reg_domain) { - return cds_is_wwr_sku(regd & ~WORLDWIDE_ROAMING_FLAG); + uint32_t temp_regd = reg_domain & ~WORLDWIDE_ROAMING_FLAG; + + return ((temp_regd & COUNTRY_ERD_FLAG) != COUNTRY_ERD_FLAG) && + (((temp_regd & WORLD_SKU_MASK) == WORLD_SKU_PREFIX) || + (temp_regd == WORLD)); + } @@ -368,11 +359,11 @@ static void cds_update_regulatory_info(hdd_context_t *hdd_ctx) * * Return: CDF_STATUS_SUCCESS */ -CDF_STATUS cds_get_channel_list_with_power(tChannelListWithPower * - base_channels, +CDF_STATUS cds_get_channel_list_with_power(struct channel_power + *base_channels, uint8_t *num_base_channels, - tChannelListWithPower * - channels_40mhz, + struct channel_power + *channels_40mhz, uint8_t *num_40mhz_channels) { CDF_STATUS status = CDF_STATUS_SUCCESS; @@ -381,18 +372,18 @@ CDF_STATUS cds_get_channel_list_with_power(tChannelListWithPower * if (base_channels && num_base_channels) { count = 0; for (i = 0; i <= RF_CHAN_14; i++) { - if (reg_channels[i].enabled) { - base_channels[count].chanId = + if (reg_channels[i].state) { + base_channels[count].chan_num = chan_mapping[i].chan_num; - base_channels[count++].pwr = + base_channels[count++].power = reg_channels[i].pwr_limit; } } for (i = RF_CHAN_36; i <= RF_CHAN_184; i++) { - if (reg_channels[i].enabled) { - base_channels[count].chanId = + if (reg_channels[i].state) { + base_channels[count].chan_num = chan_mapping[i].chan_num; - base_channels[count++].pwr = + base_channels[count++].power = reg_channels[i].pwr_limit; } } @@ -403,19 +394,19 @@ CDF_STATUS cds_get_channel_list_with_power(tChannelListWithPower * count = 0; for (i = RF_CHAN_BOND_3; i <= RF_CHAN_BOND_11; i++) { - if (reg_channels[i].enabled) { - channels_40mhz[count].chanId = + if (reg_channels[i].state) { + channels_40mhz[count].chan_num = chan_mapping[i].chan_num; - channels_40mhz[count++].pwr = + channels_40mhz[count++].power = reg_channels[i].pwr_limit; } } for (i = RF_CHAN_BOND_38; i <= RF_CHAN_BOND_163; i++) { - if (reg_channels[i].enabled) { - channels_40mhz[count].chanId = + if (reg_channels[i].state) { + channels_40mhz[count].chan_num = chan_mapping[i].chan_num; - channels_40mhz[count++].pwr = + channels_40mhz[count++].power = reg_channels[i].pwr_limit; } } @@ -431,7 +422,7 @@ CDF_STATUS cds_get_channel_list_with_power(tChannelListWithPower * * * Return: CDF_STATUS */ -CDF_STATUS cds_read_default_country(country_code_t default_country) +CDF_STATUS cds_read_default_country(uint8_t *default_country) { hdd_context_t *hdd_ctx; @@ -444,7 +435,7 @@ CDF_STATUS cds_read_default_country(country_code_t default_country) memcpy(default_country, hdd_ctx->reg.def_country, - sizeof(country_code_t)); + CDS_COUNTRY_CODE_LEN + 1); CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_INFO, "default country is %c%c\n", @@ -460,7 +451,7 @@ CDF_STATUS cds_read_default_country(country_code_t default_country) * * Return: enum for the channel */ -static eRfChannels cds_get_channel_enum(uint32_t chan_num) +static enum channel_enum cds_get_channel_enum(uint32_t chan_num) { uint32_t loop; @@ -479,17 +470,17 @@ static eRfChannels cds_get_channel_enum(uint32_t chan_num) * cds_get_channel_state() - get the channel state * @chan_num: channel number * - * Return: CHANNEL_STATE + * Return: channel state */ -CHANNEL_STATE cds_get_channel_state(uint32_t chan_num) +enum channel_state cds_get_channel_state(uint32_t chan_num) { - eRfChannels chan_enum; + enum channel_enum chan_enum; chan_enum = cds_get_channel_enum(chan_num); if (INVALID_RF_CHANNEL == chan_enum) return CHANNEL_STATE_INVALID; else - return reg_channels[chan_enum].enabled; + return reg_channels[chan_enum].state; } @@ -497,19 +488,19 @@ CHANNEL_STATE cds_get_channel_state(uint32_t chan_num) * cds_get_bonded_channel_state() - get the bonded channel state * @channel_num: channel number * - * Return: CHANNEL_STATE + * Return: channel state */ -CHANNEL_STATE cds_get_bonded_channel_state(uint32_t chan_num, +enum channel_state cds_get_bonded_channel_state(uint32_t chan_num, enum channel_width ch_width) { - eRfChannels chan_enum; + enum channel_enum chan_enum; bool bw_enabled = false; chan_enum = cds_get_channel_enum(chan_num); if (INVALID_RF_CHANNEL == chan_enum) return CHANNEL_STATE_INVALID; - if (reg_channels[chan_enum].enabled) { + if (reg_channels[chan_enum].state) { if (CHAN_WIDTH_5MHZ == ch_width) bw_enabled = 1; else if (CHAN_WIDTH_10MHZ == ch_width) @@ -530,7 +521,7 @@ CHANNEL_STATE cds_get_bonded_channel_state(uint32_t chan_num, } if (bw_enabled) - return reg_channels[chan_enum].enabled; + return reg_channels[chan_enum].state; else return CHANNEL_STATE_DISABLE; } @@ -543,13 +534,13 @@ CHANNEL_STATE cds_get_bonded_channel_state(uint32_t chan_num, */ enum channel_width cds_get_max_channel_bw(uint32_t chan_num) { - eRfChannels chan_enum; + enum channel_enum chan_enum; enum channel_width chan_bw = CHAN_WIDTH_0MHZ; chan_enum = cds_get_channel_enum(chan_num); if ((INVALID_RF_CHANNEL != chan_enum) && - (CHANNEL_STATE_DISABLE != reg_channels[chan_enum].enabled)) { + (CHANNEL_STATE_DISABLE != reg_channels[chan_enum].state)) { if (!(reg_channels[chan_enum].flags & IEEE80211_CHAN_NO_160MHZ)) @@ -673,9 +664,8 @@ CDF_STATUS cds_get_dfs_region(uint8_t *dfs_region) * CDF_STATUS_E_EMPTY country table empty */ CDF_STATUS cds_get_reg_domain_from_country_code(v_REGDOMAIN_t *reg_domain_ptr, - const country_code_t - country_code, - v_CountryInfoSource_t source) + const uint8_t *country_alpha2, + enum country_src source) { hdd_context_t *hdd_ctx = NULL; struct wiphy *wiphy = NULL; @@ -688,10 +678,10 @@ CDF_STATUS cds_get_reg_domain_from_country_code(v_REGDOMAIN_t *reg_domain_ptr, *reg_domain_ptr = 0; - if (COUNTRY_QUERY == source) + if (SOURCE_QUERY == source) return CDF_STATUS_SUCCESS; - if (NULL == country_code) { + if (NULL == country_alpha2) { CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR, ("Country code array is NULL")); return CDF_STATUS_E_FAULT; @@ -713,16 +703,16 @@ CDF_STATUS cds_get_reg_domain_from_country_code(v_REGDOMAIN_t *reg_domain_ptr, wiphy = hdd_ctx->wiphy; - if ((COUNTRY_INIT == source) && (false == init_by_reg_core)) { + if ((SOURCE_DRIVER == source) && (false == init_by_reg_core)) { init_by_driver = true; - if (('0' != country_code[0]) || ('0' != country_code[1])) { + if (('0' != country_alpha2[0]) || ('0' != country_alpha2[1])) { INIT_COMPLETION(hdd_ctx->reg_init); - regulatory_hint(wiphy, country_code); + regulatory_hint(wiphy, country_alpha2); wait_for_completion_timeout(&hdd_ctx->reg_init, msecs_to_jiffies(REG_WAIT_TIME)); } - } else if (COUNTRY_IE == source || COUNTRY_USER == source) { - regulatory_hint_user(country_code, + } else if (SOURCE_11D == source || SOURCE_USERSPACE == source) { + regulatory_hint_user(country_alpha2, NL80211_USER_REG_HINT_USER); } @@ -858,11 +848,11 @@ static int cds_process_regulatory_data(struct wiphy *wiphy, } if (chan->flags & IEEE80211_CHAN_DISABLED) { - temp_chan_k->enabled = + temp_chan_k->state = CHANNEL_STATE_DISABLE; temp_chan_k->flags = chan->flags; if (n != -1) { - temp_chan_n->enabled = + temp_chan_n->state = CHANNEL_STATE_DISABLE; temp_chan_n->flags = chan->flags; } @@ -881,7 +871,7 @@ static int cds_process_regulatory_data(struct wiphy *wiphy, chan->flags |= IEEE80211_CHAN_PASSIVE_SCAN; #endif - temp_chan_k->enabled = CHANNEL_STATE_DFS; + temp_chan_k->state = CHANNEL_STATE_DFS; temp_chan_k->pwr_limit = chan->max_power; temp_chan_k->flags = chan->flags; @@ -890,10 +880,10 @@ static int cds_process_regulatory_data(struct wiphy *wiphy, if ((chan->flags & IEEE80211_CHAN_NO_HT40) == IEEE80211_CHAN_NO_HT40) { - temp_chan_n->enabled = + temp_chan_n->state = CHANNEL_STATE_DISABLE; } else { - temp_chan_n->enabled = + temp_chan_n->state = CHANNEL_STATE_DFS; temp_chan_n->pwr_limit = chan->max_power-3; @@ -904,17 +894,17 @@ static int cds_process_regulatory_data(struct wiphy *wiphy, IEEE80211_CHAN_NO_80MHZ) == 0) hdd_ctx->isVHT80Allowed = 1; } else { - temp_chan_k->enabled = CHANNEL_STATE_ENABLE; + temp_chan_k->state = CHANNEL_STATE_ENABLE; temp_chan_k->pwr_limit = chan->max_power; temp_chan_k->flags = chan->flags; if (n != -1) { if ((chan->flags & IEEE80211_CHAN_NO_HT40) == IEEE80211_CHAN_NO_HT40) { - temp_chan_n->enabled = + temp_chan_n->state = CHANNEL_STATE_DISABLE; } else { - temp_chan_n->enabled = + temp_chan_n->state = CHANNEL_STATE_ENABLE; temp_chan_n->pwr_limit = chan->max_power - 3; @@ -931,7 +921,7 @@ static int cds_process_regulatory_data(struct wiphy *wiphy, if (0 == (hdd_ctx->reg.eeprom_rd_ext & (1 << WHAL_REG_EXT_FCC_CH_144))) { temp_chan = &(reg_channels[RF_CHAN_144]); - temp_chan->enabled = + temp_chan->state = CHANNEL_STATE_DISABLE; } @@ -1038,7 +1028,7 @@ void __hdd_reg_notifier(struct wiphy *wiphy, } if (NL80211_REGDOM_SET_BY_CORE == request->initiator) { - hdd_ctx->reg.cc_src = COUNTRY_CODE_SET_BY_CORE; + hdd_ctx->reg.cc_src = SOURCE_CORE; #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) || defined(WITH_BACKPORTS) if (wiphy->regulatory_flags & REGULATORY_CUSTOM_REG) #else @@ -1046,9 +1036,9 @@ void __hdd_reg_notifier(struct wiphy *wiphy, #endif reset = true; } else if (NL80211_REGDOM_SET_BY_DRIVER == request->initiator) - hdd_ctx->reg.cc_src = COUNTRY_CODE_SET_BY_DRIVER; + hdd_ctx->reg.cc_src = SOURCE_DRIVER; else { - hdd_ctx->reg.cc_src = COUNTRY_CODE_SET_BY_USER; + hdd_ctx->reg.cc_src = SOURCE_USERSPACE; #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)) && !defined(WITH_BACKPORTS) if ((request->alpha2[0] == '0') && (request->alpha2[1] == '0') && @@ -1138,7 +1128,7 @@ CDF_STATUS cds_regulatory_init(void) return CDF_STATUS_E_FAULT; } - reg_info->cc_src = COUNTRY_CODE_SET_BY_DRIVER; + reg_info->cc_src = SOURCE_DRIVER; ret_val = cds_fill_some_regulatory_info(reg_info); if (ret_val) { diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 1806541bbc05..686e16e2e448 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -5242,7 +5242,7 @@ struct wiphy *wlan_hdd_cfg80211_wiphy_alloc(int priv_size) int wlan_hdd_cfg80211_update_band(struct wiphy *wiphy, eCsrBand eBand) { int i, j; - CHANNEL_STATE channelEnabledState; + enum channel_state channelEnabledState; ENTER(); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 6a4e405da5a3..7be37c17fd84 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -4706,7 +4706,7 @@ static void hdd_ch_avoid_cb(void *hdd_context, void *indi_param) hdd_context_t *hdd_ctxt; tSirChAvoidIndType *ch_avoid_indi; uint8_t range_loop; - eRfChannels channel_loop, start_channel_idx = INVALID_RF_CHANNEL, + enum channel_enum channel_loop, start_channel_idx = INVALID_RF_CHANNEL, end_channel_idx = INVALID_RF_CHANNEL; uint16_t start_channel; uint16_t end_channel; diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 93c71024a27e..a077817867f4 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -2042,7 +2042,7 @@ typedef struct sSirPlmReq { uint16_t measDuration; /* in TU's,STA goes off-ch */ /* no of times the STA should cycle through PLM ch list */ uint8_t burstLen; - tPowerdBm desiredTxPwr; /* desired tx power */ + int8_t desiredTxPwr; /* desired tx power */ struct cdf_mac_addr mac_addr; /* MC dest addr */ /* no of channels */ uint8_t plmNumCh; diff --git a/core/mac/src/cfg/cfg_api.c b/core/mac/src/cfg/cfg_api.c index 6e3d63e8f343..e5578431e907 100644 --- a/core/mac/src/cfg/cfg_api.c +++ b/core/mac/src/cfg/cfg_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -572,19 +572,22 @@ tSirRetStatus wlan_cfg_get_str_len(tpAniSirGlobal pMac, uint16_t cfgId, } /*** end wlan_cfg_get_str_len() ***/ -/*------------------------------------------------------------- - \fn cfg_get_dot11d_transmit_power - \brief This function returns the regulatory max transmit power - \param pMac - \return tPowerdBm - Power - \-------------------------------------------------------------*/ -static tPowerdBm +/** + * cfg_get_dot11d_transmit_power() - regulatory max transmit power + * @pMac: pointer to mac data + * @cfgId: configuration ID + * @cfgLength: configuration length + * @channel: channel number + * + * Return: int8_t - power + */ +static int8_t cfg_get_dot11d_transmit_power(tpAniSirGlobal pMac, uint16_t cfgId, uint32_t cfgLength, uint8_t channel) { uint8_t *pCountryInfo = NULL; uint8_t count = 0; - tPowerdBm maxTxPwr = WMA_MAX_TXPOWER_INVALID; + int8_t maxTxPwr = WMA_MAX_TXPOWER_INVALID; /* At least one element is present */ if (cfgLength < sizeof(tSirMacChanInfo)) { @@ -644,11 +647,12 @@ error: \param channel \param rfBand -----------------------------------------------------------------------*/ -tPowerdBm cfg_get_regulatory_max_transmit_power(tpAniSirGlobal pMac, uint8_t channel) +int8_t cfg_get_regulatory_max_transmit_power(tpAniSirGlobal pMac, + uint8_t channel) { uint32_t cfgLength = 0; uint16_t cfgId = 0; - tPowerdBm maxTxPwr; + int8_t maxTxPwr; eRfBandMode rfBand = eRF_BAND_UNKNOWN; if ((channel >= SIR_11A_CHANNEL_BEGIN) && diff --git a/core/mac/src/include/cfg_api.h b/core/mac/src/include/cfg_api.h index e165d5a3622d..b6ed90796e01 100644 --- a/core/mac/src/include/cfg_api.h +++ b/core/mac/src/include/cfg_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012,2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2012, 2015-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -101,8 +101,8 @@ tSirRetStatus wlan_cfg_get_str_max_len(tpAniSirGlobal, uint16_t, uint32_t *); tSirRetStatus wlan_cfg_get_str_len(tpAniSirGlobal, uint16_t, uint32_t *); /* / Get the regulatory tx power on given channel */ -tPowerdBm cfg_get_regulatory_max_transmit_power(tpAniSirGlobal pMac, - uint8_t channel); +int8_t cfg_get_regulatory_max_transmit_power(tpAniSirGlobal pMac, + uint8_t channel); /* / Dump CFG data to memory */ void cfgDump(uint32_t *); diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h index 16ebd4dd5bf5..4a5b5752a791 100644 --- a/core/mac/src/pe/include/lim_session.h +++ b/core/mac/src/pe/include/lim_session.h @@ -276,10 +276,11 @@ typedef struct sPESession /* Added to Support BT-AMP */ #endif uint32_t lim11hEnable; - tPowerdBm maxTxPower; /* MIN (Regulatory and local power constraint) */ + int8_t maxTxPower; /* MIN (Regulatory and local power constraint) */ enum tCDF_ADAPTER_MODE pePersona; + #if defined WLAN_FEATURE_VOWIFI - tPowerdBm txMgmtPower; + int8_t txMgmtPower; #endif #ifdef WLAN_FEATURE_VOWIFI_11R diff --git a/core/mac/src/pe/include/rrm_api.h b/core/mac/src/pe/include/rrm_api.h index 849fa5c17919..998364e121de 100644 --- a/core/mac/src/pe/include/rrm_api.h +++ b/core/mac/src/pe/include/rrm_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012, 2014-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2012, 2014-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -45,8 +45,8 @@ #define RRM_BCN_RPT_NO_BSS_INFO 0 #define RRM_BCN_RPT_MIN_RPT 1 -uint8_t rrm_get_min_of_max_tx_power(tpAniSirGlobal pMac, tPowerdBm regMax, - tPowerdBm apTxPower); +uint8_t rrm_get_min_of_max_tx_power(tpAniSirGlobal pMac, int8_t regMax, + int8_t apTxPower); extern tSirRetStatus rrm_initialize(tpAniSirGlobal pMac); @@ -75,14 +75,14 @@ extern tSirRetStatus rrm_process_neighbor_report_response(tpAniSirGlobal pMac, extern void rrm_process_message(tpAniSirGlobal pMac, tpSirMsgQ pMsg); extern tSirRetStatus rrm_send_set_max_tx_power_req(tpAniSirGlobal pMac, - tPowerdBm txPower, + int8_t txPower, tpPESession pSessionEntry); -extern tPowerdBm rrm_get_mgmt_tx_power(tpAniSirGlobal pMac, +extern int8_t rrm_get_mgmt_tx_power(tpAniSirGlobal pMac, tpPESession pSessionEntry); extern void rrm_cache_mgmt_tx_power(tpAniSirGlobal pMac, - tPowerdBm txPower, tpPESession pSessionEntry); + int8_t txPower, tpPESession pSessionEntry); extern tpRRMCaps rrm_get_capabilities(tpAniSirGlobal pMac, tpPESession pSessionEntry); diff --git a/core/mac/src/pe/include/rrm_global.h b/core/mac/src/pe/include/rrm_global.h index a1db83544444..6d829fffa999 100644 --- a/core/mac/src/pe/include/rrm_global.h +++ b/core/mac/src/pe/include/rrm_global.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012, 2014-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2012, 2014-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -214,7 +214,7 @@ typedef struct sRrmPEContext { * gets it from bss decsription. */ tRRMCaps rrmEnabledCaps; - tPowerdBm txMgmtPower; + int8_t txMgmtPower; /* Dialog token for the request initiated from station. */ uint8_t DialogToken; tpRRMReq pCurrentReq; diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 008b8c4c860e..cd2b14c8cb0c 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -5012,7 +5012,7 @@ tSirRetStatus lim_is_dot11h_power_capabilities_in_range(tpAniSirGlobal pMac, tSirAssocReq *assoc, tpPESession psessionEntry) { - tPowerdBm localMaxTxPower; + int8_t localMaxTxPower; uint32_t localPwrConstraint; localMaxTxPower = @@ -5026,7 +5026,7 @@ tSirRetStatus lim_is_dot11h_power_capabilities_in_range(tpAniSirGlobal pMac, FL("Unable to get Local Power Constraint from cfg")); return eSIR_FAILURE; } - localMaxTxPower -= (tPowerdBm) localPwrConstraint; + localMaxTxPower -= (int8_t) localPwrConstraint; /** * The min Tx Power of the associating station should not be greater than (regulatory diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c index 72784141a56a..e37f09d58e80 100644 --- a/core/mac/src/pe/lim/lim_ft.c +++ b/core/mac/src/pe/lim/lim_ft.c @@ -844,8 +844,8 @@ void lim_fill_ft_session(tpAniSirGlobal pMac, tpPESession pftSessionEntry, tpPESession psessionEntry) { uint8_t currentBssUapsd; - tPowerdBm localPowerConstraint; - tPowerdBm regMax; + int8_t localPowerConstraint; + int8_t regMax; tSchBeaconStruct *pBeaconStruct; uint32_t selfDot11Mode; ePhyChanBondState cbEnabledMode; diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c index 4d16c164c892..21b1bb2ca939 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c @@ -2899,7 +2899,7 @@ void lim_complete_mlm_scan(tpAniSirGlobal mac_ctx, tSirResultCodes ret_code) */ void lim_set_channel(tpAniSirGlobal mac_ctx, uint8_t channel, uint8_t ch_center_freq_seg0, uint8_t ch_center_freq_seg1, - phy_ch_width ch_width, tPowerdBm max_tx_power, + phy_ch_width ch_width, int8_t max_tx_power, uint8_t pe_session_id) { #if !defined WLAN_FEATURE_VOWIFI @@ -2927,7 +2927,7 @@ void lim_set_channel(tpAniSirGlobal mac_ctx, uint8_t channel, /* Send WMA_CHNL_SWITCH_IND to HAL */ lim_send_switch_chnl_params(mac_ctx, channel, ch_center_freq_seg0, ch_center_freq_seg1, ch_width, - (tPowerdBm) localPwrConstraint, + (int8_t)localPwrConstraint, pe_session_id, false); #endif } diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index e11f9ac36e3f..47caaf885c71 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -1516,7 +1516,7 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) tpPESession session = NULL; uint8_t sme_session_id; uint16_t sme_transaction_id; - tPowerdBm local_power_constraint = 0, reg_max = 0; + int8_t local_power_constraint = 0, reg_max = 0; uint16_t ie_len; uint8_t *vendor_ie; tSirBssDescription bss_desc; @@ -2030,7 +2030,7 @@ end: } #if defined FEATURE_WLAN_ESE || defined WLAN_FEATURE_VOWIFI -uint8_t lim_get_max_tx_power(tPowerdBm regMax, tPowerdBm apTxPower, +uint8_t lim_get_max_tx_power(int8_t regMax, int8_t apTxPower, uint8_t iniTxPower) { uint8_t maxTxPower = 0; @@ -2071,7 +2071,7 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx, uint8_t session_id; uint8_t sme_session_id; uint16_t transaction_id; - tPowerdBm local_pwr_constraint = 0, reg_max = 0; + int8_t local_pwr_constraint = 0, reg_max = 0; uint32_t tele_bcn_en = 0; uint16_t size; @@ -4437,7 +4437,7 @@ void __lim_process_report_message(tpAniSirGlobal pMac, tpSirMsgQ pMsg) * @return None */ tSirRetStatus -lim_send_set_max_tx_power_req(tpAniSirGlobal pMac, tPowerdBm txPower, +lim_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower, tpPESession pSessionEntry) { tpMaxTxPowerParams pMaxTxParams = NULL; @@ -5038,7 +5038,7 @@ static void lim_process_sme_channel_change_request(tpAniSirGlobal mac_ctx, tpSirChanChangeRequest ch_change_req; tpPESession session_entry; uint8_t session_id; /* PE session_id */ - tPowerdBm max_tx_pwr; + int8_t max_tx_pwr; uint32_t val = 0; if (msg_buf == NULL) { diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c index f05f00c15904..2ec7b318a14e 100644 --- a/core/mac/src/pe/lim/lim_prop_exts_utils.c +++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -77,7 +77,7 @@ void lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie, uint16_t ie_len, uint8_t *qos_cap, uint16_t *prop_cap, uint8_t *uapsd, - tPowerdBm *local_constraint, tpPESession session) + int8_t *local_constraint, tpPESession session) { tSirProbeRespBeacon *beacon_struct; #if !defined WLAN_FEATURE_VOWIFI diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.h b/core/mac/src/pe/lim/lim_prop_exts_utils.h index a648a78ddbfd..6c0fd89b1886 100644 --- a/core/mac/src/pe/lim/lim_prop_exts_utils.h +++ b/core/mac/src/pe/lim/lim_prop_exts_utils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2014, 2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -54,7 +54,7 @@ uint32_t limComputeAvg(tpAniSirGlobal, uint32_t, uint32_t); /* / Function to extract AP's HCF capability from IE fields */ void lim_extract_ap_capability(tpAniSirGlobal, uint8_t *, uint16_t, uint8_t *, - uint16_t *, uint8_t *, tPowerdBm *, tpPESession); + uint16_t *, uint8_t *, int8_t *, tpPESession); tStaRateMode lim_get_sta_peer_type(tpAniSirGlobal, tpDphHashNode, tpPESession); #ifdef WLAN_FEATURE_11AC diff --git a/core/mac/src/pe/lim/lim_send_messages.c b/core/mac/src/pe/lim/lim_send_messages.c index 3e6f53b6ad76..264cf02c800f 100644 --- a/core/mac/src/pe/lim/lim_send_messages.c +++ b/core/mac/src/pe/lim/lim_send_messages.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -220,7 +220,7 @@ tSirRetStatus lim_send_switch_chnl_params(tpAniSirGlobal pMac, uint8_t ch_center_freq_seg0, uint8_t ch_center_freq_seg1, phy_ch_width ch_width, - tPowerdBm maxTxPower, + int8_t maxTxPower, uint8_t peSessionId, uint8_t is_restart) #endif diff --git a/core/mac/src/pe/lim/lim_send_messages.h b/core/mac/src/pe/lim/lim_send_messages.h index 95161fbab130..e8b4665a2962 100644 --- a/core/mac/src/pe/lim/lim_send_messages.h +++ b/core/mac/src/pe/lim/lim_send_messages.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -69,7 +69,7 @@ tSirRetStatus lim_send_switch_chnl_params(tpAniSirGlobal pMac, uint8_t ch_center_freq_seg0, uint8_t ch_center_freq_seg1, phy_ch_width ch_width, - tPowerdBm maxTxPower, + int8_t maxTxPower, uint8_t peSessionId, uint8_t is_restart); #else diff --git a/core/mac/src/pe/lim/lim_types.h b/core/mac/src/pe/lim/lim_types.h index a51c3d5f0ca5..514b70cdee9a 100644 --- a/core/mac/src/pe/lim/lim_types.h +++ b/core/mac/src/pe/lim/lim_types.h @@ -558,7 +558,7 @@ uint32_t lim_defer_msg(tpAniSirGlobal, tSirMsgQ *); /* / Function that Switches the Channel and sets the CB Mode */ void lim_set_channel(tpAniSirGlobal pMac, uint8_t channel, uint8_t ch_center_freq_seg0, uint8_t ch_center_freq_seg1, - phy_ch_width ch_width, tPowerdBm maxTxPower, + phy_ch_width ch_width, int8_t maxTxPower, uint8_t peSessionId); diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 41801aa1bbf0..98cb55117ff7 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -2738,7 +2738,7 @@ void lim_switch_primary_channel(tpAniSirGlobal pMac, uint8_t newChannel, return; } lim_send_switch_chnl_params(pMac, newChannel, 0, 0, CH_WIDTH_20MHZ, - (tPowerdBm) localPwrConstraint, + localPwrConstraint, psessionEntry->peSessionId, false); #endif return; @@ -4975,7 +4975,7 @@ void lim_update_sta_run_time_ht_switch_chnl_params(tpAniSirGlobal pMac, lim_send_switch_chnl_params(pMac, (uint8_t) pHTInfo->primaryChannel, center_freq, 0, psessionEntry->htRecommendedTxWidthSet, - (tPowerdBm) localPwrConstraint, + (int8_t)localPwrConstraint, psessionEntry->peSessionId, true); #endif diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h index cd9d6a1a1bf3..36fc97bc1825 100644 --- a/core/mac/src/pe/lim/lim_utils.h +++ b/core/mac/src/pe/lim/lim_utils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -95,9 +95,9 @@ void lim_print_msg_name(tpAniSirGlobal pMac, uint16_t logLevel, uint32_t msgType #if defined FEATURE_WLAN_ESE || defined WLAN_FEATURE_VOWIFI extern tSirRetStatus lim_send_set_max_tx_power_req(tpAniSirGlobal pMac, - tPowerdBm txPower, + int8_t txPower, tpPESession pSessionEntry); -extern uint8_t lim_get_max_tx_power(tPowerdBm regMax, tPowerdBm apTxPower, +extern uint8_t lim_get_max_tx_power(int8_t regMax, int8_t apTxPower, uint8_t iniTxPower); #endif uint8_t lim_is_addr_bc(tSirMacAddr); diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c index 1104a938f528..b4f499bc0edf 100644 --- a/core/mac/src/pe/rrm/rrm_api.c +++ b/core/mac/src/pe/rrm/rrm_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -55,7 +55,7 @@ uint8_t rrm_get_min_of_max_tx_power(tpAniSirGlobal pMac, - tPowerdBm regMax, tPowerdBm apTxPower) + int8_t regMax, int8_t apTxPower) { uint8_t maxTxPower = 0; uint8_t txPower = CDF_MIN(regMax, (apTxPower)); @@ -88,7 +88,7 @@ rrm_get_min_of_max_tx_power(tpAniSirGlobal pMac, * @return None */ void -rrm_cache_mgmt_tx_power(tpAniSirGlobal pMac, tPowerdBm txPower, +rrm_cache_mgmt_tx_power(tpAniSirGlobal pMac, int8_t txPower, tpPESession pSessionEntry) { lim_log(pMac, LOG3, "Cache Mgmt Tx Power = %d", txPower); @@ -115,7 +115,7 @@ rrm_cache_mgmt_tx_power(tpAniSirGlobal pMac, tPowerdBm txPower, * @param pSessionEntry session entry. * @return txPower */ -tPowerdBm rrm_get_mgmt_tx_power(tpAniSirGlobal pMac, tpPESession pSessionEntry) +int8_t rrm_get_mgmt_tx_power(tpAniSirGlobal pMac, tpPESession pSessionEntry) { lim_log(pMac, LOG3, "RrmGetMgmtTxPower called"); @@ -145,7 +145,7 @@ tPowerdBm rrm_get_mgmt_tx_power(tpAniSirGlobal pMac, tpPESession pSessionEntry) * @return None */ tSirRetStatus -rrm_send_set_max_tx_power_req(tpAniSirGlobal pMac, tPowerdBm txPower, +rrm_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower, tpPESession pSessionEntry) { tpMaxTxPowerParams pMaxTxParams; @@ -288,8 +288,7 @@ rrm_process_link_measurement_request(tpAniSirGlobal pMac, if ((LinkReport.txPower != (uint8_t) (pSessionEntry->maxTxPower)) && (eSIR_SUCCESS == rrm_send_set_max_tx_power_req(pMac, - (tPowerdBm) (LinkReport. - txPower), + LinkReport.txPower, pSessionEntry))) { PELOGW(lim_log (pMac, LOGW, @@ -299,8 +298,8 @@ rrm_process_link_measurement_request(tpAniSirGlobal pMac, pSessionEntry->maxTxPower, LinkReport.txPower, pLinkReq->MaxTxPower.maxTxPower); ) - pSessionEntry->maxTxPower = - (tPowerdBm) (LinkReport.txPower); + pSessionEntry->maxTxPower = + LinkReport.txPower; } LinkReport.dialogToken = pLinkReq->DialogToken.token; diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index 489d75808d6b..ca769bfc5764 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -716,7 +716,7 @@ static void __sch_beacon_process_for_session(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, tpPESession session) { - tPowerdBm localRRMConstraint = 0; + int8_t localRRMConstraint = 0; uint8_t bssIdx = 0; tUpdateBeaconParams beaconParams; uint8_t sendProbeReq = false; @@ -724,7 +724,7 @@ static void __sch_beacon_process_for_session(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr pMh = WMA_GET_RX_MAC_HEADER(rx_pkt_info); #endif #if defined FEATURE_WLAN_ESE || defined WLAN_FEATURE_VOWIFI - tPowerdBm regMax = 0, maxTxPower = 0; + int8_t regMax = 0, maxTxPower = 0; #endif cdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams)); beaconParams.paramChangeBitmap = 0; @@ -792,7 +792,7 @@ static void __sch_beacon_process_for_session(tpAniSirGlobal mac_ctx, #if defined FEATURE_WLAN_ESE if (session->isESEconnection) { - tPowerdBm localESEConstraint = 0; + int8_t localESEConstraint = 0; if (bcn->eseTxPwr.present) { localESEConstraint = bcn->eseTxPwr.power_limit; maxTxPower = lim_get_max_tx_power(maxTxPower, diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c index 9e09a08b7436..4ed3b3636314 100644 --- a/core/sap/src/sap_ch_select.c +++ b/core/sap/src/sap_ch_select.c @@ -2016,7 +2016,7 @@ uint8_t sap_select_channel(tHalHandle halHandle, ptSapContext pSapCtx, if ((safe_channels[i].channelNumber >= startChannelNum) && (safe_channels[i].channelNumber <= endChannelNum)) { - CHANNEL_STATE channel_type = + enum channel_state channel_type = cds_get_channel_state(safe_channels[i]. channelNumber); diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index a7e5d4d6f9b1..c0a7a506f578 100644 --- a/core/sme/inc/csr_internal.h +++ b/core/sme/inc/csr_internal.h @@ -692,8 +692,8 @@ typedef struct tagCsrScanStruct { uint8_t scanResultCfgAgingTime; tSirScanType curScanType; tCsrChannel channels11d; - tChannelListWithPower defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; - tChannelListWithPower + struct channel_power defaultPowerTable[WNI_CFG_VALID_CHANNEL_LIST_LEN]; + struct channel_power defaultPowerTable40MHz[WNI_CFG_VALID_CHANNEL_LIST_LEN]; uint32_t numChannelsDefault; tCsrChannel base_channels; /* The channel base to work on */ diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index 7b69bbeaf287..df5dc9e4dced 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -192,7 +192,7 @@ typedef enum { ------------------------------------------------------------------------*/ CDF_STATUS sme_open(tHalHandle hHal); CDF_STATUS sme_init_chan_list(tHalHandle hal, uint8_t *alpha2, - COUNTRY_CODE_SOURCE cc_src); + enum country_src cc_src); CDF_STATUS sme_close(tHalHandle hHal); CDF_STATUS sme_start(tHalHandle hHal); CDF_STATUS sme_stop(tHalHandle hHal, tHalStopType stopType); diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 41d15b960acc..06163a8fa913 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -1106,11 +1106,11 @@ CDF_STATUS sme_open(tHalHandle hHal) * sme_init_chan_list, triggers channel setup based on country code. */ CDF_STATUS sme_init_chan_list(tHalHandle hal, uint8_t *alpha2, - COUNTRY_CODE_SOURCE cc_src) + enum country_src cc_src) { tpAniSirGlobal pmac = PMAC_STRUCT(hal); - if ((cc_src == COUNTRY_CODE_SET_BY_USER) && + if ((cc_src == SOURCE_USERSPACE) && (pmac->roam.configParam.fSupplicantCountryCodeHasPriority)) { pmac->roam.configParam.Is11dSupportEnabled = false; } @@ -6945,7 +6945,7 @@ CDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac, void *pMsgBuf) tAniChangeCountryCodeReq *pMsg; v_REGDOMAIN_t domainIdIoctl; CDF_STATUS cdf_status = CDF_STATUS_SUCCESS; - static country_code_t default_country; + static uint8_t default_country[CDS_COUNTRY_CODE_LEN + 1]; pMsg = (tAniChangeCountryCodeReq *) pMsgBuf; /* @@ -7008,7 +7008,8 @@ CDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac, void *pMsgBuf) status = csr_get_regulatory_domain_for_country(pMac, pMac->scan.countryCodeCurrent, (v_REGDOMAIN_t *) & - domainIdIoctl, COUNTRY_QUERY); + domainIdIoctl, + SOURCE_QUERY); if (status != CDF_STATUS_SUCCESS) { sms_log(pMac, LOGE, FL(" fail to get regId %d"), domainIdIoctl); return status; @@ -7096,12 +7097,12 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx, && (mac_ctx->scan.countryCode11d[1] == 0)) status = csr_get_regulatory_domain_for_country(mac_ctx, "00", (v_REGDOMAIN_t *) ®_domain_id, - COUNTRY_IE); + SOURCE_11D); else status = csr_get_regulatory_domain_for_country(mac_ctx, mac_ctx->scan.countryCode11d, (v_REGDOMAIN_t *) ®_domain_id, - COUNTRY_IE); + SOURCE_11D); return CDF_STATUS_E_FAILURE; } @@ -11535,12 +11536,12 @@ CDF_STATUS sme_get_reg_info(tHalHandle hHal, uint8_t chanId, return status; for (i = 0; i < WNI_CFG_VALID_CHANNEL_LIST_LEN; i++) { - if (pMac->scan.defaultPowerTable[i].chanId == chanId) { + if (pMac->scan.defaultPowerTable[i].chan_num == chanId) { SME_SET_CHANNEL_REG_POWER(*regInfo1, - pMac->scan.defaultPowerTable[i].pwr); + pMac->scan.defaultPowerTable[i].power); SME_SET_CHANNEL_MAX_TX_POWER(*regInfo2, - pMac->scan.defaultPowerTable[i].pwr); + pMac->scan.defaultPowerTable[i].power); found = true; break; } diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index e3189eae4f33..922b80743fe7 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -341,7 +341,7 @@ CDF_STATUS csr_init_chan_list(tpAniSirGlobal mac, uint8_t *alpha2) { CDF_STATUS status; v_REGDOMAIN_t reg_id; - v_CountryInfoSource_t source = COUNTRY_INIT; + enum country_src source = SOURCE_DRIVER; mac->scan.countryCodeDefault[0] = alpha2[0]; mac->scan.countryCodeDefault[1] = alpha2[1]; @@ -388,7 +388,7 @@ CDF_STATUS csr_set_reg_info(tHalHandle hHal, uint8_t *apCntryCode) cntryCodeLength = WNI_CFG_COUNTRY_CODE_LEN; status = csr_get_regulatory_domain_for_country(pMac, apCntryCode, ®Id, - COUNTRY_USER); + SOURCE_USERSPACE); if (status != CDF_STATUS_SUCCESS) { sms_log(pMac, LOGE, FL(" fail to get regId for country Code %.2s"), @@ -436,7 +436,7 @@ CDF_STATUS csr_set_channels(tHalHandle hHal, tCsrConfigParam *pParam) pMac->scan.base_channels.channelList[index]; pParam->Csr11dinfo.ChnPower[index].numChannels = 1; pParam->Csr11dinfo.ChnPower[index].maxtxPower = - pMac->scan.defaultPowerTable[index].pwr; + pMac->scan.defaultPowerTable[index].power; } pParam->Csr11dinfo.Channels.numChannels = pMac->scan.base_channels.numChannels; @@ -462,7 +462,7 @@ CDF_STATUS csr_close(tpAniSirGlobal pMac) return status; } -static tPowerdBm csr_find_channel_pwr(tChannelListWithPower * +static int8_t csr_find_channel_pwr(struct channel_power * pdefaultPowerTable, uint8_t ChannelNum) { @@ -470,8 +470,8 @@ static tPowerdBm csr_find_channel_pwr(tChannelListWithPower * /* TODO: if defaultPowerTable is guaranteed to be in ascending */ /* order of channel numbers, we can employ binary search */ for (i = 0; i < WNI_CFG_VALID_CHANNEL_LIST_LEN; i++) { - if (pdefaultPowerTable[i].chanId == ChannelNum) - return pdefaultPowerTable[i].pwr; + if (pdefaultPowerTable[i].chan_num == ChannelNum) + return pdefaultPowerTable[i].power; } /* could not find the channel list in default list */ /* this should not have occured */ @@ -2521,7 +2521,7 @@ CDF_STATUS csr_get_channel_and_power_list(tpAniSirGlobal pMac) /* structure -- this will be used as the scan list */ for (Index = 0; Index < num20MHzChannelsFound; Index++) { pMac->scan.base_channels.channelList[Index] = - pMac->scan.defaultPowerTable[Index].chanId; + pMac->scan.defaultPowerTable[Index].chan_num; } pMac->scan.base_channels.numChannels = num20MHzChannelsFound; @@ -2530,7 +2530,8 @@ CDF_STATUS csr_get_channel_and_power_list(tpAniSirGlobal pMac) } for (Index = 0; Index < num40MHzChannelsFound; Index++) { pMac->scan.base40MHzChannels.channelList[Index] = - pMac->scan.defaultPowerTable40MHz[Index].chanId; + pMac->scan.defaultPowerTable40MHz[Index]. + chan_num; } pMac->scan.base40MHzChannels.numChannels = num40MHzChannelsFound; @@ -11868,11 +11869,11 @@ CDF_STATUS csr_get_cfg_valid_channels(tpAniSirGlobal pMac, uint8_t *pChannels, return CDF_STATUS_SUCCESS; } -tPowerdBm csr_get_cfg_max_tx_power(tpAniSirGlobal pMac, uint8_t channel) +int8_t csr_get_cfg_max_tx_power(tpAniSirGlobal pMac, uint8_t channel) { uint32_t cfgLength = 0; uint16_t cfgId = 0; - tPowerdBm maxTxPwr = 0; + int8_t maxTxPwr = 0; uint8_t *pCountryInfo = NULL; CDF_STATUS status; uint8_t count = 0; diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index c6e446bcdb80..5c44c089c6fa 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -3204,7 +3204,7 @@ static void csr_diag_reset_country_information(tpAniSirGlobal pMac) Index < pMac->scan.base_channels.numChannels; Index++) { p11dLog->TxPwr[Index] = CDF_MIN( - pMac->scan.defaultPowerTable[Index].pwr, + pMac->scan.defaultPowerTable[Index].power, pMac->roam.configParam.nTxPowerCap); } } @@ -3271,7 +3271,7 @@ void csr_add_vote_for_country_info(tpAniSirGlobal pMac, uint8_t *pCountryCode) if (!CDF_IS_STATUS_SUCCESS(csr_get_regulatory_domain_for_country(pMac, pCountryCode, NULL, - COUNTRY_QUERY))) { + SOURCE_QUERY))) { pCountryCode[0] = '0'; pCountryCode[1] = '0'; } @@ -3367,8 +3367,8 @@ CDF_STATUS csr_set_country_code(tpAniSirGlobal pMac, uint8_t *pCountry) if (pCountry) { status = csr_get_regulatory_domain_for_country(pMac, pCountry, - &domainId, - COUNTRY_USER); + &domainId, + SOURCE_USERSPACE); if (CDF_IS_STATUS_SUCCESS(status)) { cdf_mem_copy(pMac->scan.countryCodeCurrent, pCountry, @@ -3384,7 +3384,7 @@ CDF_STATUS csr_set_country_code(tpAniSirGlobal pMac, uint8_t *pCountry) /* Upon return, *pNumChn has the number of channels assigned. */ void csr_get_channel_power_info(tpAniSirGlobal pMac, tDblLinkList *list, uint32_t *num_ch, - tChannelListWithPower *chn_pwr_info) + struct channel_power *chn_pwr_info) { tListElem *entry; uint32_t chn_idx = 0, idx; @@ -3396,10 +3396,10 @@ void csr_get_channel_power_info(tpAniSirGlobal pMac, tDblLinkList *list, ch_set = GET_BASE_ADDR(entry, tCsrChannelPowerInfo, link); for (idx = 0; (idx < ch_set->numChannels) && (chn_idx < *num_ch); idx++) { - chn_pwr_info[chn_idx].chanId = + chn_pwr_info[chn_idx].chan_num = (uint8_t) (ch_set->firstChannel + (idx * ch_set->interChannelOffset)); - chn_pwr_info[chn_idx++].pwr = ch_set->txPower; + chn_pwr_info[chn_idx++].power = ch_set->txPower; } entry = csr_ll_next(list, entry, LL_ACCESS_LOCK); } @@ -3412,7 +3412,7 @@ void csr_get_channel_power_info(tpAniSirGlobal pMac, tDblLinkList *list, void csr_diag_apply_country_info(tpAniSirGlobal mac_ctx) { host_log_802_11d_pkt_type *p11dLog; - tChannelListWithPower chnPwrInfo[WNI_CFG_VALID_CHANNEL_LIST_LEN]; + struct channel_power chnPwrInfo[WNI_CFG_VALID_CHANNEL_LIST_LEN]; uint32_t nChnInfo = WNI_CFG_VALID_CHANNEL_LIST_LEN, nTmp; WLAN_HOST_DIAG_LOG_ALLOC(p11dLog, host_log_802_11d_pkt_type, @@ -3442,9 +3442,9 @@ void csr_diag_apply_country_info(tpAniSirGlobal mac_ctx) nChnInfo < WNI_CFG_VALID_CHANNEL_LIST_LEN; nChnInfo++) { if (p11dLog->Channels[nTmp] == - chnPwrInfo[nChnInfo].chanId) { + chnPwrInfo[nChnInfo].chan_num) { p11dLog->TxPwr[nTmp] = - chnPwrInfo[nChnInfo].pwr; + chnPwrInfo[nChnInfo].power; break; } } @@ -3476,7 +3476,7 @@ void csr_apply_country_information(tpAniSirGlobal pMac) || 0 == pMac->scan.channelOf11dInfo) return; status = csr_get_regulatory_domain_for_country(pMac, - pMac->scan.countryCode11d, &domainId, COUNTRY_QUERY); + pMac->scan.countryCode11d, &domainId, SOURCE_QUERY); if (!CDF_IS_STATUS_SUCCESS(status)) return; /* Check whether we need to enforce default domain */ @@ -3522,7 +3522,7 @@ void csr_save_channel_power_for_band(tpAniSirGlobal pMac, bool fill_5f) WNI_CFG_VALID_CHANNEL_LIST_LEN, 0); ch_info_start = chan_info; for (idx = 0; idx < max_ch_idx; idx++) { - ch = pMac->scan.defaultPowerTable[idx].chanId; + ch = pMac->scan.defaultPowerTable[idx].chan_num; tmp_bool = (fill_5f && CDS_IS_CHANNEL_5GHZ(ch)) || (!fill_5f && CDS_IS_CHANNEL_24GHZ(ch)); if (!tmp_bool) @@ -3534,10 +3534,10 @@ void csr_save_channel_power_for_band(tpAniSirGlobal pMac, bool fill_5f) } chan_info->firstChanNum = - pMac->scan.defaultPowerTable[idx].chanId; + pMac->scan.defaultPowerTable[idx].chan_num; chan_info->numChannels = 1; chan_info->maxTxPower = - CDF_MIN(pMac->scan.defaultPowerTable[idx].pwr, + CDF_MIN(pMac->scan.defaultPowerTable[idx].power, pMac->roam.configParam.nTxPowerCap); chan_info++; count++; @@ -3598,7 +3598,7 @@ bool csr_learn_11dcountry_information(tpAniSirGlobal pMac, goto free_ie; status = csr_get_regulatory_domain_for_country(pMac, pIesLocal->Country.country, &domainId, - COUNTRY_QUERY); + SOURCE_QUERY); if (CDF_IS_STATUS_SUCCESS(status) && (domainId == REGDOMAIN_WORLD)) goto free_ie; @@ -3610,7 +3610,7 @@ bool csr_learn_11dcountry_information(tpAniSirGlobal pMac, pCountryCodeSelected = pMac->scan.countryCodeElected; status = csr_get_regulatory_domain_for_country(pMac, - pCountryCodeSelected, &domainId, COUNTRY_IE); + pCountryCodeSelected, &domainId, SOURCE_11D); if (status != CDF_STATUS_SUCCESS) { sms_log(pMac, LOGE, FL("fail to get regId %d"), domainId); fRet = false; @@ -5400,8 +5400,9 @@ CDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, uint32_t len = sizeof(mac_ctx->roam.validChannelList); uint32_t index = 0; uint32_t new_index = 0; - CHANNEL_STATE channel_state; + enum channel_state channel_state; uint8_t ibss_channel = 0; + bool skip_dfs_chnl = mac_ctx->roam.configParam.initial_scan_no_dfs_chnl || !mac_ctx->scan.fEnableDFSChnlScan; diff --git a/core/sme/src/csr/csr_inside_api.h b/core/sme/src/csr/csr_inside_api.h index 7e2a489def6d..ab0f12719bca 100644 --- a/core/sme/src/csr/csr_inside_api.h +++ b/core/sme/src/csr/csr_inside_api.h @@ -396,7 +396,7 @@ CDF_STATUS csr_get_cfg_valid_channels(tpAniSirGlobal pMac, uint8_t *pChannels, uint32_t *pNumChan); void csr_roam_ccm_cfg_set_callback(tpAniSirGlobal pMac, int32_t result); -tPowerdBm csr_get_cfg_max_tx_power(tpAniSirGlobal pMac, uint8_t channel); +int8_t csr_get_cfg_max_tx_power(tpAniSirGlobal pMac, uint8_t channel); /* To free the last roaming profile */ void csr_free_roam_profile(tpAniSirGlobal pMac, uint32_t sessionId); @@ -584,7 +584,7 @@ CDF_STATUS csr_set_country_code(tpAniSirGlobal pMac, uint8_t *pCountry); CDF_STATUS csr_get_regulatory_domain_for_country(tpAniSirGlobal pMac, uint8_t *pCountry, v_REGDOMAIN_t *pDomainId, - v_CountryInfoSource_t source); + enum country_src source); /* some support functions */ bool csr_is11d_supported(tpAniSirGlobal pMac); diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index 95faef7eccf1..dfecf1bc92e3 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -5285,7 +5285,7 @@ tSirResultCodes csr_get_de_auth_rsp_status_code(tSirSmeDeauthRsp *pSmeRsp) tSirScanType csr_get_scan_type(tpAniSirGlobal pMac, uint8_t chnId) { tSirScanType scanType = eSIR_PASSIVE_SCAN; - CHANNEL_STATE channelEnabledType; + enum channel_state channelEnabledType; channelEnabledType = cds_get_channel_state(chnId); if (CHANNEL_STATE_ENABLE == channelEnabledType) { @@ -5395,13 +5395,14 @@ eCsrCfgDot11Mode csr_get_cfg_dot11_mode_from_csr_phy_mode(tCsrRoamProfile *pProf return cfgDot11Mode; } -CDF_STATUS csr_get_regulatory_domain_for_country - (tpAniSirGlobal pMac, - uint8_t *pCountry, - v_REGDOMAIN_t *pDomainId, v_CountryInfoSource_t source) { +CDF_STATUS csr_get_regulatory_domain_for_country(tpAniSirGlobal pMac, + uint8_t *pCountry, + v_REGDOMAIN_t *pDomainId, + enum country_src source) +{ CDF_STATUS status = CDF_STATUS_E_INVAL; CDF_STATUS cdf_status; - country_code_t countryCode; + uint8_t countryCode[CDS_COUNTRY_CODE_LEN + 1]; v_REGDOMAIN_t domainId; if (pCountry) { diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index bf14268e7abf..626df86d8ae4 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -903,8 +903,8 @@ struct wma_txrx_node { uint8_t nss; bool is_channel_switch; uint16_t pause_bitmap; - tPowerdBm tx_power; - tPowerdBm max_tx_power; + int8_t tx_power; + int8_t max_tx_power; uint32_t nwType; #if defined WLAN_FEATURE_VOWIFI_11R void *staKeyParams; diff --git a/core/wma/inc/wma_if.h b/core/wma/inc/wma_if.h index 5bfa717f2f40..3c1728b8c60f 100644 --- a/core/wma/inc/wma_if.h +++ b/core/wma/inc/wma_if.h @@ -317,7 +317,7 @@ typedef struct { uint16_t ht_caps; uint32_t vht_caps; tSirNwType nwType; - tPowerdBm maxTxPower; + int8_t maxTxPower; uint8_t atimIePresent; uint32_t peerAtimWindowLength; uint8_t nonRoamReassoc; @@ -487,8 +487,8 @@ typedef struct { uint8_t respReqd; uint8_t sessionId; #if defined WLAN_FEATURE_VOWIFI - tPowerdBm txMgmtPower; - tPowerdBm maxTxPower; + int8_t txMgmtPower; + int8_t maxTxPower; #endif /* WLAN_FEATURE_VOWIFI */ #if defined WLAN_FEATURE_VOWIFI_11R @@ -615,7 +615,7 @@ typedef struct { CDF_STATUS status; #if defined WLAN_FEATURE_VOWIFI uint32_t startTSF[2]; - tPowerdBm txMgmtPower; + int8_t txMgmtPower; #endif /* WLAN_FEATURE_VOWIFI */ } tStartScanParams, *tpStartScanParams; @@ -900,8 +900,8 @@ typedef struct { #endif /* WLAN_FEATURE_VOWIFI */ uint8_t peSessionId; #if defined WLAN_FEATURE_VOWIFI - tPowerdBm txMgmtPower; - tPowerdBm maxTxPower; + int8_t txMgmtPower; + int8_t maxTxPower; #endif /* WLAN_FEATURE_VOWIFI */ tSirMacAddr selfStaMacAddr; /* the request has power constraints, this should be applied only to @@ -1162,7 +1162,7 @@ typedef struct sMaxTxPowerParams { * In response, * power == tx power used for management frames. */ - tPowerdBm power; + int8_t power; enum tCDF_ADAPTER_MODE dev_mode; } tMaxTxPowerParams, *tpMaxTxPowerParams; @@ -1173,7 +1173,7 @@ typedef struct sMaxTxPowerParams { */ typedef struct sMaxTxPowerPerBandParams { eCsrBand bandInfo; - tPowerdBm power; + int8_t power; } tMaxTxPowerPerBandParams, *tpMaxTxPowerPerBandParams; /** diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 4aac03ff2f7f..fb57c04b6505 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -2704,7 +2704,7 @@ static void wma_vdev_set_bss_params(tp_wma_handle wma, int vdev_id, tSirMacBeaconInterval beaconInterval, uint8_t dtimPeriod, uint8_t shortSlotTimeSupported, - uint8_t llbCoexist, tPowerdBm maxTxPower) + uint8_t llbCoexist, int8_t maxTxPower) { int ret; uint32_t slot_time; @@ -2773,7 +2773,7 @@ static void wma_add_bss_ap_mode(tp_wma_handle wma, tpAddBssParams add_bss) struct wma_target_req *msg; uint8_t vdev_id, peer_id; CDF_STATUS status; - tPowerdBm maxTxPower; + int8_t maxTxPower; #ifdef WLAN_FEATURE_11W int ret = 0; #endif /* WLAN_FEATURE_11W */ @@ -3831,7 +3831,7 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params) CDF_STATUS status = CDF_STATUS_SUCCESS; ol_txrx_peer_handle peer; struct wma_txrx_node *iface; - tPowerdBm maxTxPower; + int8_t maxTxPower; int ret = 0; struct wma_target_req *msg; bool peer_assoc_cnf = false; diff --git a/core/wma/src/wma_power.c b/core/wma/src/wma_power.c index 3793675ca3c4..b8f855a53cfd 100644 --- a/core/wma/src/wma_power.c +++ b/core/wma/src/wma_power.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -490,7 +490,7 @@ void wma_set_max_tx_power(WMA_HANDLE handle, uint8_t vdev_id; int ret = -1; void *pdev; - tPowerdBm prev_max_power; + int8_t prev_max_power; pdev = wma_find_vdev_by_addr(wma_handle, tx_pwr_params->bssId.bytes, &vdev_id);