aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2012-11-02 08:27:49 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-11-05 09:54:46 -0500
commit391e53e33f0028f52ce5eedee1026830571f0d76 (patch)
treeb47e617da62222bc00b0c81ad283771fad656e91 /net/mac80211/cfg.c
parentf4e583c8935c6f52f9385ee7cfbea8f65c66a737 (diff)
mac80211: implement set_mcast_rate() callback
This new callback can be used to tune the rate to be used to send multicast frames. In the current state the multicast rate can be specified on IBSS/MESH joining only. This makes it impossible to select a custom multicast rate when then join command is sent by an external program (e.g. wpa_supplicant) Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index eebb70b0aa11..80e0618b25ba 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1954,6 +1954,16 @@ static int ieee80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
1954 return ieee80211_ibss_leave(IEEE80211_DEV_TO_SUB_IF(dev)); 1954 return ieee80211_ibss_leave(IEEE80211_DEV_TO_SUB_IF(dev));
1955} 1955}
1956 1956
1957static int ieee80211_set_mcast_rate(struct wiphy *wiphy, struct net_device *dev,
1958 int rate[IEEE80211_NUM_BANDS])
1959{
1960 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
1961
1962 memcpy(sdata->vif.bss_conf.mcast_rate, rate, sizeof(rate));
1963
1964 return 0;
1965}
1966
1957static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) 1967static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
1958{ 1968{
1959 struct ieee80211_local *local = wiphy_priv(wiphy); 1969 struct ieee80211_local *local = wiphy_priv(wiphy);
@@ -3180,6 +3190,7 @@ struct cfg80211_ops mac80211_config_ops = {
3180 .disassoc = ieee80211_disassoc, 3190 .disassoc = ieee80211_disassoc,
3181 .join_ibss = ieee80211_join_ibss, 3191 .join_ibss = ieee80211_join_ibss,
3182 .leave_ibss = ieee80211_leave_ibss, 3192 .leave_ibss = ieee80211_leave_ibss,
3193 .set_mcast_rate = ieee80211_set_mcast_rate,
3183 .set_wiphy_params = ieee80211_set_wiphy_params, 3194 .set_wiphy_params = ieee80211_set_wiphy_params,
3184 .set_tx_power = ieee80211_set_tx_power, 3195 .set_tx_power = ieee80211_set_tx_power,
3185 .get_tx_power = ieee80211_get_tx_power, 3196 .get_tx_power = ieee80211_get_tx_power,