Browse Source

[802.11] Properly initialize autoassociation process

The recent change to process_add() to detect duplicate process
additions relies on the fact that all processes will be initialized
using process_init_stopped() before being passed to that function.
The autoassociation process was not initialized in this fashion, so
process_add() erroneously detected it as a duplicate.

Fix by using process_init_stopped() to initialize the autoassociation
process instead of setting the step member directly.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
tags/v0.9.8
Joshua Oreman 15 years ago
parent
commit
2310c30d1c
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/net/80211/net80211.c

+ 2
- 1
src/net/80211/net80211.c View File

@@ -767,7 +767,8 @@ struct net80211_device * net80211_alloc ( size_t priv_size )
767 767
 	dev->priv = ( u8 * ) dev + sizeof ( *dev );
768 768
 	dev->op = &net80211_null_ops;
769 769
 
770
-	dev->proc_assoc.step = net80211_step_associate;
770
+	process_init_stopped ( &dev->proc_assoc, net80211_step_associate,
771
+			       &netdev->refcnt );
771 772
 	INIT_LIST_HEAD ( &dev->mgmt_queue );
772 773
 	INIT_LIST_HEAD ( &dev->mgmt_info_queue );
773 774
 

Loading…
Cancel
Save