support for antenna configuration profiles
PATCH 2/6 support for antenna configuration profiles
This adds the operations set_extant and get_extant to cfg80211.
Signed-off-by Daniel Golle <[email protected]>
net/mac80211/driver-ops.h +20 -0
@@ -580,6 +580,26 @@ static inline int drv_get_antenna(structreturn ret; } +static inline int drv_set_extant (struct ieee80211_local *local,u32 extant) +{ +int ret = -EOPNOTSUPP ; +might_sleep (); +if (local->ops->set_extant) + ret = local->ops->set_extant (&local->hw, extant); +trace_drv_set_extant (local, extant, ret); +return ret; +} + +static inline int drv_get_extant (struct ieee80211_local *local,u32 *extant) +{ +int ret = -EOPNOTSUPP ; +might_sleep (); +if (local->ops->get_extant) + ret = local->ops->get_extant (&local->hw, extant); +trace_drv_get_extant (local, *extant, ret); +return ret; +} + static inline int drv_remain_on_channel(struct ieee80211_local *local, struct ieee80211_channel *chan, enum nl80211_channel_type chantype,
net/mac80211/driver-trace.h +46 -0
52 lines not on this page · raw message
include/net/mac80211.h +3 -0
@@ -2195,6 +2195,9 @@ struct ieee80211_ops {int (*set_antenna)(struct ieee80211_hw *hw,u32 tx_ant,u32 rx_ant);int (*get_antenna)(struct ieee80211_hw *hw,u32 *tx_ant,u32 *rx_ant); +int (*set_extant)(struct ieee80211_hw *hw,u32 extant); +int (*get_extant)(struct ieee80211_hw *hw,u32 *extant); + int (*remain_on_channel)(struct ieee80211_hw *hw, struct ieee80211_channel *chan, enum nl80211_channel_type channel_type,
net/mac80211/cfg.c +19 -0
@@ -2153,6 +2153,23 @@ static int ieee80211_get_antenna(structreturn drv_get_antenna (local, tx_ant, rx_ant); } +static int ieee80211_set_extant (struct wiphy *wiphy,u32 extant) +{ +struct ieee80211_local *local =wiphy_priv (wiphy); + +if (local->started) +return -EOPNOTSUPP ; + +return drv_set_extant (local, extant); +} + +static int ieee80211_get_extant (struct wiphy *wiphy,u32 *extant) +{ +struct ieee80211_local *local =wiphy_priv (wiphy); + +return drv_get_extant (local, extant); +} +static int ieee80211_set_ringparam (struct wiphy *wiphy,u32 tx,u32 rx) {struct ieee80211_local *local =wiphy_priv (wiphy);
@@ -2560,6 +2577,8 @@ struct cfg80211_ops mac80211_config_ops .mgmt_frame_register = ieee80211_mgmt_frame_register, .set_antenna = ieee80211_set_antenna, .get_antenna = ieee80211_get_antenna, + .set_extant = ieee80211_set_extant, + .get_extant = ieee80211_get_extant, .set_ringparam = ieee80211_set_ringparam, .get_ringparam = ieee80211_get_ringparam, .set_rekey_data = ieee80211_set_rekey_data,