]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: vt6655: mac80211 conversion: s_vFillRTSHead convert to using struct ieee8021...
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 29 Oct 2014 17:43:41 +0000 (17:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 18:35:51 +0000 (11:35 -0700)
Removing PSEthernetHeader

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/rxtx.c

index 09df536d9be0bb17afa1c31485293585b598c883..a1a594fa10d5dda7a0be4b0ef4a51d1cb0f00aa7 100644 (file)
@@ -127,7 +127,7 @@ s_vFillRTSHead(
        unsigned int    cbFrameLength,
        bool bNeedAck,
        bool bDisCRC,
-       PSEthernetHeader psEthHeader,
+       struct ieee80211_hdr *hdr,
        unsigned short wCurrentRate,
        unsigned char byFBOption
 );
@@ -789,7 +789,7 @@ s_vFillRTSHead(
        unsigned int cbFrameLength,
        bool bNeedAck,
        bool bDisCRC,
-       PSEthernetHeader psEthHeader,
+       struct ieee80211_hdr *hdr,
        unsigned short wCurrentRate,
        unsigned char byFBOption
 )
@@ -841,22 +841,8 @@ s_vFillRTSHead(
                                        cpu_to_le16(IEEE80211_FTYPE_CTL |
                                                    IEEE80211_STYPE_RTS);
 
-
-                       if ((pDevice->op_mode == NL80211_IFTYPE_ADHOC) ||
-                           (pDevice->op_mode == NL80211_IFTYPE_AP)) {
-                               ether_addr_copy(buf->data.ra,
-                                               psEthHeader->abyDstAddr);
-                       } else {
-                               ether_addr_copy(buf->data.ra,
-                                               pDevice->abyBSSID);
-                       }
-                       if (pDevice->op_mode == NL80211_IFTYPE_AP)
-                               ether_addr_copy(buf->data.ta,
-                                               pDevice->abyBSSID);
-                       else
-                               ether_addr_copy(buf->data.ta,
-                                               psEthHeader->abySrcAddr);
-
+                       ether_addr_copy(buf->data.ra, hdr->addr1);
+                       ether_addr_copy(buf->data.ta, hdr->addr2);
                } else {
                        struct vnt_rts_g_fb *buf = pvRTS;
                        /* Get SignalField, ServiceField & Length */
@@ -909,23 +895,8 @@ s_vFillRTSHead(
                                        cpu_to_le16(IEEE80211_FTYPE_CTL |
                                                    IEEE80211_STYPE_RTS);
 
-
-                       if ((pDevice->op_mode == NL80211_IFTYPE_ADHOC) ||
-                           (pDevice->op_mode == NL80211_IFTYPE_AP)) {
-                               ether_addr_copy(buf->data.ra,
-                                               psEthHeader->abyDstAddr);
-                       } else {
-                               ether_addr_copy(buf->data.ra,
-                                               pDevice->abyBSSID);
-                       }
-
-                       if (pDevice->op_mode == NL80211_IFTYPE_AP)
-                               ether_addr_copy(buf->data.ta,
-                                               pDevice->abyBSSID);
-                       else
-                               ether_addr_copy(buf->data.ta,
-                                               psEthHeader->abySrcAddr);
-
+                       ether_addr_copy(buf->data.ra, hdr->addr1);
+                       ether_addr_copy(buf->data.ta, hdr->addr2);
                } // if (byFBOption == AUTO_FB_NONE)
        } else if (byPktType == PK_TYPE_11A) {
                if (byFBOption == AUTO_FB_NONE) {
@@ -946,23 +917,8 @@ s_vFillRTSHead(
                                        cpu_to_le16(IEEE80211_FTYPE_CTL |
                                                    IEEE80211_STYPE_RTS);
 
-
-                       if ((pDevice->op_mode == NL80211_IFTYPE_ADHOC) ||
-                           (pDevice->op_mode == NL80211_IFTYPE_AP)) {
-                               ether_addr_copy(buf->data.ra,
-                                               psEthHeader->abyDstAddr);
-                       } else {
-                               ether_addr_copy(buf->data.ra,
-                                               pDevice->abyBSSID);
-                       }
-
-                       if (pDevice->op_mode == NL80211_IFTYPE_AP)
-                               ether_addr_copy(buf->data.ta,
-                                               pDevice->abyBSSID);
-                       else
-                               ether_addr_copy(buf->data.ta,
-                                               psEthHeader->abySrcAddr);
-
+                       ether_addr_copy(buf->data.ra, hdr->addr1);
+                       ether_addr_copy(buf->data.ta, hdr->addr2);
                } else {
                        struct vnt_rts_a_fb *buf = pvRTS;
                        /* Get SignalField, ServiceField & Length */
@@ -991,20 +947,8 @@ s_vFillRTSHead(
                                        cpu_to_le16(IEEE80211_FTYPE_CTL |
                                                    IEEE80211_STYPE_RTS);
 
-                       if ((pDevice->op_mode == NL80211_IFTYPE_ADHOC) ||
-                           (pDevice->op_mode == NL80211_IFTYPE_AP)) {
-                               ether_addr_copy(buf->data.ra,
-                                               psEthHeader->abyDstAddr);
-                       } else {
-                               ether_addr_copy(buf->data.ra,
-                                               pDevice->abyBSSID);
-                       }
-                       if (pDevice->op_mode == NL80211_IFTYPE_AP)
-                               ether_addr_copy(buf->data.ta,
-                                               pDevice->abyBSSID);
-                       else
-                               ether_addr_copy(buf->data.ta,
-                                               psEthHeader->abySrcAddr);
+                       ether_addr_copy(buf->data.ra, hdr->addr1);
+                       ether_addr_copy(buf->data.ta, hdr->addr2);
                }
        } else if (byPktType == PK_TYPE_11B) {
                struct vnt_rts_ab *buf = pvRTS;
@@ -1023,19 +967,8 @@ s_vFillRTSHead(
                buf->data.frame_control =
                        cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_RTS);
 
-               if ((pDevice->op_mode == NL80211_IFTYPE_ADHOC) ||
-                   (pDevice->op_mode == NL80211_IFTYPE_AP)) {
-                       ether_addr_copy(buf->data.ra,
-                                       psEthHeader->abyDstAddr);
-               } else {
-                       ether_addr_copy(buf->data.ra, pDevice->abyBSSID);
-               }
-
-               if (pDevice->op_mode == NL80211_IFTYPE_AP)
-                       ether_addr_copy(buf->data.ta, pDevice->abyBSSID);
-               else
-                       ether_addr_copy(buf->data.ta,
-                                       psEthHeader->abySrcAddr);
+               ether_addr_copy(buf->data.ra, hdr->addr1);
+               ether_addr_copy(buf->data.ta, hdr->addr2);
        }
 }