/* Extra TX headroom required for alignment purposes. */
unsigned int extra_tx_headroom;
- struct usb_anchor *anchor;
unsigned int num_proto_errs;
/* Clock for System On Chip devices. */
struct clk *clk;
+
+ struct usb_anchor anchor[];
};
struct rt2x00_bar_list_entry {
usb_reset_device(usb_dev);
- hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);
+ hw = ieee80211_alloc_hw(struct_size(rt2x00dev, anchor, 1), ops->hw);
if (!hw) {
rt2x00_probe_err("Failed to allocate hardware\n");
return -ENOMEM;
if (retval)
goto exit_free_device;
- rt2x00dev->anchor = devm_kmalloc(&usb_intf->dev,
- sizeof(struct usb_anchor),
- GFP_KERNEL);
- if (!rt2x00dev->anchor) {
- retval = -ENOMEM;
- goto exit_free_reg;
- }
init_usb_anchor(rt2x00dev->anchor);
retval = rt2x00lib_probe_dev(rt2x00dev);
exit_free_anchor:
usb_kill_anchored_urbs(rt2x00dev->anchor);
-
-exit_free_reg:
rt2x00usb_free_reg(rt2x00dev);
exit_free_device: