diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 70c4b8fba0ee..59a308b02f95 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -3391,6 +3391,55 @@ static int iwl3945_mac_sta_add(struct ieee80211_hw *hw, | |||
3391 | 3391 | ||
3392 | return 0; | 3392 | return 0; |
3393 | } | 3393 | } |
3394 | |||
3395 | static void iwl3945_configure_filter(struct ieee80211_hw *hw, | ||
3396 | unsigned int changed_flags, | ||
3397 | unsigned int *total_flags, | ||
3398 | u64 multicast) | ||
3399 | { | ||
3400 | struct iwl_priv *priv = hw->priv; | ||
3401 | __le32 filter_or = 0, filter_nand = 0; | ||
3402 | |||
3403 | #define CHK(test, flag) do { \ | ||
3404 | if (*total_flags & (test)) \ | ||
3405 | filter_or |= (flag); \ | ||
3406 | else \ | ||
3407 | filter_nand |= (flag); \ | ||
3408 | } while (0) | ||
3409 | |||
3410 | IWL_DEBUG_MAC80211(priv, "Enter: changed: 0x%x, total: 0x%x\n", | ||
3411 | changed_flags, *total_flags); | ||
3412 | |||
3413 | CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK); | ||
3414 | CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK); | ||
3415 | CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK); | ||
3416 | |||
3417 | #undef CHK | ||
3418 | |||
3419 | mutex_lock(&priv->mutex); | ||
3420 | |||
3421 | priv->staging_rxon.filter_flags &= ~filter_nand; | ||
3422 | priv->staging_rxon.filter_flags |= filter_or; | ||
3423 | |||
3424 | /* | ||
3425 | * Committing directly here breaks for some reason, | ||
3426 | * but we'll eventually commit the filter flags | ||
3427 | * change anyway. | ||
3428 | */ | ||
3429 | |||
3430 | mutex_unlock(&priv->mutex); | ||
3431 | |||
3432 | /* | ||
3433 | * Receiving all multicast frames is always enabled by the | ||
3434 | * default flags setup in iwl_connection_init_rx_config() | ||
3435 | * since we currently do not support programming multicast | ||
3436 | * filters into the device. | ||
3437 | */ | ||
3438 | *total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS | | ||
3439 | FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL; | ||
3440 | } | ||
3441 | |||
3442 | |||
3394 | /***************************************************************************** | 3443 | /***************************************************************************** |
3395 | * | 3444 | * |
3396 | * sysfs attributes | 3445 | * sysfs attributes |
@@ -3796,7 +3845,7 @@ static struct ieee80211_ops iwl3945_hw_ops = { | |||
3796 | .add_interface = iwl_mac_add_interface, | 3845 | .add_interface = iwl_mac_add_interface, |
3797 | .remove_interface = iwl_mac_remove_interface, | 3846 | .remove_interface = iwl_mac_remove_interface, |
3798 | .config = iwl_mac_config, | 3847 | .config = iwl_mac_config, |
3799 | .configure_filter = iwl_configure_filter, | 3848 | .configure_filter = iwl3945_configure_filter, |
3800 | .set_key = iwl3945_mac_set_key, | 3849 | .set_key = iwl3945_mac_set_key, |
3801 | .conf_tx = iwl_mac_conf_tx, | 3850 | .conf_tx = iwl_mac_conf_tx, |
3802 | .reset_tsf = iwl_mac_reset_tsf, | 3851 | .reset_tsf = iwl_mac_reset_tsf, |