]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/wlan-ng/prism2sta.c
staging: wlang-ng: avoid new typedef: hfa384x_pdr_hfa3861_chcalsp_t
[karo-tx-linux.git] / drivers / staging / wlan-ng / prism2sta.c
index a39b294354a3afd63f8c8e0e669591fbe2beffab..59f461919f73b26c9af22020c18d254087713af1 100644 (file)
@@ -107,28 +107,29 @@ static int prism2sta_txframe(struct wlandevice *wlandev, struct sk_buff *skb,
 static int prism2sta_mlmerequest(struct wlandevice *wlandev, struct p80211msg *msg);
 static int prism2sta_getcardinfo(struct wlandevice *wlandev);
 static int prism2sta_globalsetup(struct wlandevice *wlandev);
-static int prism2sta_setmulticast(struct wlandevice *wlandev, netdevice_t *dev);
+static int prism2sta_setmulticast(struct wlandevice *wlandev,
+                                 struct net_device *dev);
 
 static void prism2sta_inf_handover(struct wlandevice *wlandev,
-                                  hfa384x_InfFrame_t *inf);
+                                  struct hfa384x_InfFrame *inf);
 static void prism2sta_inf_tallies(struct wlandevice *wlandev,
-                                 hfa384x_InfFrame_t *inf);
+                                 struct hfa384x_InfFrame *inf);
 static void prism2sta_inf_hostscanresults(struct wlandevice *wlandev,
-                                         hfa384x_InfFrame_t *inf);
+                                         struct hfa384x_InfFrame *inf);
 static void prism2sta_inf_scanresults(struct wlandevice *wlandev,
-                                     hfa384x_InfFrame_t *inf);
+                                     struct hfa384x_InfFrame *inf);
 static void prism2sta_inf_chinforesults(struct wlandevice *wlandev,
-                                       hfa384x_InfFrame_t *inf);
+                                       struct hfa384x_InfFrame *inf);
 static void prism2sta_inf_linkstatus(struct wlandevice *wlandev,
-                                    hfa384x_InfFrame_t *inf);
+                                    struct hfa384x_InfFrame *inf);
 static void prism2sta_inf_assocstatus(struct wlandevice *wlandev,
-                                     hfa384x_InfFrame_t *inf);
+                                     struct hfa384x_InfFrame *inf);
 static void prism2sta_inf_authreq(struct wlandevice *wlandev,
-                                 hfa384x_InfFrame_t *inf);
+                                 struct hfa384x_InfFrame *inf);
 static void prism2sta_inf_authreq_defer(struct wlandevice *wlandev,
-                                       hfa384x_InfFrame_t *inf);
+                                       struct hfa384x_InfFrame *inf);
 static void prism2sta_inf_psusercnt(struct wlandevice *wlandev,
-                                   hfa384x_InfFrame_t *inf);
+                                   struct hfa384x_InfFrame *inf);
 
 /*
  * prism2sta_open
@@ -592,7 +593,7 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev)
        /* NIC identity */
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_NICIDENTITY,
                                        &hw->ident_nic,
-                                       sizeof(hfa384x_compident_t));
+                                       sizeof(struct hfa384x_compident));
        if (result) {
                netdev_err(wlandev->netdev, "Failed to retrieve NICIDENTITY\n");
                goto failed;
@@ -611,7 +612,7 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev)
        /* Primary f/w identity */
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRIIDENTITY,
                                        &hw->ident_pri_fw,
-                                       sizeof(hfa384x_compident_t));
+                                       sizeof(struct hfa384x_compident));
        if (result) {
                netdev_err(wlandev->netdev, "Failed to retrieve PRIIDENTITY\n");
                goto failed;
@@ -630,7 +631,7 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev)
        /* Station (Secondary?) f/w identity */
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STAIDENTITY,
                                        &hw->ident_sta_fw,
-                                       sizeof(hfa384x_compident_t));
+                                       sizeof(struct hfa384x_compident));
        if (result) {
                netdev_err(wlandev->netdev, "Failed to retrieve STAIDENTITY\n");
                goto failed;
@@ -670,7 +671,7 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev)
        /* Compatibility range, Modem supplier */
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_MFISUPRANGE,
                                        &hw->cap_sup_mfi,
