Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #2050 (new enhancement)

Opened 14 years ago

Save memory on vap ptrtable malloc

Reported by: sven-ola@gmx.de Assigned to:
Priority: minor Milestone:
Component: madwifi: HAL Version:
Keywords: Cc:
Patch is attached: 0 Pending:

Description

While reading the source of if_ath.c, I've stumpled across a wrong malloc.

-               kzalloc(ath_maxvaps * sizeof(struct ieee80211vap), GFP_KERNEL);
+               kzalloc(ath_maxvaps * sizeof(struct ieee80211vap*), GFP_KERNEL);

As a side note: Is it really helpful to have two pointers to the same data everywhere? Why not use a simple type cast instead of the ubiquitous "avp = dev->priv; vap = &avp->av_vap;"...