From: Malcolm Priestley <tvboxspy@gmail.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>, linux-wireless@vger.kernel.org, Oscar Carter <oscar.carter@gmx.com> Subject: [PATCH 2/6] staging: vt6656: vnt_get_rtscts_duration_le use ieee80211_rts_duration Date: Tue, 5 May 2020 22:13:54 +0100 [thread overview] Message-ID: <377a4cc3-cfe3-91aa-cf71-1063f311426a@gmail.com> (raw) use the mac80211 ieee80211_rts_duration for RTS frames. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> --- drivers/staging/vt6656/rxtx.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 6724b213a723..48fe16c27d3f 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -285,28 +285,18 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_usb_send_context *context, u8 dur_type, u8 pkt_type, u16 rate) { struct vnt_private *priv = context->priv; - u32 cts_time = 0, dur_time = 0; + u32 dur_time = 0; u32 frame_length = context->frame_len; u8 need_ack = context->need_ack; + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(context->skb); switch (dur_type) { + /* fall through */ case RTSDUR_BB: case RTSDUR_BA: - cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - 14, priv->top_cck_basic_rate); - dur_time = cts_time + 2 * priv->sifs + - vnt_get_rsvtime(priv, pkt_type, - frame_length, rate, need_ack); - break; - case RTSDUR_AA: - cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - 14, priv->top_ofdm_basic_rate); - dur_time = cts_time + 2 * priv->sifs + - vnt_get_rsvtime(priv, pkt_type, - frame_length, rate, need_ack); - break; - + return ieee80211_rts_duration(priv->hw, priv->vif, + context->frame_len, info); case CTSDUR_BA: dur_time = priv->sifs + vnt_get_rsvtime(priv, pkt_type, frame_length, rate, need_ack); -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Malcolm Priestley <tvboxspy@gmail.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>, Oscar Carter <oscar.carter@gmx.com>, linux-wireless@vger.kernel.org Subject: [PATCH 2/6] staging: vt6656: vnt_get_rtscts_duration_le use ieee80211_rts_duration Date: Tue, 5 May 2020 22:13:54 +0100 [thread overview] Message-ID: <377a4cc3-cfe3-91aa-cf71-1063f311426a@gmail.com> (raw) use the mac80211 ieee80211_rts_duration for RTS frames. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> --- drivers/staging/vt6656/rxtx.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 6724b213a723..48fe16c27d3f 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -285,28 +285,18 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_usb_send_context *context, u8 dur_type, u8 pkt_type, u16 rate) { struct vnt_private *priv = context->priv; - u32 cts_time = 0, dur_time = 0; + u32 dur_time = 0; u32 frame_length = context->frame_len; u8 need_ack = context->need_ack; + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(context->skb); switch (dur_type) { + /* fall through */ case RTSDUR_BB: case RTSDUR_BA: - cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - 14, priv->top_cck_basic_rate); - dur_time = cts_time + 2 * priv->sifs + - vnt_get_rsvtime(priv, pkt_type, - frame_length, rate, need_ack); - break; - case RTSDUR_AA: - cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type, - 14, priv->top_ofdm_basic_rate); - dur_time = cts_time + 2 * priv->sifs + - vnt_get_rsvtime(priv, pkt_type, - frame_length, rate, need_ack); - break; - + return ieee80211_rts_duration(priv->hw, priv->vif, + context->frame_len, info); case CTSDUR_BA: dur_time = priv->sifs + vnt_get_rsvtime(priv, pkt_type, frame_length, rate, need_ack); -- 2.25.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next reply other threads:[~2020-05-05 21:14 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-05 21:13 Malcolm Priestley [this message] 2020-05-05 21:13 ` [PATCH 2/6] staging: vt6656: vnt_get_rtscts_duration_le use ieee80211_rts_duration Malcolm Priestley 2020-05-13 8:07 ` Dan Carpenter 2020-05-13 8:07 ` Dan Carpenter 2020-05-13 8:11 ` Dan Carpenter 2020-05-13 8:11 ` Dan Carpenter
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=377a4cc3-cfe3-91aa-cf71-1063f311426a@gmail.com \ --to=tvboxspy@gmail.com \ --cc=devel@driverdev.osuosl.org \ --cc=gregkh@linuxfoundation.org \ --cc=linux-wireless@vger.kernel.org \ --cc=oscar.carter@gmx.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: linkBe 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.