aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-03-30 15:02:06 (GMT)
committerJouni Malinen <j@w1.fi>2013-03-30 15:06:27 (GMT)
commit08c99cafd2418eedb1d814212fab53b46e412fa4 (patch)
treea51f340dceaab6c3f07c40f2f0578e73a4f6f729
parent6b16917f391c8ae16d760d272557db423f112168 (diff)
downloadhostap-08c99cafd2418eedb1d814212fab53b46e412fa4.zip
hostap-08c99cafd2418eedb1d814212fab53b46e412fa4.tar.gz
hostap-08c99cafd2418eedb1d814212fab53b46e412fa4.tar.bz2
ap_list: Remove unused iteration list pointers
This iter_next/iter_prev pointers were not really used for anything, so get rid of the unnecessary complexity in the AP list maintenance. Signed-hostap: Jouni Malinen <j@w1.fi>
-rw-r--r--src/ap/ap_list.c30
-rw-r--r--src/ap/ap_list.h7
-rw-r--r--src/ap/hostapd.h1
3 files changed, 1 insertions, 37 deletions
diff --git a/src/ap/ap_list.c b/src/ap/ap_list.c
index 1d0b99a..585328c 100644
--- a/src/ap/ap_list.c
+++ b/src/ap/ap_list.c
@@ -87,34 +87,6 @@ static void ap_ap_list_del(struct hostapd_iface *iface, struct ap_info *ap)
}
-static void ap_ap_iter_list_add(struct hostapd_iface *iface,
- struct ap_info *ap)
-{
- if (iface->ap_iter_list) {
- ap->iter_prev = iface->ap_iter_list->iter_prev;
- iface->ap_iter_list->iter_prev = ap;
- } else
- ap->iter_prev = ap;
- ap->iter_next = iface->ap_iter_list;
- iface->ap_iter_list = ap;
-}
-
-
-static void ap_ap_iter_list_del(struct hostapd_iface *iface,
- struct ap_info *ap)
-{
- if (iface->ap_iter_list == ap)
- iface->ap_iter_list = ap->iter_next;
- else
- ap->iter_prev->iter_next = ap->iter_next;
-
- if (ap->iter_next)
- ap->iter_next->iter_prev = ap->iter_prev;
- else if (iface->ap_iter_list)
- iface->ap_iter_list->iter_prev = ap->iter_prev;
-}
-
-
static void ap_ap_hash_add(struct hostapd_iface *iface, struct ap_info *ap)
{
ap->hnext = iface->ap_hash[STA_HASH(ap->addr)];
@@ -148,7 +120,6 @@ static void ap_free_ap(struct hostapd_iface *iface, struct ap_info *ap)
{
ap_ap_hash_del(iface, ap);
ap_ap_list_del(iface, ap);
- ap_ap_iter_list_del(iface, ap);
iface->num_ap--;
os_free(ap);
@@ -203,7 +174,6 @@ static struct ap_info * ap_ap_add(struct hostapd_iface *iface, const u8 *addr)
ap_ap_list_add(iface, ap);
iface->num_ap++;
ap_ap_hash_add(iface, ap);
- ap_ap_iter_list_add(iface, ap);
if (iface->num_ap > iface->conf->ap_table_max_size && ap != ap->prev) {
wpa_printf(MSG_DEBUG, "Removing the least recently used AP "
diff --git a/src/ap/ap_list.h b/src/ap/ap_list.h
index d2c82ee..24606cc 100644
--- a/src/ap/ap_list.h
+++ b/src/ap/ap_list.h
@@ -14,15 +14,10 @@
struct ap_info {
/* Note: next/prev pointers are updated whenever a new beacon is
* received because these are used to find the least recently used
- * entries. iter_next/iter_prev are updated only when adding new BSSes
- * and when removing old ones. These should be used when iterating
- * through the table in a manner that allows beacons to be received
- * during the iteration. */
+ * entries. */
struct ap_info *next; /* next entry in AP list */
struct ap_info *prev; /* previous entry in AP list */
struct ap_info *hnext; /* next entry in hash table list */
- struct ap_info *iter_next; /* next entry in AP iteration list */
- struct ap_info *iter_prev; /* previous entry in AP iteration list */
u8 addr[6];
u8 supported_rates[WLAN_SUPP_RATES_MAX];
int erp; /* ERP Info or -1 if ERP info element not present */
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index f5aed99..89591c7 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -220,7 +220,6 @@ struct hostapd_iface {
int num_ap; /* number of entries in ap_list */
struct ap_info *ap_list; /* AP info list head */
struct ap_info *ap_hash[STA_HASH_SIZE];
- struct ap_info *ap_iter_list;
unsigned int drv_flags;