Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149915
b: refs/heads/master
c: f5d3026
h: refs/heads/master
i:
  149913: a6a1323
  149911: ed04403
v: v3
  • Loading branch information
Abhijeet Kolekar authored and John W. Linville committed Apr 22, 2009
1 parent 62c33a7 commit 1cf8afc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 61 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 06fd3d86a426848dbd8db27b7257a4eb4be8cfae
refs/heads/master: f5d3026683da45e00c49a24999ad0d256e4651d5
61 changes: 1 addition & 60 deletions trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,65 +712,6 @@ static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv,
tx->next_frame_len = 0;
}

/**
* iwl3945_get_sta_id - Find station's index within station table
*/
static int iwl3945_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
{
int sta_id;
u16 fc = le16_to_cpu(hdr->frame_control);

/* If this frame is broadcast or management, use broadcast station id */
if (((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA) ||
is_multicast_ether_addr(hdr->addr1))
return priv->hw_params.bcast_sta_id;

switch (priv->iw_mode) {

/* If we are a client station in a BSS network, use the special
* AP station entry (that's the only station we communicate with) */
case NL80211_IFTYPE_STATION:
return IWL_AP_ID;

/* If we are an AP, then find the station, or use BCAST */
case NL80211_IFTYPE_AP:
sta_id = priv->cfg->ops->smgmt->find_station(priv, hdr->addr1);
if (sta_id != IWL_INVALID_STATION)
return sta_id;
return priv->hw_params.bcast_sta_id;

/* If this frame is going out to an IBSS network, find the station,
* or create a new station table entry */
case NL80211_IFTYPE_ADHOC: {
/* Create new station table entry */
sta_id = priv->cfg->ops->smgmt->find_station(priv, hdr->addr1);
if (sta_id != IWL_INVALID_STATION)
return sta_id;

sta_id = priv->cfg->ops->smgmt->add_station(priv,
hdr->addr1, 0, CMD_ASYNC, NULL);

if (sta_id != IWL_INVALID_STATION)
return sta_id;

IWL_DEBUG_DROP(priv, "Station %pM not in station map. "
"Defaulting to broadcast...\n",
hdr->addr1);
iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));
return priv->hw_params.bcast_sta_id;
}
/* If we are in monitor mode, use BCAST. This is required for
* packet injection. */
case NL80211_IFTYPE_MONITOR:
return priv->hw_params.bcast_sta_id;

default:
IWL_WARN(priv, "Unknown mode of operation: %d\n",
priv->iw_mode);
return priv->hw_params.bcast_sta_id;
}
}

/*
* start REPLY_TX command process
*/
Expand Down Expand Up @@ -836,7 +777,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
hdr_len = ieee80211_hdrlen(fc);

/* Find (or create) index into station table for destination station */
sta_id = iwl3945_get_sta_id(priv, hdr);
sta_id = iwl_get_sta_id(priv, hdr);
if (sta_id == IWL_INVALID_STATION) {
IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
hdr->addr1);
Expand Down

0 comments on commit 1cf8afc

Please sign in to comment.