Commit 35d55b5c authored by Abhijeet Kolekar's avatar Abhijeet Kolekar Committed by John W. Linville

iwl3945: replace association and beacon hooks with bss_info_changed cb

Let mac80211 and bss_info_changed callback handle the association and
beacon changes.
Signed-off-by: default avatarAbhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 322a9811
......@@ -688,87 +688,6 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv,
switch (le16_to_cpu(header->frame_control) & IEEE80211_FCTL_FTYPE) {
case IEEE80211_FTYPE_MGMT:
switch (le16_to_cpu(header->frame_control) &
IEEE80211_FCTL_STYPE) {
case IEEE80211_STYPE_PROBE_RESP:
case IEEE80211_STYPE_BEACON:{
/* If this is a beacon or probe response for
* our network then cache the beacon
* timestamp */
if ((((priv->iw_mode == IEEE80211_IF_TYPE_STA)
&& !compare_ether_addr(header->addr2,
priv->bssid)) ||
((priv->iw_mode == IEEE80211_IF_TYPE_IBSS)
&& !compare_ether_addr(header->addr3,
priv->bssid)))) {
struct ieee80211_mgmt *mgmt =
(struct ieee80211_mgmt *)header;
__le32 *pos;
pos = (__le32 *)&mgmt->u.beacon.
timestamp;
priv->timestamp0 = le32_to_cpu(pos[0]);
priv->timestamp1 = le32_to_cpu(pos[1]);
priv->beacon_int = le16_to_cpu(
mgmt->u.beacon.beacon_int);
if (priv->call_post_assoc_from_beacon &&
(priv->iw_mode ==
IEEE80211_IF_TYPE_STA))
queue_work(priv->workqueue,
&priv->post_associate.work);
priv->call_post_assoc_from_beacon = 0;
}
break;
}
case IEEE80211_STYPE_ACTION:
/* TODO: Parse 802.11h frames for CSA... */
break;
/*
* TODO: Use the new callback function from
* mac80211 instead of sniffing these packets.
*/
case IEEE80211_STYPE_ASSOC_RESP:
case IEEE80211_STYPE_REASSOC_RESP:{
struct ieee80211_mgmt *mgnt =
(struct ieee80211_mgmt *)header;
/* We have just associated, give some
* time for the 4-way handshake if
* any. Don't start scan too early. */
priv->next_scan_jiffies = jiffies +
IWL_DELAY_NEXT_SCAN_AFTER_ASSOC;
priv->assoc_id = (~((1 << 15) | (1 << 14)) &
le16_to_cpu(mgnt->u.
assoc_resp.aid));
priv->assoc_capability =
le16_to_cpu(mgnt->u.assoc_resp.capab_info);
if (priv->beacon_int)
queue_work(priv->workqueue,
&priv->post_associate.work);
else
priv->call_post_assoc_from_beacon = 1;
break;
}
case IEEE80211_STYPE_PROBE_REQ:{
DECLARE_MAC_BUF(mac1);
DECLARE_MAC_BUF(mac2);
DECLARE_MAC_BUF(mac3);
if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)
IWL_DEBUG_DROP
("Dropping (non network): %s"
", %s, %s\n",
print_mac(mac1, header->addr1),
print_mac(mac2, header->addr2),
print_mac(mac3, header->addr3));
return;
}
}
case IEEE80211_FTYPE_DATA:
/* fall through */
default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment