2011-04-15 05:02:32

by Yogesh Ashok Powar

[permalink] [raw]
Subject: [PATCH 2/2] mwl8k: setting IEEE80211_HW_CRYPTO_ENABLED for AP mode

For AP mode, driver sets IEEE80211_HW_CRYPTO_ENABLED hardware flag to avoid
mac80211 reserving tail room space for crypto suite.

Signed-off-by: Yogesh Ashok Powar <[email protected]>
---
drivers/net/wireless/mwl8k.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 28ebaec..7ddc9ca 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -5472,6 +5472,10 @@ static int mwl8k_firmware_load_success(struct mwl8k_priv *priv)

/* Set rssi values to dBm */
hw->flags |= IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_HAS_RATE_CONTROL;
+
+ /* This is needed to avoid tailroom calculations */
+ hw->flags |= priv->ap_fw ? IEEE80211_HW_CRYPTO_ENABLED : 0;
+
hw->vif_data_size = sizeof(struct mwl8k_vif);
hw->sta_data_size = sizeof(struct mwl8k_sta);

--
1.7.3.5



2011-04-15 07:00:58

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 2/2] mwl8k: setting IEEE80211_HW_CRYPTO_ENABLED for AP mode

Yogesh Ashok Powar <[email protected]> writes:

> For AP mode, driver sets IEEE80211_HW_CRYPTO_ENABLED hardware flag to avoid
> mac80211 reserving tail room space for crypto suite.

A small style issue:

> + /* This is needed to avoid tailroom calculations */
> + hw->flags |= priv->ap_fw ? IEEE80211_HW_CRYPTO_ENABLED : 0;

Why not just:

if (priv->ap_fw)
hw->flags |= IEEE80211_HW_CRYPTO_ENABLED

A lot easier to read.

--
Kalle Valo