Skip to contentSkip to conversation

adm8211: Fix compilation for d80211 hwmode API change

PATCH In review Michael Buesch 2 participants 2 messages Dec 15, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 adm8211: Fix compilation for d80211 hwmode API change

This fixes compilation for the d80211 hwmode API change.

drivers/net/wireless/d80211/adm8211/adm8211.c +8 -2
Index: jbenc-dscape/drivers/net/wireless/d80211/adm8211/adm8211.c
===================================================================
@@ -2034,8 +2034,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));
@@ -2073,12 +2071,20 @@ static int __devinit adm8211_probe(struc
 		printk(KERN_ERR "%s (adm8211): Cannot register hardware\n", pci_name(pdev));
 		goto err_free_desc;
 	}
+	err = ieee80211_register_hwmode(dev, &priv->modes[0]);
+	if (err) {
+		printk(KERN_ERR "%s (adm8211): Cannot register hwmode\n", pci_name(pdev));
+		goto err_unreg_hw;
+	}
 
 	printk(KERN_INFO "wiphy%d: hwaddr " MAC_FMT ", Rev 0x%02x\n",
 	       dev->index, MAC_ARG(dev->perm_addr), priv->revid);
 
 	return 0;
 
+ err_unreg_hw:
+	ieee80211_unregister_hw(dev);
+
  err_free_desc:
 	pci_free_consistent(pdev,
 			    sizeof(struct adm8211_desc) * priv->rx_ring_size +
drivers/net/wireless/d80211/adm8211/adm8211.h +1 -1
Index: jbenc-dscape/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;
 
Signature · 1 line
Greetings Michael.