From: Larry Finger <Larry.Finger@lwfinger.net>
To: "Kalle Valo" <kvalo@codeaurora.org>, 谭杭波 <troy_tan@realsil.com.cn>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH for 3.19 2/3] rtlwifi: Fix handling of new style descriptors
Date: Thu, 15 Jan 2015 11:14:51 -0600 [thread overview]
Message-ID: <54B7F58B.7010604@lwfinger.net> (raw)
In-Reply-To: <87y4p4w8wb.fsf@kamboji.qca.qualcomm.com>
On 01/15/2015 06:00 AM, Kalle Valo wrote:
> Hi Troy,
>
> please avoid top-posting.
>
> 谭杭波 <troy_tan@realsil.com.cn> writes:
>
>> You can find get_available_desc here:
>>
>> diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/
>> pci.c
>> index e25faac..a62170e 100644
>> --- a/drivers/net/wireless/rtlwifi/pci.c
>> +++ b/drivers/net/wireless/rtlwifi/pci.c
>> @@ -578,6 +578,13 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int
>> prio)
>> else
>> entry = (u8 *)(&ring->desc[ring->idx]);
>>
>> + if (rtlpriv->cfg->ops->get_available_desc &&
>> + rtlpriv->cfg->ops->get_available_desc(hw, prio) <= 1) {
>> + RT_TRACE(rtlpriv, (COMP_INTR | COMP_SEND), DBG_DMESG,
>> + "no available desc!\n");
>> + return;
>> + }
>
> I don't see rtlpriv->cfg->ops->get_available_desc set here, only being
> called?
Only one of the drivers (rtl8192ee) needs to implement that routine, which is
the reason it is checked for non-NULL before it is called. The implementation is
in patch 3 in file rtl8192ee/sw.c where it says:
@@ -241,6 +239,7 @@ static struct rtl_hal_ops rtl8192ee_hal_ops = {
.set_desc = rtl92ee_set_desc,
.get_desc = rtl92ee_get_desc,
.is_tx_desc_closed = rtl92ee_is_tx_desc_closed,
+ .get_available_desc = rtl92ee_get_available_desc,
.tx_polling = rtl92ee_tx_polling,
.enable_hw_sec = rtl92ee_enable_hw_security_config,
.init_sw_leds = rtl92ee_init_sw_leds,
Larry
WARNING: multiple messages have this Message-ID (diff)
From: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
To: "Kalle Valo" <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
谭杭波 <troy_tan-kXabqFNEczNtrwSWzY7KCg@public.gmane.org>
Cc: "linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH for 3.19 2/3] rtlwifi: Fix handling of new style descriptors
Date: Thu, 15 Jan 2015 11:14:51 -0600 [thread overview]
Message-ID: <54B7F58B.7010604@lwfinger.net> (raw)
In-Reply-To: <87y4p4w8wb.fsf-HodKDYzPHsUD5k0oWYwrnHL1okKdlPRT@public.gmane.org>
On 01/15/2015 06:00 AM, Kalle Valo wrote:
> Hi Troy,
>
> please avoid top-posting.
>
> 谭杭波 <troy_tan-kXabqFNEczNtrwSWzY7KCg@public.gmane.org> writes:
>
>> You can find get_available_desc here:
>>
>> diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/
>> pci.c
>> index e25faac..a62170e 100644
>> --- a/drivers/net/wireless/rtlwifi/pci.c
>> +++ b/drivers/net/wireless/rtlwifi/pci.c
>> @@ -578,6 +578,13 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int
>> prio)
>> else
>> entry = (u8 *)(&ring->desc[ring->idx]);
>>
>> + if (rtlpriv->cfg->ops->get_available_desc &&
>> + rtlpriv->cfg->ops->get_available_desc(hw, prio) <= 1) {
>> + RT_TRACE(rtlpriv, (COMP_INTR | COMP_SEND), DBG_DMESG,
>> + "no available desc!\n");
>> + return;
>> + }
>
> I don't see rtlpriv->cfg->ops->get_available_desc set here, only being
> called?
Only one of the drivers (rtl8192ee) needs to implement that routine, which is
the reason it is checked for non-NULL before it is called. The implementation is
in patch 3 in file rtl8192ee/sw.c where it says:
@@ -241,6 +239,7 @@ static struct rtl_hal_ops rtl8192ee_hal_ops = {
.set_desc = rtl92ee_set_desc,
.get_desc = rtl92ee_get_desc,
.is_tx_desc_closed = rtl92ee_is_tx_desc_closed,
+ .get_available_desc = rtl92ee_get_available_desc,
.tx_polling = rtl92ee_tx_polling,
.enable_hw_sec = rtl92ee_enable_hw_security_config,
.init_sw_leds = rtl92ee_init_sw_leds,
Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-01-15 17:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 17:37 [PATCH for 3.19 0/3] rtlwifi: Various updates/fixes Larry Finger
2015-01-14 17:37 ` [PATCH for 3.19 1/3] rtlwifi: Remove logging statement that is no longer needed Larry Finger
2015-01-14 17:37 ` [PATCH for 3.19 2/3] rtlwifi: Fix handling of new style descriptors Larry Finger
2015-01-15 11:44 ` Kalle Valo
2015-01-15 11:44 ` Kalle Valo
[not found] ` <C11178B3EB8EC446A461ADCC3E27182146C9A9F8@rsex2.realsil.com.cn>
2015-01-15 12:00 ` Kalle Valo
2015-01-15 17:14 ` Larry Finger [this message]
2015-01-15 17:14 ` Larry Finger
2015-01-15 20:10 ` Larry Finger
2015-01-15 20:10 ` Larry Finger
2015-01-16 6:40 ` Kalle Valo
2015-01-16 6:40 ` Kalle Valo
2015-01-14 17:37 ` [PATCH for 3.19 3/3] rtlwifi: rtl8192ee: Fix several bugs Larry Finger
2015-01-15 11:42 ` Kalle Valo
[not found] ` <C11178B3EB8EC446A461ADCC3E27182146C9AA38@rsex2.realsil.com.cn>
2015-01-15 12:03 ` Kalle Valo
2015-01-15 17:05 ` Larry Finger
2015-01-15 17:05 ` Larry Finger
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=54B7F58B.7010604@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=troy_tan@realsil.com.cn \
/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.