]> pilppa.org Git - linux-2.6-omap-h63xx.git/commit
iwlwifi: initialize geo/channel information during probe
authorReinette Chatre <reinette.chatre@intel.com>
Wed, 23 Jan 2008 18:15:18 +0000 (10:15 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Feb 2008 03:26:41 +0000 (19:26 -0800)
commit849e0dcea6b28a900e4743c1ada6db752fced5a9
tree91abfca69729ef1b633012412012b7bf64f7610f
parent75849d287ce5d75f3c79f153eaf74759ae95511f
iwlwifi: initialize geo/channel information during probe

The geo/channel information is obtained from the EEPROM, which is read
during probe. We can thus set up channel information at this time. This
helps us to support ioctl commands that rely on this before the interface
is brought up.

Clearly matches _init_channel_map with _free_channel_map and _init_geos
with _free_geos to ensure functions calling these routines can also call
their cleanup routines.

Fixes a few bugs:
- if channel information is not available when ioctl commands are
  issued then we get a NULL pointer oops. Having channel information
  set up during probe we can deal with ioctl commands without requiring
  interface to be brought up.
  This fixes bug: http://www.bughost.org/bugzilla/show_bug.cgi?id=1552
- Fix potential problem if user triggers probe/remove/probe sequence. The
  value of priv->channel_count was used to determine if channel map is
  set up. This value was never reset when channel map was removed.
- Fix memory leak: priv->modes need to be freed when device removed.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl4965-base.c