From 21f852f52c63e07c13fc6da9720eae77795e9a1f Mon Sep 17 00:00:00 2001 From: Abhijit Pradhan Date: Thu, 27 Apr 2017 20:36:31 +0530 Subject: [PATCH] qcacmn: Fill antenna gain in master channel list Antenna gain is per regulatory structure. However we need it in per channel during transmission. Firmware sends antenna gain per regulatory rule. Host copies it to per channel structure. Change-Id: Ia163f46facec03ccd450994acbeb28d1e9f2a111 CRs-Fixed: 2002892 --- umac/regulatory/core/src/reg_services.c | 1 + umac/regulatory/dispatcher/inc/reg_services_public_struct.h | 1 + wmi/src/wmi_unified_tlv.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/umac/regulatory/core/src/reg_services.c b/umac/regulatory/core/src/reg_services.c index 7fc2c21f2c4f..0d391b43881f 100644 --- a/umac/regulatory/core/src/reg_services.c +++ b/umac/regulatory/core/src/reg_services.c @@ -1033,6 +1033,7 @@ static void reg_fill_channel_info(enum channel_enum chan_enum, ~REGULATORY_CHAN_DISABLED; master_list[chan_enum].tx_power = reg_rule->reg_power; + master_list[chan_enum].ant_gain = reg_rule->ant_gain; master_list[chan_enum].state = CHANNEL_STATE_ENABLE; if (reg_rule->flags & REGULATORY_CHAN_NO_IR) { diff --git a/umac/regulatory/dispatcher/inc/reg_services_public_struct.h b/umac/regulatory/dispatcher/inc/reg_services_public_struct.h index 9cc10f37784a..d163658a5c7f 100644 --- a/umac/regulatory/dispatcher/inc/reg_services_public_struct.h +++ b/umac/regulatory/dispatcher/inc/reg_services_public_struct.h @@ -330,6 +330,7 @@ struct regulatory_channel { uint32_t tx_power; uint16_t min_bw; uint16_t max_bw; + uint8_t ant_gain; bool nol_chan; }; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 1c985cffe998..3e6f625c4c8a 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -17138,6 +17138,9 @@ static struct cur_reg_rule reg_rule_ptr[count].reg_power = WMI_REG_RULE_REG_POWER_GET( wmi_reg_rule[count].bw_pwr_info); + reg_rule_ptr[count].ant_gain = + WMI_REG_RULE_ANTENNA_GAIN_GET( + wmi_reg_rule[count].bw_pwr_info); reg_rule_ptr[count].flags = WMI_REG_RULE_FLAGS_GET( wmi_reg_rule[count].flag_info);