From: Shahar Levi <shahar_levi@ti.com>
To: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Luciano Coelho <luciano.coelho@nokia.com>
Subject: Re: [PATCH ] wl12xx: BA receiver support
Date: Thu, 25 Nov 2010 13:49:14 +0200 [thread overview]
Message-ID: <4CEE4D3A.3000606@ti.com> (raw)
In-Reply-To: <1290678776.4284.67.camel@wimaxnb.nmp.nokia.com>
On 11/25/2010 11:52 AM, Juuso Oikarinen wrote:
> On Wed, 2010-11-24 at 18:33 +0200, ext Shahar Levi wrote:
>> Add new ampdu_action ops to support receiver BA.
>> The BA initiator session management in FW independently.
>>
>> Signed-off-by: Shahar Levi<shahar_levi@ti.com>
>> ---
>>
>> +int wl1271_op_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
>> + enum ieee80211_ampdu_mlme_action action,
>> + struct ieee80211_sta *sta, u16 tid, u16 *ssn)
>> +{
>> + struct wl1271 *wl = hw->priv;
>> + int ret;
>> +
>> + ret = wl1271_ps_elp_wakeup(wl, false);
>> + if (ret< 0)
>> + goto out;
>> +
>> + switch (action) {
>> + case IEEE80211_AMPDU_RX_START:
>> + if (wl->ba_allowed) {
>> + ret = wl1271_acx_set_ba_receiver_session(wl, tid, ssn,
>> + true);
>> + if (!ret)
>> + wl->ba_rx_bitmap |= (u8)(BIT(0)<< tid);
>> + } else
>> + ret = -EPERM;
>> + break;
>> +
>> + case IEEE80211_AMPDU_RX_STOP:
>> + ret = wl1271_acx_set_ba_receiver_session(wl, tid, ssn, false);
>> + if (!ret)
>> + wl->ba_rx_bitmap&= ~(u8)(BIT(0)<< tid);
>> + break;
>> +
>> + /*
>> + * The BA initiator session management in FW independently.
>> + * Falling break here on purpose for all TX APDU commands.
>> + */
>> + case IEEE80211_AMPDU_TX_START:
>> + case IEEE80211_AMPDU_TX_STOP:
>> + case IEEE80211_AMPDU_TX_OPERATIONAL:
>> + ret = -EINVAL;
>> + break;
>> +
>> + default:
>> + wl1271_error("Incorrect ampdu action id=%x\n", action);
>> + ret = -ENODEV;
>> + }
>> +
>> + wl1271_ps_elp_sleep(wl);
>> +
>> +out:
>> + return ret;
>> +}
>> +
>
> Seems to me that locking of the wl1271 mutex is missing here.
You right. will be fix on v2
>
> Also, I think it would be good to add checking for interface status
> (wl->state == WL1271_STATE_OFF) here too. In normal cases this would not
> be needed, but there are at least some hardware recovery scenarios where
> this could be called while the firmware is off, causing all types of odd
> behavior.
it seems that it is good protraction. the setting of WL1271_STATE_OFF is
in wl1271_alloc_hw() and __wl1271_op_remove_interface(). i was expect
that in static void wl1271_recovery_work() after validate (wl->state !=
WL1271_STATE_ON) we will set it to WL1271_STATE_OFF.
> -Juuso
>
next prev parent reply other threads:[~2010-11-25 11:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-24 16:33 [PATCH ] wl12xx: BA receiver support Shahar Levi
2010-11-25 9:52 ` Juuso Oikarinen
2010-11-25 11:49 ` Shahar Levi [this message]
2010-11-26 9:56 ` Juuso Oikarinen
2010-11-26 16:37 ` Levi, Shahar
2010-11-29 9:51 ` Juuso Oikarinen
2010-11-29 10:20 ` Shahar Levi
2010-11-29 9:52 ` Luciano Coelho
2010-11-29 10:17 ` Shahar Levi
-- strict thread matches above, loose matches on Subject: below --
2010-11-25 13:51 Shahar Levi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CEE4D3A.3000606@ti.com \
--to=shahar_levi@ti.com \
--cc=juuso.oikarinen@nokia.com \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@nokia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.