-                                       sizeof(hfa384x_caplevel_t));
+                                       sizeof(struct hfa384x_caplevel));
        if (result) {
                netdev_err(wlandev->netdev, "Failed to retrieve MFISUPRANGE\n");
                goto failed;
@@ -694,7 +695,7 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev)
        /* Compatibility range, Controller supplier */
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CFISUPRANGE,
                                        &hw->cap_sup_cfi,
-                                       sizeof(hfa384x_caplevel_t));
+                                       sizeof(struct hfa384x_caplevel));
        if (result) {
                netdev_err(wlandev->netdev, "Failed to retrieve CFISUPRANGE\n");
                goto failed;
@@ -718,7 +719,7 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev)
        /* Compatibility range, Primary f/w supplier */
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRISUPRANGE,
                                        &hw->cap_sup_pri,
-                                       sizeof(hfa384x_caplevel_t));
+                                       sizeof(struct hfa384x_caplevel));
        if (result) {
                netdev_err(wlandev->netdev, "Failed to retrieve PRISUPRANGE\n");
                goto failed;
@@ -742,7 +743,7 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev)
        /* Compatibility range, Station f/w supplier */
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STASUPRANGE,
                                        &hw->cap_sup_sta,
-                                       sizeof(hfa384x_caplevel_t));
+                                       sizeof(struct hfa384x_caplevel));
        if (result) {
                netdev_err(wlandev->netdev, "Failed to retrieve STASUPRANGE\n");
                goto failed;
@@ -774,7 +775,7 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev)
        /* Compatibility range, primary f/w actor, CFI supplier */
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRI_CFIACTRANGES,
                                        &hw->cap_act_pri_cfi,
-                                       sizeof(hfa384x_caplevel_t));
+                                       sizeof(struct hfa384x_caplevel));
        if (result) {
                netdev_err(wlandev->netdev, "Failed to retrieve PRI_CFIACTRANGES\n");
                goto failed;
@@ -798,7 +799,7 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev)
        /* Compatibility range, sta f/w actor, CFI supplier */
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STA_CFIACTRANGES,
                                        &hw->cap_act_sta_cfi,
-                                       sizeof(hfa384x_caplevel_t));
+                                       sizeof(struct hfa384x_caplevel));
        if (result) {
                netdev_err(wlandev->netdev, "Failed to retrieve STA_CFIACTRANGES\n");
                goto failed;
@@ -822,7 +823,7 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev)
        /* Compatibility range, sta f/w actor, MFI supplier */
        result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STA_MFIACTRANGES,
                                        &hw->cap_act_sta_mfi,
-                                       sizeof(hfa384x_caplevel_t));
+                                       sizeof(struct hfa384x_caplevel));
        if (result) {
                netdev_err(wlandev->netdev, "Failed to retrieve STA_MFIACTRANGES\n");
                goto failed;
@@ -918,7 +919,8 @@ static int prism2sta_globalsetup(struct wlandevice *wlandev)
                                        WLAN_DATA_MAXLEN);
 }
 
-static int prism2sta_setmulticast(struct wlandevice *wlandev, netdevice_t *dev)
+static int prism2sta_setmulticast(struct wlandevice *wlandev,
+                                       struct net_device *dev)
 {
        int result = 0;
        hfa384x_t *hw = wlandev->priv;
@@ -960,7 +962,7 @@ exit:
  *     interrupt
  */
 static void prism2sta_inf_handover(struct wlandevice *wlandev,
-                                  hfa384x_InfFrame_t *inf)
+                                  struct hfa384x_InfFrame *inf)
 {
        pr_debug("received infoframe:HANDOVER (unhandled)\n");
 }
