aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-08-17 10:16:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-20 11:35:58 -0400
commit3ac64beecd27400d12cc7afb4108eef26c499f6a (patch)
treeda0220085f68e30fe61ba9b8833dc6311d6dc25e /include/net/mac80211.h
parentea416a793d2b611f22b42ba094fd2e5bd30fff43 (diff)
mac80211: allow configure_filter callback to sleep
Over time, a whole bunch of drivers have come up with their own scheme to delay the configure_filter operation to a workqueue. To be able to simplify things, allow configure_filter to sleep, and add a new prepare_multicast callback that drivers that need the multicast address list implement. This new callback must be atomic, but most drivers either don't care or just calculate a hash which can be done atomically and then uploaded to the hardware non-atomically. A cursory look suggests that at76c50x-usb, ar9170, mwl8k (which is actually very broken now), rt2x00, wl1251, wl1271 and zd1211 should make use of this new capability. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 76d43e12cc29..bc865206e5f1 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1219,10 +1219,13 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
1219 * the driver's configure_filter() function which frames should be 1219 * the driver's configure_filter() function which frames should be
1220 * passed to mac80211 and which should be filtered out. 1220 * passed to mac80211 and which should be filtered out.
1221 * 1221 *
1222 * The configure_filter() callback is invoked with the parameters 1222 * Before configure_filter() is invoked, the prepare_multicast()
1223 * @mc_count and @mc_list for the combined multicast address list 1223 * callback is invoked with the parameters @mc_count and @mc_list
1224 * of all virtual interfaces, @changed_flags telling which flags 1224 * for the combined multicast address list of all virtual interfaces.
1225 * were changed and @total_flags with the new flag states. 1225 * It's use is optional, and it returns a u64 that is passed to
1226 * configure_filter(). Additionally, configure_filter() has the
1227 * arguments @changed_flags telling which flags were changed and
1228 * @total_flags with the new flag states.
1226 * 1229 *
1227 * If your device has no multicast address filters your driver will 1230 * If your device has no multicast address filters your driver will
1228 * need to check both the %FIF_ALLMULTI flag and the @mc_count 1231 * need to check both the %FIF_ALLMULTI flag and the @mc_count
@@ -1375,9 +1378,13 @@ enum ieee80211_ampdu_mlme_action {
1375 * for association indication. The @changed parameter indicates which 1378 * for association indication. The @changed parameter indicates which
1376 * of the bss parameters has changed when a call is made. 1379 * of the bss parameters has changed when a call is made.
1377 * 1380 *
1381 * @prepare_multicast: Prepare for multicast filter configuration.
1382 * This callback is optional, and its return value is passed
1383 * to configure_filter(). This callback must be atomic.
1384 *
1378 * @configure_filter: Configure the device's RX filter. 1385 * @configure_filter: Configure the device's RX filter.
1379 * See the section "Frame filtering" for more information. 1386 * See the section "Frame filtering" for more information.
1380 * This callback must be implemented and atomic. 1387 * This callback must be implemented.
1381 * 1388 *
1382 * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit 1389 * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit
1383 * must be set or cleared for a given STA. Must be atomic. 1390 * must be set or cleared for a given STA. Must be atomic.
@@ -1479,10 +1486,12 @@ struct ieee80211_ops {
1479 struct ieee80211_vif *vif, 1486 struct ieee80211_vif *vif,
1480 struct ieee80211_bss_conf *info, 1487 struct ieee80211_bss_conf *info,
1481 u32 changed); 1488 u32 changed);
1489 u64 (*prepare_multicast)(struct ieee80211_hw *hw,
1490 int mc_count, struct dev_addr_list *mc_list);
1482 void (*configure_filter)(struct ieee80211_hw *hw, 1491 void (*configure_filter)(struct ieee80211_hw *hw,
1483 unsigned int changed_flags, 1492 unsigned int changed_flags,
1484 unsigned int *total_flags, 1493 unsigned int *total_flags,
1485 int mc_count, struct dev_addr_list *mc_list); 1494 u64 multicast);
1486 int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, 1495 int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
1487 bool set); 1496 bool set);
1488 int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd, 1497 int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd,