wireless: replace uses of __constant_{endian}
[cascardo/linux.git] / drivers / net / wireless / hostap / hostap_ap.c
index dec3dbe..0a4bf94 100644 (file)
@@ -609,7 +609,7 @@ static void hostap_ap_tx_cb(struct sk_buff *skb, int ok, void *data)
        skb->dev = ap->local->apdev;
        skb_pull(skb, hostap_80211_get_hdrlen(fc));
        skb->pkt_type = PACKET_OTHERHOST;
-       skb->protocol = __constant_htons(ETH_P_802_2);
+       skb->protocol = cpu_to_be16(ETH_P_802_2);
        memset(skb->cb, 0, sizeof(skb->cb));
        netif_rx(skb);
 }
@@ -1206,7 +1206,7 @@ static void prism2_check_tx_rates(struct sta_info *sta)
 
 static void ap_crypt_init(struct ap_data *ap)
 {
-       ap->crypt = ieee80211_get_crypto_ops("WEP");
+       ap->crypt = lib80211_get_crypto_ops("WEP");
 
        if (ap->crypt) {
                if (ap->crypt->init) {
@@ -1224,7 +1224,7 @@ static void ap_crypt_init(struct ap_data *ap)
 
        if (ap->crypt == NULL) {
                printk(KERN_WARNING "AP could not initialize WEP: load module "
-                      "ieee80211_crypt_wep.ko\n");
+                      "lib80211_crypt_wep.ko\n");
        }
 }
 
@@ -1293,7 +1293,7 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
        __le16 *pos;
        u16 resp = WLAN_STATUS_SUCCESS, fc;
        struct sta_info *sta = NULL;
-       struct ieee80211_crypt_data *crypt;
+       struct lib80211_crypt_data *crypt;
        char *txt = "";
 
        len = skb->len - IEEE80211_MGMT_HDR_LEN;
@@ -1319,7 +1319,7 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
                int idx = 0;
                if (skb->len >= hdrlen + 3)
                        idx = skb->data[hdrlen + 3] >> 6;
-               crypt = local->crypt[idx];
+               crypt = local->crypt_info.crypt[idx];
        }
 
        pos = (__le16 *) (skb->data + IEEE80211_MGMT_HDR_LEN);
@@ -2281,7 +2281,7 @@ void hostap_rx(struct net_device *dev, struct sk_buff *skb,
            WLAN_FC_GET_STYPE(fc) == IEEE80211_STYPE_BEACON)
                goto drop;
 
-       skb->protocol = __constant_htons(ETH_P_HOSTAP);
+       skb->protocol = cpu_to_be16(ETH_P_HOSTAP);
        handle_ap_item(local, skb, rx_stats);
        return;
 
@@ -2310,7 +2310,7 @@ static void schedule_packet_send(local_info_t *local, struct sta_info *sta)
        hdr = (struct ieee80211_hdr_4addr *) skb_put(skb, 16);
 
        /* Generate a fake pspoll frame to start packet delivery */
-       hdr->frame_ctl = __constant_cpu_to_le16(
+       hdr->frame_ctl = cpu_to_le16(
                IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL);
        memcpy(hdr->addr1, local->dev->dev_addr, ETH_ALEN);
        memcpy(hdr->addr2, sta->addr, ETH_ALEN);
@@ -2754,7 +2754,7 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx)
        if (meta->flags & HOSTAP_TX_FLAGS_ADD_MOREDATA) {
                /* indicate to STA that more frames follow */
                hdr->frame_ctl |=
-                       __constant_cpu_to_le16(IEEE80211_FCTL_MOREDATA);
+                       cpu_to_le16(IEEE80211_FCTL_MOREDATA);
        }
 
        if (meta->flags & HOSTAP_TX_FLAGS_BUFFERED_FRAME) {
@@ -3065,7 +3065,7 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
 /* Called only as a tasklet (software IRQ) */
 int hostap_handle_sta_crypto(local_info_t *local,
                             struct ieee80211_hdr_4addr *hdr,
-                            struct ieee80211_crypt_data **crypt,
+                            struct lib80211_crypt_data **crypt,
                             void **sta_ptr)
 {
        struct sta_info *sta;
@@ -3213,7 +3213,7 @@ void hostap_update_rates(local_info_t *local)
 
 
 void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
-                        struct ieee80211_crypt_data ***crypt)
+                        struct lib80211_crypt_data ***crypt)
 {
        struct sta_info *sta;