mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
staging: r8188eu: use ieee80211 helper for qos bit
Use the ieee80211_is_data_qos helper function to read the qos bit. This helper function returns a bool. Change the qos field in struct rx_pkt_attrib from u8 to bool and fix up the other places where it is used. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220227164147.1168847-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
aacd0400c7
commit
1c167e3b83
|
|
@ -1012,7 +1012,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
|
|||
pattrib->amsdu = 0;
|
||||
pattrib->ack_policy = 0;
|
||||
/* parsing QC field */
|
||||
if (pattrib->qos == 1) {
|
||||
if (pattrib->qos) {
|
||||
pattrib->priority = GetPriority((ptr + 24));
|
||||
pattrib->ack_policy = GetAckpolicy((ptr + 24));
|
||||
pattrib->amsdu = GetAMsdu((ptr + 24));
|
||||
|
|
@ -1057,7 +1057,6 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
|
|||
|
||||
/* then call check if rx seq/frag. duplicated. */
|
||||
|
||||
u8 subtype;
|
||||
int retval = _FAIL;
|
||||
u8 bDumpRxPkt;
|
||||
struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
|
||||
|
|
@ -1076,8 +1075,6 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
|
|||
if (ver != 0)
|
||||
return _FAIL;
|
||||
|
||||
subtype = GetFrameSubType(ptr); /* bit(7)~bit(2) */
|
||||
|
||||
pattrib->to_fr_ds = get_tofr_ds(ptr);
|
||||
|
||||
pattrib->frag_num = GetFragNum(ptr);
|
||||
|
|
@ -1099,7 +1096,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
|
|||
validate_recv_ctrl_frame(adapter, precv_frame);
|
||||
else if (ieee80211_is_data(fc)) {
|
||||
rtw_led_control(adapter, LED_CTL_RX);
|
||||
pattrib->qos = (subtype & BIT(7)) ? 1 : 0;
|
||||
pattrib->qos = ieee80211_is_data_qos(fc);
|
||||
retval = validate_recv_data_frame(adapter, precv_frame);
|
||||
if (retval == _FAIL) {
|
||||
struct recv_priv *precvpriv = &adapter->recvpriv;
|
||||
|
|
@ -1599,7 +1596,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, struct recv_frame
|
|||
/* s1. */
|
||||
wlanhdr_to_ethhdr(prframe);
|
||||
|
||||
if (pattrib->qos != 1) {
|
||||
if (!pattrib->qos) {
|
||||
if (!padapter->bDriverStopped &&
|
||||
!padapter->bSurpriseRemoved) {
|
||||
rtw_recv_indicatepkt(padapter, prframe);
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ void update_recvframe_attrib_88e(struct recv_frame *precvframe, struct recv_stat
|
|||
pattrib->bdecrypted = (le32_to_cpu(report.rxdw0) & BIT(27)) ? 0 : 1;/* u8)(prxreport->swdec ? 0 : 1); */
|
||||
pattrib->encrypt = (u8)((le32_to_cpu(report.rxdw0) >> 20) & 0x7);/* u8)prxreport->security; */
|
||||
|
||||
pattrib->qos = (u8)((le32_to_cpu(report.rxdw0) >> 23) & 0x1);/* u8)prxreport->qos; */
|
||||
pattrib->qos = (le32_to_cpu(report.rxdw0) >> 23) & 0x1;/* prxreport->qos; */
|
||||
pattrib->priority = (u8)((le32_to_cpu(report.rxdw1) >> 8) & 0xf);/* u8)prxreport->tid; */
|
||||
|
||||
pattrib->amsdu = (u8)((le32_to_cpu(report.rxdw1) >> 13) & 0x1);/* u8)prxreport->amsdu; */
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ struct rx_pkt_attrib {
|
|||
u8 hdrlen; /* the WLAN Header Len */
|
||||
u8 to_fr_ds;
|
||||
u8 amsdu;
|
||||
u8 qos;
|
||||
bool qos;
|
||||
u8 priority;
|
||||
u8 pw_save;
|
||||
u8 mdata;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user