aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamed Abbas <mabbas@linux.intel.com>2008-04-04 19:59:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-08 16:44:43 -0400
commit84363e6e07f17f8cc580065260907ee3f0520485 (patch)
treef0113ebc756892a55543d8c6511291cad7ec6644
parent380a942b9177dcae1429fdd0f3639f92d9ab139d (diff)
mac80211: notify mac from low level driver (iwlwifi)
Add new API to MAC80211 to allow low level driver to notify MAC with driver status. Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c1
-rw-r--r--include/net/mac80211.h19
-rw-r--r--net/mac80211/ieee80211_sta.c23
4 files changed, 44 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 5e51cfcda39f..29a9ecdcbf35 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -5886,6 +5886,7 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
5886 if (priv->error_recovering) 5886 if (priv->error_recovering)
5887 iwl3945_error_recovery(priv); 5887 iwl3945_error_recovery(priv);
5888 5888
5889 ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
5889 return; 5890 return;
5890 5891
5891 restart: 5892 restart:
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index b043871d53f1..06e44dad5f02 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -5714,6 +5714,7 @@ static void iwl4965_alive_start(struct iwl_priv *priv)
5714 iwl4965_error_recovery(priv); 5714 iwl4965_error_recovery(priv);
5715 5715
5716 iwlcore_low_level_notify(priv, IWLCORE_START_EVT); 5716 iwlcore_low_level_notify(priv, IWLCORE_START_EVT);
5717 ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
5717 return; 5718 return;
5718 5719
5719 restart: 5720 restart:
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 999f970da6ba..079e7bd86c90 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -74,6 +74,14 @@
74 */ 74 */
75 75
76/** 76/**
77 * enum ieee80211_notification_type - Low level driver notification
78 * @IEEE80211_NOTIFY_RE_ASSOC: start the re-association sequence
79 */
80enum ieee80211_notification_types {
81 IEEE80211_NOTIFY_RE_ASSOC,
82};
83
84/**
77 * struct ieee80211_ht_bss_info - describing BSS's HT characteristics 85 * struct ieee80211_ht_bss_info - describing BSS's HT characteristics
78 * 86 *
79 * This structure describes most essential parameters needed 87 * This structure describes most essential parameters needed
@@ -1678,4 +1686,15 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid);
1678void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, 1686void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
1679 u16 tid); 1687 u16 tid);
1680 1688
1689/**
1690 * ieee80211_notify_mac - low level driver notification
1691 * @hw: pointer as obtained from ieee80211_alloc_hw().
1692 * @notification_types: enum ieee80211_notification_types
1693 *
1694 * This function must be called by low level driver to inform mac80211 of
1695 * low level driver status change or force mac80211 to re-assoc for low
1696 * level driver internal error that require re-assoc.
1697 */
1698void ieee80211_notify_mac(struct ieee80211_hw *hw,
1699 enum ieee80211_notification_types notif_type);
1681#endif /* MAC80211_H */ 1700#endif /* MAC80211_H */
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 9e30333aa81e..89481c919cb6 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -4225,3 +4225,26 @@ int ieee80211_sta_disassociate(struct net_device *dev, u16 reason)
4225 ieee80211_set_disassoc(dev, ifsta, 0); 4225 ieee80211_set_disassoc(dev, ifsta, 0);
4226 return 0; 4226 return 0;
4227} 4227}
4228
4229void ieee80211_notify_mac(struct ieee80211_hw *hw,
4230 enum ieee80211_notification_types notif_type)
4231{
4232 struct ieee80211_local *local = hw_to_local(hw);
4233 struct ieee80211_sub_if_data *sdata;
4234
4235 switch (notif_type) {
4236 case IEEE80211_NOTIFY_RE_ASSOC:
4237 rcu_read_lock();
4238 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
4239
4240 if (sdata->vif.type == IEEE80211_IF_TYPE_STA) {
4241 ieee80211_sta_req_auth(sdata->dev,
4242 &sdata->u.sta);
4243 }
4244
4245 }
4246 rcu_read_unlock();
4247 break;
4248 }
4249}
4250EXPORT_SYMBOL(ieee80211_notify_mac);