mac80211: notify driver for change in multicast rates
authorPradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Thu, 22 Mar 2018 19:18:03 +0000 (12:18 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 23 Mar 2018 12:23:17 +0000 (13:23 +0100)
With drivers implementing rate control in driver or firmware
rate_control_send_low() may not get called, and thus the
driver needs to know about changes in the multicast rate.

Add and use a new BSS change flag for this.

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
[rewrite commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/cfg.c
net/mac80211/ibss.c
net/mac80211/mesh.c
net/mac80211/util.c

index 2fd59ed3be00b5b1e9d6749494819c88be242130..d39fd6838f41cadd2ecbcea8a94653acf361b8aa 100644 (file)
@@ -302,6 +302,8 @@ struct ieee80211_vif_chanctx_switch {
  * @BSS_CHANGED_MU_GROUPS: VHT MU-MIMO group id or user position changed
  * @BSS_CHANGED_KEEP_ALIVE: keep alive options (idle period or protected
  *     keep alive) changed.
+ * @BSS_CHANGED_MCAST_RATE: Multicast Rate setting changed for this interface
+ *
  */
 enum ieee80211_bss_change {
        BSS_CHANGED_ASSOC               = 1<<0,
@@ -329,6 +331,7 @@ enum ieee80211_bss_change {
        BSS_CHANGED_OCB                 = 1<<22,
        BSS_CHANGED_MU_GROUPS           = 1<<23,
        BSS_CHANGED_KEEP_ALIVE          = 1<<24,
+       BSS_CHANGED_MCAST_RATE          = 1<<25,
 
        /* when adding here, make sure to change ieee80211_reconfig */
 };
index fd68f6fb02d787b1a8b62d13d1b829c355f8f996..5c4b105ca39803b159085f2516e185e51e6ac9bd 100644 (file)
@@ -2313,6 +2313,8 @@ static int ieee80211_set_mcast_rate(struct wiphy *wiphy, struct net_device *dev,
        memcpy(sdata->vif.bss_conf.mcast_rate, rate,
               sizeof(int) * NUM_NL80211_BANDS);
 
+       ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_MCAST_RATE);
+
        return 0;
 }
 
index db07e0de9a0374229857f5a2fb4e081928ea936f..dc582aa35c8941b4a94a191e19a533311d986e3e 100644 (file)
@@ -1839,7 +1839,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
                  IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED
                | IEEE80211_HT_PARAM_RIFS_MODE;
 
-       changed |= BSS_CHANGED_HT;
+       changed |= BSS_CHANGED_HT | BSS_CHANGED_MCAST_RATE;
        ieee80211_bss_info_change_notify(sdata, changed);
 
        sdata->smps_mode = IEEE80211_SMPS_OFF;
index 6a381cbe1e33064f71f40110effc8a8fc6ad9ee4..d51da26e9c18562639bab3d24cfd6930ff8bb6e9 100644 (file)
@@ -880,7 +880,8 @@ int ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
                      BSS_CHANGED_BEACON_ENABLED |
                      BSS_CHANGED_HT |
                      BSS_CHANGED_BASIC_RATES |
-                     BSS_CHANGED_BEACON_INT;
+                     BSS_CHANGED_BEACON_INT |
+                     BSS_CHANGED_MCAST_RATE;
 
        local->fif_other_bss++;
        /* mesh ifaces must set allmulti to forward mcast traffic */
index 1f82191ce601e9aff2aa472d3eefa1614be33623..55cd2922627a2a00a17280b13456368adde795f8 100644 (file)
@@ -1968,7 +1968,8 @@ int ieee80211_reconfig(struct ieee80211_local *local)
                          BSS_CHANGED_CQM |
                          BSS_CHANGED_QOS |
                          BSS_CHANGED_IDLE |
-                         BSS_CHANGED_TXPOWER;
+                         BSS_CHANGED_TXPOWER |
+                         BSS_CHANGED_MCAST_RATE;
 
                if (sdata->vif.mu_mimo_owner)
                        changed |= BSS_CHANGED_MU_GROUPS;