replace get_(d|s)a with ieee80211_get_(D|S)A

get_da()/get_sa() duplicate native ieee80211_get_(D|S)A functions.
Remove get_(d|s)a, use ieee80211_get_(D|S)A instead.

Link: https://lore.kernel.org/r/20210314090247.21181-2-insafonov@gmail.com
This commit is contained in:
Carlos Garces
2021-10-18 19:40:27 +02:00
parent 5ae45c1296
commit 158017aa86
4 changed files with 24 additions and 72 deletions

View File

@@ -263,54 +263,6 @@ __inline static unsigned char *get_ta(unsigned char *pframe)
return ta;
}
/* can't apply to mesh mode */
__inline static unsigned char *get_da(unsigned char *pframe)
{
unsigned char *da;
unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
da = GetAddr1Ptr(pframe);
break;
case 0x01: /* ToDs=0, FromDs=1 */
da = GetAddr1Ptr(pframe);
break;
case 0x02: /* ToDs=1, FromDs=0 */
da = GetAddr3Ptr(pframe);
break;
default: /* ToDs=1, FromDs=1 */
da = GetAddr3Ptr(pframe);
break;
}
return da;
}
/* can't apply to mesh mode */
__inline static unsigned char *get_sa(unsigned char *pframe)
{
unsigned char *sa;
unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
switch (to_fr_ds) {
case 0x00: /* ToDs=0, FromDs=0 */
sa = get_addr2_ptr(pframe);
break;
case 0x01: /* ToDs=0, FromDs=1 */
sa = GetAddr3Ptr(pframe);
break;
case 0x02: /* ToDs=1, FromDs=0 */
sa = get_addr2_ptr(pframe);
break;
default: /* ToDs=1, FromDs=1 */
sa = GetAddr4Ptr(pframe);
break;
}
return sa;
}
/* can't apply to mesh mode */
__inline static unsigned char *get_hdr_bssid(unsigned char *pframe)
{