zd1211: Fix compilation for d80211 hwmode API change
Subsystems (3)
PATCH 1/1 zd1211: Fix compilation for d80211 hwmode API change
This fixes compilation for the d80211 hwmode API change.
Signed-off-by Michael Buesch <[email protected]>
drivers/net/wireless/d80211/zd1211rw/zd_mac.c +0 -3
@@ -521,9 +521,6 @@ struct ieee80211_hw *zd_mac_alloc(structIEEE80211_HW_WEP_INCLUDE_IV ; dev->maxssi =100 ; - dev->num_modes =2 ; - dev->modes = mac->modes; - dev->queues =1 ; dev->extra_tx_headroom =sizeof (struct zd_ctrlset );
drivers/net/wireless/d80211/zd1211rw/zd_mac.h +1 -1
@@ -137,7 +137,7 @@ struct zd_mac {u8 *hwaddr;struct ieee80211_channel channels[14 ];struct ieee80211_rate rates[12 ]; -struct ieee80211_hw_modes modes[2 ]; +struct ieee80211_hw_mode modes[2 ]; };static inline struct zd_mac *zd_dev_mac (struct ieee80211_hw *dev)
drivers/net/wireless/d80211/zd1211rw/zd_usb.c +11 -1
@@ -1006,7 +1006,7 @@ static int eject_installer(struct usb_instatic int probe (struct usb_interface *intf,const struct usb_device_id *id) { -int r; +int i, r;struct usb_device *udev =interface_to_usbdev (intf);struct ieee80211_hw *dev =NULL ;
@@ -1064,10 +1064,20 @@ static int probe(struct usb_interface *i "couldn't register device. Error number %d\n", r); goto error; } +for (i =0 ; i <2 ; i++) { +struct zd_mac *mac =zd_dev_mac (dev); + r =ieee80211_register_hwmode (dev, + &mac->modes[i]); +if (r) + goto error_unreg_hw; + }dev_dbg_f (&intf->dev,"successful\n" );dev_info (&intf->dev,"wiphy%d\n" , dev->index);return 0 ; + +error_unreg_hw: +ieee80211_unregister_hw (dev); error:usb_reset_device (interface_to_usbdev (intf));if (dev) {
Signature · 1 line
Greetings Michael.