adm8211: Fix compilation for d80211 hwmode API change From: Michael Wu <flamingice@sourmilk.net> This fixes compilation for the d80211 hwmode API change. Based on a patch by Michael Buesch <mb@bu3sch.de>. Signed-off-by: Michael Wu <flamingice@sourmilk.net> --- drivers/net/wireless/d80211/adm8211/adm8211.c | 8 ++++++-- drivers/net/wireless/d80211/adm8211/adm8211.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/d80211/adm8211/adm8211.c b/drivers/net/wireless/d80211/adm8211/adm8211.c index d7fb484..3bdcec3 100644 --- a/drivers/net/wireless/d80211/adm8211/adm8211.c +++ b/drivers/net/wireless/d80211/adm8211/adm8211.c @@ -2035,8 +2035,6 @@ static int __devinit adm8211_probe(struc dev->channel_change_time = 1000; dev->maxssi = ADM8211_RX_MAX_SSI;// FIXME - This is an approximation - dev->num_modes = 1; - dev->modes = priv->modes; priv->modes[0].mode = MODE_IEEE80211B; /* channel info filled in by adm8211_read_eeprom */ memcpy(priv->rates, adm8211_rates, sizeof(adm8211_rates)); @@ -2069,6 +2067,12 @@ static int __devinit adm8211_probe(struc priv->channel = priv->modes[0].channels[0].chan; + err = ieee80211_register_hwmode(dev, &priv->modes[0]); + if (err) { + printk(KERN_ERR "%s (adm8211): Cannot register hwmode\n", pci_name(pdev)); + goto err_free_desc; + } + err = ieee80211_register_hw(dev); if (err) { printk(KERN_ERR "%s (adm8211): Cannot register hardware\n", pci_name(pdev)); diff --git a/drivers/net/wireless/d80211/adm8211/adm8211.h b/drivers/net/wireless/d80211/adm8211/adm8211.h index 06c54bc..dc7902f 100644 --- a/drivers/net/wireless/d80211/adm8211/adm8211.h +++ b/drivers/net/wireless/d80211/adm8211/adm8211.h @@ -532,7 +532,7 @@ struct adm8211_priv { unsigned cur_tx, dirty_tx, cur_rx; struct ieee80211_low_level_stats stats; - struct ieee80211_hw_modes modes[1]; + struct ieee80211_hw_mode modes[1]; struct ieee80211_rate rates[ARRAY_SIZE(adm8211_rates)]; int mode;