Lines 7524-7539
static int iwl4965_mac_config(struct iee
Link Here
|
7524 |
priv->add_radiotap = !!(conf->flags & IEEE80211_CONF_RADIOTAP); |
7524 |
priv->add_radiotap = !!(conf->flags & IEEE80211_CONF_RADIOTAP); |
7525 |
|
7525 |
|
7526 |
if (!iwl4965_is_ready(priv)) { |
7526 |
if (!iwl4965_is_ready(priv)) { |
7527 |
IWL_DEBUG_MAC80211("leave - not ready\n"); |
7527 |
IWL_DEBUG_MAC80211("leave - not ready\n"); |
7528 |
ret = -EIO; |
7528 |
ret = -EIO; |
7529 |
goto out; |
7529 |
goto out; |
7530 |
} |
7530 |
} |
7531 |
|
7531 |
|
|
|
7532 |
|
7533 |
/* if Monitor mode was enabled via 'configure_filter', |
7534 |
* switch modes now |
7535 |
*/ |
7536 |
if (test_bit(STATUS_RFMON_ON_PENDING, &priv->status)) { |
7537 |
clear_bit(STATUS_RFMON_ON_PENDING, &priv->status); |
7538 |
if (iwl4965_set_mode(priv, IEEE80211_IF_TYPE_MNTR) != 0) { |
7539 |
IWL_ERROR("iwl4965_set_mode(IEEE80211_IF_TYPE_MNTR) failed\n"); |
7540 |
ret = -EIO; |
7541 |
goto out; |
7542 |
} |
7543 |
} |
7544 |
|
7532 |
if (unlikely(!iwl4965_param_disable_hw_scan && |
7545 |
if (unlikely(!iwl4965_param_disable_hw_scan && |
7533 |
test_bit(STATUS_SCANNING, &priv->status))) { |
7546 |
test_bit(STATUS_SCANNING, &priv->status))) { |
7534 |
IWL_DEBUG_MAC80211("leave - scanning\n"); |
7547 |
IWL_DEBUG_MAC80211("leave - scanning\n"); |
7535 |
set_bit(STATUS_CONF_PENDING, &priv->status); |
7548 |
set_bit(STATUS_CONF_PENDING, &priv->status); |
7536 |
mutex_unlock(&priv->mutex); |
7549 |
mutex_unlock(&priv->mutex); |
7537 |
return 0; |
7550 |
return 0; |
7538 |
} |
7551 |
} |
7539 |
|
7552 |
|
Lines 7786-7802
static void iwl4965_configure_filter(str
Link Here
|
7786 |
unsigned int changed_flags, |
7799 |
unsigned int changed_flags, |
7787 |
unsigned int *total_flags, |
7800 |
unsigned int *total_flags, |
7788 |
int mc_count, struct dev_addr_list *mc_list) |
7801 |
int mc_count, struct dev_addr_list *mc_list) |
7789 |
{ |
7802 |
{ |
7790 |
/* |
7803 |
/* |
7791 |
* XXX: dummy |
7804 |
* XXX: dummy |
7792 |
* see also iwl4965_connection_init_rx_config |
7805 |
* see also iwl4965_connection_init_rx_config |
7793 |
*/ |
7806 |
*/ |
7794 |
*total_flags = 0; |
7807 |
/* ### Fix for monitor mode ### */ |
|
|
7808 |
struct iwl4965_priv *priv = hw->priv; |
7809 |
int new_flags = 0; |
7810 |
|
7811 |
if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) { |
7812 |
if (*total_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) { |
7813 |
IWL_DEBUG_MAC80211("Enter: type %d\n", IEEE80211_IF_TYPE_MNTR); |
7814 |
|
7815 |
set_bit(STATUS_RFMON_ON_PENDING, &priv->status); |
7816 |
new_flags |= (FIF_PROMISC_IN_BSS | |
7817 |
FIF_CONTROL | |
7818 |
FIF_OTHER_BSS); |
7819 |
} |
7820 |
} |
7821 |
*total_flags = new_flags; |
7795 |
} |
7822 |
} |
7796 |
|
7823 |
|
7797 |
static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw, |
7824 |
static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw, |
7798 |
struct ieee80211_if_init_conf *conf) |
7825 |
struct ieee80211_if_init_conf *conf) |
7799 |
{ |
7826 |
{ |
7800 |
struct iwl4965_priv *priv = hw->priv; |
7827 |
struct iwl4965_priv *priv = hw->priv; |
7801 |
|
7828 |
|
7802 |
IWL_DEBUG_MAC80211("enter\n"); |
7829 |
IWL_DEBUG_MAC80211("enter\n"); |