const u8 *addr);
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -1138,6 +1138,7 @@ enum ieee80211_smps_mode {
+@@ -1171,6 +1171,7 @@ enum ieee80211_smps_mode {
*
* @power_level: requested transmit power (in dBm), backward compatibility
* value only that is set to the minimum of all interfaces
*
* @chandef: the channel definition to tune to
* @radar_enabled: whether radar detection is enabled
-@@ -1159,6 +1160,7 @@ struct ieee80211_conf {
+@@ -1192,6 +1193,7 @@ struct ieee80211_conf {
u32 flags;
int power_level, dynamic_ps_timeout;
int max_sleep_period;
CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -1330,6 +1330,7 @@ struct ieee80211_local {
+@@ -1333,6 +1333,7 @@ struct ieee80211_local {
int dynamic_ps_forced_timeout;
int user_power_level; /* in dBm, for all interfaces */
};
/* policy for the key attributes */
-@@ -2207,6 +2208,20 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -2206,6 +2207,20 @@ static int nl80211_set_wiphy(struct sk_b
+ if (result)
return result;
}
-
++
+ if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_GAIN]) {
+ int idx, dbi = 0;
+
+ if (result)
+ return result;
+ }
-+
+
if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_TX] &&
info->attrs[NL80211_ATTR_WIPHY_ANTENNA_RX]) {
- u32 tx_ant, rx_ant;