---
name: "ieee80211_alloc_hw"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/ieee80211_alloc_hw"
---

# ieee80211\_alloc\_hw(9)

Allocate a new hardware device

## NAME

ieee80211\_alloc\_hw - Allocate a new hardware device

## SYNOPSIS

**struct ieee80211\_hw \* ieee80211\_alloc\_hw(size\_t** *priv\_data\_len***, const struct ieee80211\_ops \*** *ops***);**

## ARGUMENTS

*priv\_data\_len*

length of private data

*ops*

callbacks for this device

## DESCRIPTION

This must be called once for each hardware device. The returned pointer must be used to refer to this device when calling other functions. mac80211 allocates a private data area for the driver pointed to by *priv* in struct ieee80211\_hw, the size of this area is given as *priv\_data\_len*.

## RETURN

A pointer to the new hardware device, or **NULL** on error.

## AUTHOR

**Johannes Berg** \<johannes@sipsolutions.net\>

Author.

## COPYRIGHT
