aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-04-14 04:09:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:57:14 -0400
commitf2753ddbadb0873a98421415882318251bbd9eaa (patch)
treedaad40232be13d91835b30234e5743dfdd582f19 /net/mac80211/ieee80211_i.h
parenta1c555802a62c845520d2486d783c9bb1d5e68a9 (diff)
mac80211: add hardware restart function
Some hardware defects may require the hardware to be re-initialised completely from scratch. Drivers would need much information (for instance the current MAC address, crypto keys, beaconing information, etc.) stored duplicated from mac80211 to be able to do this, so let mac80211 help them. The new ieee80211_restart_hw() function requires the same code as resuming, so move that code into a new ieee80211_reconfig() function in util.c and leave only the suspend code in pm.c. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index cb80a80504e..13d6f890ced 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -748,6 +748,8 @@ struct ieee80211_local {
748 int user_power_level; /* in dBm */ 748 int user_power_level; /* in dBm */
749 int power_constr_level; /* in dBm */ 749 int power_constr_level; /* in dBm */
750 750
751 struct work_struct restart_work;
752
751#ifdef CONFIG_MAC80211_DEBUGFS 753#ifdef CONFIG_MAC80211_DEBUGFS
752 struct local_debugfsdentries { 754 struct local_debugfsdentries {
753 struct dentry *rcdir; 755 struct dentry *rcdir;
@@ -1036,15 +1038,22 @@ void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
1036 u16 capab_info, u8 *pwr_constr_elem, 1038 u16 capab_info, u8 *pwr_constr_elem,
1037 u8 pwr_constr_elem_len); 1039 u8 pwr_constr_elem_len);
1038 1040
1039/* Suspend/resume */ 1041/* Suspend/resume and hw reconfiguration */
1042int ieee80211_reconfig(struct ieee80211_local *local);
1043
1040#ifdef CONFIG_PM 1044#ifdef CONFIG_PM
1041int __ieee80211_suspend(struct ieee80211_hw *hw); 1045int __ieee80211_suspend(struct ieee80211_hw *hw);
1042int __ieee80211_resume(struct ieee80211_hw *hw); 1046
1047static inline int __ieee80211_resume(struct ieee80211_hw *hw)
1048{
1049 return ieee80211_reconfig(hw_to_local(hw));
1050}
1043#else 1051#else
1044static inline int __ieee80211_suspend(struct ieee80211_hw *hw) 1052static inline int __ieee80211_suspend(struct ieee80211_hw *hw)
1045{ 1053{
1046 return 0; 1054 return 0;
1047} 1055}
1056
1048static inline int __ieee80211_resume(struct ieee80211_hw *hw) 1057static inline int __ieee80211_resume(struct ieee80211_hw *hw)
1049{ 1058{
1050 return 0; 1059 return 0;