---
name: "ieee80211_generic_frame_duration"
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_generic_frame_duration"
---

# ieee80211\_generic\_frame\_duration(9)

Calculate the duration field for a frame

## NAME

ieee80211\_generic\_frame\_duration - Calculate the duration field for a frame

## SYNOPSIS

**\_\_le16 ieee80211\_generic\_frame\_duration(struct ieee80211\_hw \*** *hw***, struct ieee80211\_vif \*** *vif***, enum ieee80211\_band** *band***, size\_t** *frame\_len***, struct ieee80211\_rate \*** *rate***);**

## ARGUMENTS

*hw*

pointer obtained from **ieee80211\_alloc\_hw**.

*vif*

struct ieee80211\_vif pointer from the add\_interface callback.

*band*

the band to calculate the frame duration on

*frame\_len*

the length of the frame.

*rate*

the rate at which the frame is going to be transmitted.

## DESCRIPTION

Calculate the duration field of some generic frame, given its length and transmission rate (in 100kbps).

## RETURN

The duration.

## AUTHOR

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

Author.

## COPYRIGHT
