aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-18 03:37:55 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-18 03:37:55 -0400
commit577f99c1d08cf9cbdafd4e858dd13ff04d855090 (patch)
tree0f726bbda9b18d311d4c95198bbd96cb7ac01db0 /drivers/net/wireless/rt2x00/rt2x00dev.c
parent26c0f03f6b77c513cb7bc37b73a06819bdbb791b (diff)
parent2f633928cbba8a5858bb39b11e7219a41b0fbef5 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/rt2x00/rt2x00dev.c net/8021q/vlan_dev.c
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c39
1 files changed, 14 insertions, 25 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index b81efc9b058d..acf4d67ba43d 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -994,7 +994,7 @@ static void rt2x00lib_uninitialize(struct rt2x00_dev *rt2x00dev)
994 return; 994 return;
995 995
996 /* 996 /*
997 * Unregister rfkill. 997 * Unregister extra components.
998 */ 998 */
999 rt2x00rfkill_unregister(rt2x00dev); 999 rt2x00rfkill_unregister(rt2x00dev);
1000 1000
@@ -1033,11 +1033,9 @@ static int rt2x00lib_initialize(struct rt2x00_dev *rt2x00dev)
1033 __set_bit(DEVICE_INITIALIZED, &rt2x00dev->flags); 1033 __set_bit(DEVICE_INITIALIZED, &rt2x00dev->flags);
1034 1034
1035 /* 1035 /*
1036 * Register the rfkill handler. 1036 * Register the extra components.
1037 */ 1037 */
1038 status = rt2x00rfkill_register(rt2x00dev); 1038 rt2x00rfkill_register(rt2x00dev);
1039 if (status)
1040 goto exit;
1041 1039
1042 return 0; 1040 return 0;
1043 1041
@@ -1151,20 +1149,10 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
1151 } 1149 }
1152 1150
1153 /* 1151 /*
1154 * Register LED. 1152 * Register extra components.
1155 */ 1153 */
1156 rt2x00leds_register(rt2x00dev); 1154 rt2x00leds_register(rt2x00dev);
1157 1155 rt2x00rfkill_allocate(rt2x00dev);
1158 /*
1159 * Allocatie rfkill.
1160 */
1161 retval = rt2x00rfkill_allocate(rt2x00dev);
1162 if (retval)
1163 goto exit;
1164
1165 /*
1166 * Open the debugfs entry.
1167 */
1168 rt2x00debug_register(rt2x00dev); 1156 rt2x00debug_register(rt2x00dev);
1169 1157
1170 __set_bit(DEVICE_PRESENT, &rt2x00dev->flags); 1158 __set_bit(DEVICE_PRESENT, &rt2x00dev->flags);
@@ -1193,13 +1181,9 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
1193 rt2x00lib_uninitialize(rt2x00dev); 1181 rt2x00lib_uninitialize(rt2x00dev);
1194 1182
1195 /* 1183 /*
1196 * Close debugfs entry. 1184 * Free extra components
1197 */ 1185 */
1198 rt2x00debug_deregister(rt2x00dev); 1186 rt2x00debug_deregister(rt2x00dev);
1199
1200 /*
1201 * Free rfkill
1202 */
1203 rt2x00rfkill_free(rt2x00dev); 1187 rt2x00rfkill_free(rt2x00dev);
1204 1188
1205 /* 1189 /*
@@ -1243,12 +1227,16 @@ int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev, pm_message_t state)
1243 __set_bit(DEVICE_STARTED_SUSPEND, &rt2x00dev->flags); 1227 __set_bit(DEVICE_STARTED_SUSPEND, &rt2x00dev->flags);
1244 1228
1245 /* 1229 /*
1246 * Disable radio and unitialize all items 1230 * Disable radio.
1247 * that must be recreated on resume.
1248 */ 1231 */
1249 rt2x00lib_stop(rt2x00dev); 1232 rt2x00lib_stop(rt2x00dev);
1250 rt2x00lib_uninitialize(rt2x00dev); 1233 rt2x00lib_uninitialize(rt2x00dev);
1234
1235 /*
1236 * Suspend/disable extra components.
1237 */
1251 rt2x00leds_suspend(rt2x00dev); 1238 rt2x00leds_suspend(rt2x00dev);
1239 rt2x00rfkill_suspend(rt2x00dev);
1252 rt2x00debug_deregister(rt2x00dev); 1240 rt2x00debug_deregister(rt2x00dev);
1253 1241
1254exit: 1242exit:
@@ -1292,9 +1280,10 @@ int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev)
1292 NOTICE(rt2x00dev, "Waking up.\n"); 1280 NOTICE(rt2x00dev, "Waking up.\n");
1293 1281
1294 /* 1282 /*
1295 * Open the debugfs entry and restore led handling. 1283 * Restore/enable extra components.
1296 */ 1284 */
1297 rt2x00debug_register(rt2x00dev); 1285 rt2x00debug_register(rt2x00dev);
1286 rt2x00rfkill_resume(rt2x00dev);
1298 rt2x00leds_resume(rt2x00dev); 1287 rt2x00leds_resume(rt2x00dev);
1299 1288
1300 /* 1289 /*