Guest User

NetRolller 3D

a guest
Jul 18th, 2008
8,733
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
  2. index 6d1467d..78b1315 100644
  3. --- a/drivers/net/wireless/iwlwifi/iwl-sta.c
  4. +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
  5. @@ -968,6 +968,11 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
  6.         iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));
  7.         return priv->hw_params.bcast_sta_id;
  8.  
  9. +   /* If we are in monitor mode, use BCAST. This is required for
  10. +    * packet injection. */
  11. +   case IEEE80211_IF_TYPE_MNTR:
  12. +       return priv->hw_params.bcast_sta_id;
  13. +
  14.     default:
  15.         IWL_WARNING("Unknown mode of operation: %d", priv->iw_mode);
  16.         return priv->hw_params.bcast_sta_id;
  17. diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
  18. index 032641d..55149d4 100644
  19. --- a/drivers/net/wireless/iwlwifi/iwl-tx.c
  20. +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
  21. @@ -783,11 +783,6 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
  22.         goto drop_unlock;
  23.     }
  24.  
  25. -   if (!priv->vif) {
  26. -       IWL_DEBUG_DROP("Dropping - !priv->vif\n");
  27. -       goto drop_unlock;
  28. -   }
  29. -
  30.     if ((ieee80211_get_tx_rate(priv->hw, info)->hw_value & 0xFF) ==
  31.          IWL_INVALID_RATE) {
  32.         IWL_ERROR("ERROR: No TX rate available.\n");
  33. @@ -810,9 +805,11 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
  34.  
  35.     /* drop all data frame if we are not associated */
  36.     if (ieee80211_is_data(fc) &&
  37. -      (!iwl_is_associated(priv) ||
  38. -       ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && !priv->assoc_id) ||
  39. -       !priv->assoc_station_added)) {
  40. +       (priv->iw_mode != IEEE80211_IF_TYPE_MNTR ||
  41. +       !(info->flags & IEEE80211_TX_CTL_INJECTED)) && /* packet injection */
  42. +       (!iwl_is_associated(priv) ||
  43. +        ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && !priv->assoc_id) ||
  44. +        !priv->assoc_station_added)) {
  45.         IWL_DEBUG_DROP("Dropping - !iwl_is_associated\n");
  46.         goto drop_unlock;
  47.     }
  48. @@ -822,7 +819,10 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
  49.     hdr_len = ieee80211_get_hdrlen(le16_to_cpu(fc));
  50.  
  51.     /* Find (or create) index into station table for destination station */
  52. -   sta_id = iwl_get_sta_id(priv, hdr);
  53. +   if (info->flags & IEEE80211_TX_CTL_INJECTED)
  54. +       sta_id = priv->hw_params.bcast_sta_id;
  55. +   else
  56. +       sta_id = iwl_get_sta_id(priv, hdr);
  57.     if (sta_id == IWL_INVALID_STATION) {
  58.         DECLARE_MAC_BUF(mac);
  59.  
  60. diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
  61. index 60b7a64..380cc38 100644
  62. --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
  63. +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
  64. @@ -2680,12 +2680,6 @@ static int iwl4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
  65.  
  66.     IWL_DEBUG_MAC80211("enter\n");
  67.  
  68. -   if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) {
  69. -       IWL_DEBUG_MAC80211("leave - monitor\n");
  70. -       dev_kfree_skb_any(skb);
  71. -       return 0;
  72. -   }
  73. -
  74.     IWL_DEBUG_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
  75.              ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
  76.  
  77.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×