diff options
author | Moritz Muehlenhoff <jmm@debian.org> | 2009-02-18 19:50:07 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-03 14:53:24 -0700 |
commit | 18c7f792be75c2430cbf16e22dca1ab6a9881a63 (patch) | |
tree | a40ba16d289a168c413cd4df65997924ab81826d /drivers/staging/wlan-ng/prism2mgmt.c | |
parent | 465e7417b15348909606c3edce5f018818235a54 (diff) |
Staging: wlan-ng: Replace local byteorder macros
Replace hfa384x2host_16(), hfa384x2host_32(), host2hfa384x_16()
and host2hfa384x_32() with standard byteorder macros.
Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/wlan-ng/prism2mgmt.c')
-rw-r--r-- | drivers/staging/wlan-ng/prism2mgmt.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index 7dce05de1531..e7a7939b4280 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -172,7 +172,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) hw->ident_sta_fw.variant) > HFA384x_FIRMWARE_VERSION(1, 5, 0)) { if (msg->scantype.data != P80211ENUM_scantype_active) - word = host2hfa384x_16(msg->maxchanneltime.data); + word = cpu_to_le16(msg->maxchanneltime.data); else word = 0; @@ -187,7 +187,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) /* set up the txrate to be 2MBPS. Should be fastest basicrate... */ word = HFA384x_RATEBIT_2; - scanreq.txRate = host2hfa384x_16(word); + scanreq.txRate = cpu_to_le16(word); /* set up the channel list */ word = 0; @@ -198,10 +198,10 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) /* channel 1 is BIT 0 ... channel 14 is BIT 13 */ word |= (1 << (channel - 1)); } - scanreq.channelList = host2hfa384x_16(word); + scanreq.channelList = cpu_to_le16(word); /* set up the ssid, if present. */ - scanreq.ssid.len = host2hfa384x_16(msg->ssid.data.len); + scanreq.ssid.len = cpu_to_le16(msg->ssid.data.len); memcpy(scanreq.ssid.data, msg->ssid.data.data, msg->ssid.data.len); /* Enable the MAC port if it's not already enabled */ @@ -230,7 +230,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) /* Construct a bogus SSID and assign it to OwnSSID and * DesiredSSID */ - wordbuf[0] = host2hfa384x_16(WLAN_SSID_MAXLEN); + wordbuf[0] = cpu_to_le16(WLAN_SSID_MAXLEN); get_random_bytes(&wordbuf[1], WLAN_SSID_MAXLEN); result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID, wordbuf, @@ -399,8 +399,8 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp) /* signal and noise */ req->signal.status = P80211ENUM_msgitem_status_data_ok; req->noise.status = P80211ENUM_msgitem_status_data_ok; - req->signal.data = hfa384x2host_16(item->sl); - req->noise.data = hfa384x2host_16(item->anl); + req->signal.data = le16_to_cpu(item->sl); + req->noise.data = le16_to_cpu(item->anl); /* BSSID */ req->bssid.status = P80211ENUM_msgitem_status_data_ok; @@ -409,7 +409,7 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp) /* SSID */ req->ssid.status = P80211ENUM_msgitem_status_data_ok; - req->ssid.data.len = hfa384x2host_16(item->ssid.len); + req->ssid.data.len = le16_to_cpu(item->ssid.len); memcpy(req->ssid.data.data, item->ssid.data, req->ssid.data.len); /* supported rates */ @@ -449,7 +449,7 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp) /* beacon period */ req->beaconperiod.status = P80211ENUM_msgitem_status_data_ok; - req->beaconperiod.data = hfa384x2host_16(item->bcnint); + req->beaconperiod.data = le16_to_cpu(item->bcnint); /* timestamps */ req->timestamp.status = P80211ENUM_msgitem_status_data_ok; @@ -459,14 +459,14 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp) /* atim window */ req->ibssatimwindow.status = P80211ENUM_msgitem_status_data_ok; - req->ibssatimwindow.data = hfa384x2host_16(item->atim); + req->ibssatimwindow.data = le16_to_cpu(item->atim); /* Channel */ req->dschannel.status = P80211ENUM_msgitem_status_data_ok; - req->dschannel.data = hfa384x2host_16(item->chid); + req->dschannel.data = le16_to_cpu(item->chid); /* capinfo bits */ - count = hfa384x2host_16(item->capinfo); + count = le16_to_cpu(item->capinfo); /* privacy flag */ req->privacy.status = P80211ENUM_msgitem_status_data_ok; |