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 #728 (closed enhancement: fixed)

Opened 13 years ago

Last modified 13 years ago

Improve vap proc entry handling

Reported by: matt@mattb.net.nz Assigned to:
Priority: minor Milestone: version 0.9.2
Component: madwifi: 802.11 stack Version: trunk
Keywords: Cc:
Patch is attached: 1 Pending:

Description

The attached patch improve the ability of VAPs to handle proc entries. Specifically it allows parts of the driver to register a proc entry and appropriate handlers with the vap. The vap will then take care of ensuring that this proc entry exists for the lifetime of the vap and that it is correctly relocated if the vap is renamed.

Previously these tasks had to be handled by whatever registered the proc entry, which promoted code duplication.

The list of proc entries for a specific vap is stored as a linked list. Two new methods are added.

The first is used to add a proc entry to the vap. It is called ieee80211_proc_vcreate:

int ieee80211_proc_vcreate(struct ieee80211vap *vap, 
        struct file_operations *fileops, char *name)
  • vap - pointer to the vap to create the entry for
  • fileops - pointer to methods to handle read/writes from the entry. Any NULL entries in this structure will be substituted with default entries. These default entries will use a proc_ieee80211_priv structure to provide a list of associated stations. Typically a caller will only need to provide an open method to read the desired information into the read buffer of the proc_ieee80211_priv structure.
  • name - the name for the proc entry

The second method (ieee80211_proc_cleanup) is only used internally and cleans up the memory used by the linked list of proc entries when the vap is destroyed. ieee80211_proc_vdetach cannot be used for this purpose as it is used when a vap is being renamed. Were we to deallocate the linked list in the vdetach method all registered proc entries would be lost if a vap was renamed.

This patch will make it significantly easier to perform further development to add more information to the proc interface, please apply.

Signed-off-by: Matt Brown <matt@mattb.net.nz>

Attachments

mattb-vap-procentries.diff (6.7 kB) - added by matt@mattb.net.nz on 07/01/06 06:16:21.
Add proc entry handling support to the VAP code

Change History

07/01/06 06:16:21 changed by matt@mattb.net.nz

  • attachment mattb-vap-procentries.diff added.

Add proc entry handling support to the VAP code

07/02/06 07:36:42 changed by kelmo

  • version set to trunk.
  • milestone set to version 0.9.2.

Hey Matt,

I've put the two patches into pkg-madwifi SVN, and will test them out over the next days on a few boxes here. They look good, and so far everything is working at least as well as it was before ;-)

Will add a milestone for these to be in 0.9.2, since they are very complete (or until someone disagrees).

Kel.

07/04/06 12:22:40 changed by kelmo

  • status changed from new to closed.
  • resolution set to fixed.

Applied to r1666.