@@ -983,7 +985,7 @@ static void prism2sta_inf_handover(struct wlandevice *wlandev,
  *     interrupt
  */
 static void prism2sta_inf_tallies(struct wlandevice *wlandev,
-                                 hfa384x_InfFrame_t *inf)
+                                 struct hfa384x_InfFrame *inf)
 {
        hfa384x_t *hw = wlandev->priv;
        u16 *src16;
@@ -997,7 +999,7 @@ static void prism2sta_inf_tallies(struct wlandevice *wlandev,
         * record length of the info record.
         */
 
-       cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(u32);
+       cnt = sizeof(struct hfa384x_CommTallies32) / sizeof(u32);
        if (inf->framelen > 22) {
                dst = (u32 *)&hw->tallies;
                src32 = (u32 *)&inf->info.commtallies32;
@@ -1029,19 +1031,19 @@ static void prism2sta_inf_tallies(struct wlandevice *wlandev,
  *     interrupt
  */
 static void prism2sta_inf_scanresults(struct wlandevice *wlandev,
-                                     hfa384x_InfFrame_t *inf)
+                                     struct hfa384x_InfFrame *inf)
 {
        hfa384x_t *hw = wlandev->priv;
        int nbss;
-       hfa384x_ScanResult_t *sr = &(inf->info.scanresult);
+       struct hfa384x_ScanResult *sr = &(inf->info.scanresult);
        int i;
-       hfa384x_JoinRequest_data_t joinreq;
+       struct hfa384x_JoinRequest_data joinreq;
        int result;
 
        /* Get the number of results, first in bytes, then in results */
        nbss = (inf->framelen * sizeof(u16)) -
            sizeof(inf->infotype) - sizeof(inf->info.scanresult.scanreason);
-       nbss /= sizeof(hfa384x_ScanResultSub_t);
+       nbss /= sizeof(struct hfa384x_ScanResultSub);
 
        /* Print em */
        pr_debug("rx scanresults, reason=%d, nbss=%d:\n",
@@ -1084,7 +1086,7 @@ static void prism2sta_inf_scanresults(struct wlandevice *wlandev,
  *     interrupt
  */
 static void prism2sta_inf_hostscanresults(struct wlandevice *wlandev,
-                                         hfa384x_InfFrame_t *inf)
+                                         struct hfa384x_InfFrame *inf)
 {
        hfa384x_t *hw = wlandev->priv;
        int nbss;
@@ -1097,7 +1099,7 @@ static void prism2sta_inf_hostscanresults(struct wlandevice *wlandev,
 
        kfree(hw->scanresults);
 
-       hw->scanresults = kmemdup(inf, sizeof(hfa384x_InfFrame_t), GFP_ATOMIC);
+       hw->scanresults = kmemdup(inf, sizeof(struct hfa384x_InfFrame), GFP_ATOMIC);
 
        if (nbss == 0)
                nbss = -1;
@@ -1125,7 +1127,7 @@ static void prism2sta_inf_hostscanresults(struct wlandevice *wlandev,
  *     interrupt
  */
 static void prism2sta_inf_chinforesults(struct wlandevice *wlandev,
-                                       hfa384x_InfFrame_t *inf)
+                                       struct hfa384x_InfFrame *inf)
 {
        hfa384x_t *hw = wlandev->priv;
        unsigned int i, n;
@@ -1134,8 +1136,8 @@ static void prism2sta_inf_chinforesults(struct wlandevice *wlandev,
            le16_to_cpu(inf->info.chinforesult.scanchannels);
 
        for (i = 0, n = 0; i < HFA384x_CHINFORESULT_MAX; i++) {
-               hfa384x_ChInfoResultSub_t *result;
-               hfa384x_ChInfoResultSub_t *chinforesult;
+               struct hfa384x_ChInfoResultSub *result;
+               struct hfa384x_ChInfoResultSub *chinforesult;
                int chan;
 
                if (!(hw->channel_info.results.scanchannels & (1 << i)))
@@ -1171,16 +1173,16 @@ void prism2sta_processing_defer(struct work_struct *data)
 {
        hfa384x_t *hw = container_of(data, struct hfa384x, link_bh);
        struct wlandevice *wlandev = hw->wlandev;
-       hfa384x_bytestr32_t ssid;
+       struct hfa384x_bytestr32 ssid;
        int result;
 
        /* First let's process the auth frames */
        {
                struct sk_buff *skb;
-               hfa384x_InfFrame_t *inf;
+               struct hfa384x_InfFrame *inf;
 
                while ((skb = skb_dequeue(&hw->authq))) {
-                       inf = (hfa384x_InfFrame_t *)skb->data;
+                       inf = (struct hfa384x_InfFrame *)skb->data;
                        prism2sta_inf_authreq_defer(wlandev, inf);
                }
 
@@ -1389,7 +1391,7 @@ void prism2sta_processing_defer(struct work_struct *data)
                 * Disable Transmits, Ignore receives of data frames
                 */
                if (hw->join_ap && --hw->join_retries > 0) {
-                       hfa384x_JoinRequest_data_t joinreq;
+                       struct hfa384x_JoinRequest_data joinreq;
 
                        joinreq = hw->joinreq;
                        /* Send the join request */
@@ -1438,7 +1440,7 @@ void prism2sta_processing_defer(struct work_struct *data)
  *     interrupt
  */
 static void prism2sta_inf_linkstatus(struct wlandevice *wlandev,
-                                    hfa384x_InfFrame_t *inf)
+                                    struct hfa384x_InfFrame *inf)
 {
        hfa384x_t *hw = wlandev->priv;
 
@@ -1466,10 +1468,10 @@ static void prism2sta_inf_linkstatus(struct wlandevice *wlandev,
  *     interrupt
  */
 static void prism2sta_inf_assocstatus(struct wlandevice *wlandev,
-                                     hfa384x_InfFrame_t *inf)
+                                     struct hfa384x_InfFrame *inf)
 {
        hfa384x_t *hw = wlandev->priv;
-       hfa384x_AssocStatus_t rec;
+       struct hfa384x_AssocStatus rec;
        int i;
 
        memcpy(&rec, &inf->info.assocstatus, sizeof(rec));
@@ -1527,7 +1529,7 @@ static void prism2sta_inf_assocstatus(struct wlandevice *wlandev,
  *
  */
 static void prism2sta_inf_authreq(struct wlandevice *wlandev,
-                                 hfa384x_InfFrame_t *inf)
+                                 struct hfa384x_InfFrame *inf)
 {
        hfa384x_t *hw = wlandev->priv;
        struct sk_buff *skb;
@@ -1542,10 +1544,10 @@ static void prism2sta_inf_authreq(struct wlandevice *wlandev,
 }
 
 static void prism2sta_inf_authreq_defer(struct wlandevice *wlandev,
-                                       hfa384x_InfFrame_t *inf)
+                                       struct hfa384x_InfFrame *inf)
 {
        hfa384x_t *hw = wlandev->priv;
-       hfa384x_authenticateStation_data_t rec;
+       struct hfa384x_authenticateStation_data rec;
 
        int i, added, result, cnt;
        u8 *addr;
@@ -1716,7 +1718,7 @@ static void prism2sta_inf_authreq_defer(struct wlandevice *wlandev,
  *     interrupt
  */
 static void prism2sta_inf_psusercnt(struct wlandevice *wlandev,
-                                   hfa384x_InfFrame_t *inf)
+                                   struct hfa384x_InfFrame *inf)
 {
        hfa384x_t *hw = wlandev->priv;
 
@@ -1740,7 +1742,7 @@ static void prism2sta_inf_psusercnt(struct wlandevice *wlandev,
  * Call context:
  *     interrupt
  */
-void prism2sta_ev_info(struct wlandevice *wlandev, hfa384x_InfFrame_t *inf)
+void prism2sta_ev_info(struct wlandevice *wlandev, struct hfa384x_InfFrame *inf)
 {
        inf->infotype = le16_to_cpu(inf->infotype);
        /* Dispatch */
@@ -1914,7 +1916,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
 {
        hfa384x_t *hw = container_of(data, struct hfa384x, commsqual_bh);
        struct wlandevice *wlandev = hw->wlandev;
-       hfa384x_bytestr32_t ssid;
+       struct hfa384x_bytestr32 ssid;
        struct p80211msg_dot11req_mibget msg;
        struct p80211item_uint32 *mibitem = (struct p80211item_uint32 *)
                                                &msg.mibattribute.data;