--- orig/prism2_ap.c	Tue Jun  4 15:44:47 2002
+++ prism2_ap.new	Mon Jun 10 17:19:52 2002
@@ -691,6 +691,8 @@
 		     sta->tx_rate, sta->tx_count[0], sta->tx_count[1],
 		     sta->tx_count[2], sta->tx_count[3],  sta->rx_count[0],
 		     sta->rx_count[1], sta->rx_count[2], sta->rx_count[3]);
+	if (sta->ap)
+		p += sprintf(p, "ssid=%s\n",sta->ssid);
 
 	return (p - page);
 }
@@ -1568,6 +1570,14 @@
 			return;
 		}
 		memset(sta, 0, sizeof(struct sta_info));
+		
+		sta->local = local;
+		init_timer(&sta->timer);
+		sta->timer.expires = jiffies + local->ap->max_inactivity;
+		sta->timer.data = (unsigned long) sta;
+		sta->timer.function = ap_handle_timer;
+		add_timer(&sta->timer);
+
 		list_add(&sta->list, &local->ap->sta_list);
 		local->ap->num_sta++;
 		atomic_inc(&sta->users);
@@ -1585,7 +1595,11 @@
 			prism2_wds_add(local, sta->addr, 0);
 		}
 	}
-
+	if (ssid)
+	{
+		memcpy(sta->ssid, ssid, ssid_len);
+		sta->ssid[ssid_len] = '\0';
+	}
 	sta->ap = 1;
 	sta->rx_packets++;
 	sta->rx_bytes += len;
