checkpatch reported a number of "Avoid CamelCase" issues for macros defined in p80211metadef.h (and for files that used these macros). Renamed the macros to all upper-case (except for DIDmib_dot11smt_dot11WEPDefaultKeysTable_key, a function-like macro, which was renamed to all lower-case) to conform to the coding guidelines. Signed-off-by: Tim Collier <osdevtc@xxxxxxxxx> --- drivers/staging/wlan-ng/cfg80211.c | 48 ++++++------- drivers/staging/wlan-ng/p80211metadef.h | 118 ++++++++++++++++---------------- drivers/staging/wlan-ng/p80211netdev.c | 8 +-- drivers/staging/wlan-ng/p80211req.c | 27 ++++---- drivers/staging/wlan-ng/prism2fw.c | 32 ++++----- drivers/staging/wlan-ng/prism2mib.c | 40 +++++------ drivers/staging/wlan-ng/prism2sta.c | 34 ++++----- 7 files changed, 154 insertions(+), 153 deletions(-) diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index d4cf09b11e33..9cab95fca5ea 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c @@ -76,7 +76,7 @@ static int prism2_domibset_uint32(struct wlandevice *wlandev, u32 did, u32 data) struct p80211item_uint32 *mibitem = (struct p80211item_uint32 *)&msg.mibattribute.data; - msg.msgcode = DIDmsg_dot11req_mibset; + msg.msgcode = DIDMSG_DOT11REQ_MIBSET; mibitem->did = did; mibitem->data = data; @@ -90,7 +90,7 @@ static int prism2_domibset_pstr32(struct wlandevice *wlandev, struct p80211item_pstr32 *mibitem = (struct p80211item_pstr32 *)&msg.mibattribute.data; - msg.msgcode = DIDmsg_dot11req_mibset; + msg.msgcode = DIDMSG_DOT11REQ_MIBSET; mibitem->did = did; mibitem->data.len = len; memcpy(mibitem->data.data, data, len); @@ -129,7 +129,7 @@ static int prism2_change_virtual_intf(struct wiphy *wiphy, /* Set Operation mode to the PORT TYPE RID */ result = prism2_domibset_uint32(wlandev, - DIDmib_p2_p2Static_p2CnfPortType, + DIDMIB_P2_P2STATIC_P2CNFPORTTYPE, data); if (result) @@ -158,12 +158,12 @@ static int prism2_add_key(struct wiphy *wiphy, struct net_device *dev, } if (prism2_domibset_uint32(wlandev, - DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, + DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11WEPDEFAULTKEYID, key_index)) return -EFAULT; /* send key to driver */ - did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(key_index + 1); + did = didmib_dot11smt_dot11wepdefaultkeystable_key(key_index + 1); if (prism2_domibset_pstr32(wlandev, did, params->key_len, params->key)) return -EFAULT; @@ -216,7 +216,7 @@ static int prism2_del_key(struct wiphy *wiphy, struct net_device *dev, return -EINVAL; /* send key to driver */ - did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(key_index + 1); + did = didmib_dot11smt_dot11wepdefaultkeystable_key(key_index + 1); result = prism2_domibset_pstr32(wlandev, did, 13, "0000000000000"); if (result) @@ -234,7 +234,7 @@ static int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev, int result = 0; result = prism2_domibset_uint32(wlandev, - DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, + DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11WEPDEFAULTKEYID, key_index); if (result) @@ -256,7 +256,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev, return -EOPNOTSUPP; /* build request message */ - quality.msgcode = DIDmsg_lnxreq_commsquality; + quality.msgcode = DIDMSG_LNXREQ_COMMSQUALITY; quality.dbm.data = P80211ENUM_truth_true; quality.dbm.status = P80211ENUM_msgitem_status_data_ok; @@ -311,7 +311,7 @@ static int prism2_scan(struct wiphy *wiphy, priv->scan_request = request; memset(&msg1, 0x00, sizeof(msg1)); - msg1.msgcode = DIDmsg_dot11req_scan; + msg1.msgcode = DIDMSG_DOT11REQ_SCAN; msg1.bsstype.data = P80211ENUM_bsstype_any; memset(&msg1.bssid.data.data, 0xFF, sizeof(msg1.bssid.data.data)); @@ -350,7 +350,7 @@ static int prism2_scan(struct wiphy *wiphy, int freq; memset(&msg2, 0, sizeof(msg2)); - msg2.msgcode = DIDmsg_dot11req_scan_results; + msg2.msgcode = DIDMSG_DOT11REQ_SCAN_RESULTS; msg2.bssindex.data = i; result = p80211req_dorequest(wlandev, (u8 *)&msg2); @@ -410,7 +410,7 @@ static int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed) data = wiphy->rts_threshold; result = prism2_domibset_uint32(wlandev, - DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold, + DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11RTSTHRESHOLD, data); if (result) { err = -EFAULT; @@ -425,7 +425,7 @@ static int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed) data = wiphy->frag_threshold; result = prism2_domibset_uint32(wlandev, - DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold, + DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11FRAGMENTATIONTHRESHOLD, data); if (result) { err = -EFAULT; @@ -455,7 +455,7 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev, if (channel) { chan = ieee80211_frequency_to_channel(channel->center_freq); result = prism2_domibset_uint32(wlandev, - DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel, + DIDMIB_DOT11PHY_DOT11PHYDSSSTABLE_DOT11CURRENTCHANNEL, chan); if (result) goto exit; @@ -482,13 +482,13 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev, } result = prism2_domibset_uint32(wlandev, - DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, + DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11WEPDEFAULTKEYID, sme->key_idx); if (result) goto exit; /* send key to driver */ - did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_key( + did = didmib_dot11smt_dot11wepdefaultkeystable_key( sme->key_idx + 1); result = prism2_domibset_pstr32(wlandev, did, sme->key_len, @@ -502,13 +502,13 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev, * seems reasonable anyways */ result = prism2_domibset_uint32(wlandev, - DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked, + DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11PRIVACYINVOKED, P80211ENUM_truth_true); if (result) goto exit; result = prism2_domibset_uint32(wlandev, - DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted, + DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11EXCLUDEUNENCRYPTED, P80211ENUM_truth_true); if (result) goto exit; @@ -518,13 +518,13 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev, * and exclude unencrypted */ result = prism2_domibset_uint32(wlandev, - DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked, + DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11PRIVACYINVOKED, P80211ENUM_truth_false); if (result) goto exit; result = prism2_domibset_uint32(wlandev, - DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted, + DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11EXCLUDEUNENCRYPTED, P80211ENUM_truth_false); if (result) goto exit; @@ -533,7 +533,7 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev, /* Now do the actual join. Note there is no way that I can * see to request a specific bssid */ - msg_join.msgcode = DIDmsg_lnxreq_autojoin; + msg_join.msgcode = DIDMSG_LNXREQ_AUTOJOIN; memcpy(msg_join.ssid.data.data, sme->ssid, length); msg_join.ssid.data.len = length; @@ -556,7 +556,7 @@ static int prism2_disconnect(struct wiphy *wiphy, struct net_device *dev, int err = 0; /* Do a join, with a bogus ssid. Thats the only way I can think of */ - msg_join.msgcode = DIDmsg_lnxreq_autojoin; + msg_join.msgcode = DIDMSG_LNXREQ_AUTOJOIN; memcpy(msg_join.ssid.data.data, "---", 3); msg_join.ssid.data.len = 3; @@ -595,7 +595,7 @@ static int prism2_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, data = MBM_TO_DBM(mbm); result = prism2_domibset_uint32(wlandev, - DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel, + DIDMIB_DOT11PHY_DOT11PHYTXPOWERTABLE_DOT11CURRENTTXPOWERLEVEL, data); if (result) { @@ -618,9 +618,9 @@ static int prism2_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, int err = 0; mibitem = (struct p80211item_uint32 *)&msg.mibattribute.data; - msg.msgcode = DIDmsg_dot11req_mibget; + msg.msgcode = DIDMSG_DOT11REQ_MIBGET; mibitem->did = - DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel; + DIDMIB_DOT11PHY_DOT11PHYTXPOWERTABLE_DOT11CURRENTTXPOWERLEVEL; result = p80211req_dorequest(wlandev, (u8 *)&msg); diff --git a/drivers/staging/wlan-ng/p80211metadef.h b/drivers/staging/wlan-ng/p80211metadef.h index e63b4b557d0a..c7b96b72ab4a 100644 --- a/drivers/staging/wlan-ng/p80211metadef.h +++ b/drivers/staging/wlan-ng/p80211metadef.h @@ -48,201 +48,201 @@ #ifndef _P80211MKMETADEF_H #define _P80211MKMETADEF_H -#define DIDmsg_dot11req_mibget \ +#define DIDMSG_DOT11REQ_MIBGET \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(1)) -#define DIDmsg_dot11req_mibget_mibattribute \ +#define DIDMSG_DOT11REQ_MIBGET_MIBATTRIBUTE \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(1) | \ P80211DID_MKITEM(1) | 0x00000000) -#define DIDmsg_dot11req_mibget_resultcode \ +#define DIDMSG_DOT11REQ_MIBGET_RESULTCODE \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(1) | \ P80211DID_MKITEM(2) | 0x00000000) -#define DIDmsg_dot11req_mibset \ +#define DIDMSG_DOT11REQ_MIBSET \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(2)) -#define DIDmsg_dot11req_mibset_mibattribute \ +#define DIDMSG_DOT11REQ_MIBSET_MIBATTRIBUTE \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(2) | \ P80211DID_MKITEM(1) | 0x00000000) -#define DIDmsg_dot11req_mibset_resultcode \ +#define DIDMSG_DOT11REQ_MIBSET_RESULTCODE \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(2) | \ P80211DID_MKITEM(2) | 0x00000000) -#define DIDmsg_dot11req_scan \ +#define DIDMSG_DOT11REQ_SCAN \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(4)) -#define DIDmsg_dot11req_scan_results \ +#define DIDMSG_DOT11REQ_SCAN_RESULTS \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(5)) -#define DIDmsg_dot11req_start \ +#define DIDMSG_DOT11REQ_START \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(13)) -#define DIDmsg_dot11ind_authenticate \ +#define DIDMSG_DOT11IND_AUTHENTICATE \ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(1)) -#define DIDmsg_dot11ind_associate \ +#define DIDMSG_DOT11IND_ASSOCIATE \ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(3)) -#define DIDmsg_lnxreq_ifstate \ +#define DIDMSG_LNXREQ_IFSTATE \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(1)) -#define DIDmsg_lnxreq_wlansniff \ +#define DIDMSG_LNXREQ_WLANSNIFF \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(2)) -#define DIDmsg_lnxreq_hostwep \ +#define DIDMSG_LNXREQ_HOSTWEP \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(3)) -#define DIDmsg_lnxreq_commsquality \ +#define DIDMSG_LNXREQ_COMMSQUALITY \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(4)) -#define DIDmsg_lnxreq_autojoin \ +#define DIDMSG_LNXREQ_AUTOJOIN \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(5)) -#define DIDmsg_p2req_readpda \ +#define DIDMSG_P2REQ_READPDA \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(2)) -#define DIDmsg_p2req_readpda_pda \ +#define DIDMSG_P2REQ_READPDA_PDA \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(2) | \ P80211DID_MKITEM(1) | 0x00000000) -#define DIDmsg_p2req_readpda_resultcode \ +#define DIDMSG_P2REQ_READPDA_RESULTCODE \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(2) | \ P80211DID_MKITEM(2) | 0x00000000) -#define DIDmsg_p2req_ramdl_state \ +#define DIDMSG_P2REQ_RAMDL_STATE \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(11)) -#define DIDmsg_p2req_ramdl_state_enable \ +#define DIDMSG_P2REQ_RAMDL_STATE_ENABLE \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(11) | \ P80211DID_MKITEM(1) | 0x00000000) -#define DIDmsg_p2req_ramdl_state_exeaddr \ +#define DIDMSG_P2REQ_RAMDL_STATE_EXEADDR \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(11) | \ P80211DID_MKITEM(2) | 0x00000000) -#define DIDmsg_p2req_ramdl_state_resultcode \ +#define DIDMSG_P2REQ_RAMDL_STATE_RESULTCODE \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(11) | \ P80211DID_MKITEM(3) | 0x00000000) -#define DIDmsg_p2req_ramdl_write \ +#define DIDMSG_P2REQ_RAMDL_WRITE \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(12)) -#define DIDmsg_p2req_ramdl_write_addr \ +#define DIDMSG_P2REQ_RAMDL_WRITE_ADDR \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(12) | \ P80211DID_MKITEM(1) | 0x00000000) -#define DIDmsg_p2req_ramdl_write_len \ +#define DIDMSG_P2REQ_RAMDL_WRITE_LEN \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(12) | \ P80211DID_MKITEM(2) | 0x00000000) -#define DIDmsg_p2req_ramdl_write_data \ +#define DIDMSG_P2REQ_RAMDL_WRITE_DATA \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(12) | \ P80211DID_MKITEM(3) | 0x00000000) -#define DIDmsg_p2req_ramdl_write_resultcode \ +#define DIDMSG_P2REQ_RAMDL_WRITE_RESULTCODE \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(12) | \ P80211DID_MKITEM(4) | 0x00000000) -#define DIDmsg_p2req_flashdl_state \ +#define DIDMSG_P2REQ_FLASHDL_STATE \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(13)) -#define DIDmsg_p2req_flashdl_write \ +#define DIDMSG_P2REQ_FLASHDL_WRITE \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(14)) -#define DIDmib_cat_dot11smt \ +#define DIDMIB_CAT_DOT11SMT \ P80211DID_MKSECTION(1) -#define DIDmib_dot11smt_dot11WEPDefaultKeysTable \ +#define DIDMIB_DOT11SMT_DOT11WEPDEFAULTKEYSTABLE \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(4)) -#define DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(_i) \ - (DIDmib_dot11smt_dot11WEPDefaultKeysTable | \ +#define didmib_dot11smt_dot11wepdefaultkeystable_key(_i) \ + (DIDMIB_DOT11SMT_DOT11WEPDEFAULTKEYSTABLE | \ P80211DID_MKITEM(_i) | 0x0c000000) -#define DIDmib_dot11smt_dot11PrivacyTable \ +#define DIDMIB_DOT11SMT_DOT11PRIVACYTABLE \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(6)) -#define DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked \ +#define DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11PRIVACYINVOKED \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(6) | \ P80211DID_MKITEM(1) | 0x18000000) -#define DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID \ +#define DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11WEPDEFAULTKEYID \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(6) | \ P80211DID_MKITEM(2) | 0x18000000) -#define DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted \ +#define DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11EXCLUDEUNENCRYPTED \ (P80211DID_MKSECTION(1) | \ P80211DID_MKGROUP(6) | \ P80211DID_MKITEM(4) | 0x18000000) -#define DIDmib_dot11mac_dot11OperationTable \ +#define DIDMIB_DOT11MAC_DOT11OPERATIONTABLE \ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(1)) -#define DIDmib_dot11mac_dot11OperationTable_dot11MACAddress \ +#define DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11MACADDRESS \ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(1) | \ P80211DID_MKITEM(1) | 0x18000000) -#define DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold \ +#define DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11RTSTHRESHOLD \ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(1) | \ P80211DID_MKITEM(2) | 0x18000000) -#define DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit \ +#define DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11SHORTRETRYLIMIT \ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(1) | \ P80211DID_MKITEM(3) | 0x10000000) -#define DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit \ +#define DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11LONGRETRYLIMIT \ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(1) | \ P80211DID_MKITEM(4) | 0x10000000) -#define DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold \ +#define DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11FRAGMENTATIONTHRESHOLD \ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(1) | \ P80211DID_MKITEM(5) | 0x18000000) -#define DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime \ +#define DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11MAXTRANSMITMSDULIFETIME \ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(1) | \ P80211DID_MKITEM(6) | 0x10000000) -#define DIDmib_cat_dot11phy \ +#define DIDMIB_CAT_DOT11PHY \ P80211DID_MKSECTION(3) -#define DIDmib_dot11phy_dot11PhyOperationTable \ +#define DIDMIB_DOT11PHY_DOT11PHYOPERATIONTABLE \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(1)) -#define DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel \ +#define DIDMIB_DOT11PHY_DOT11PHYTXPOWERTABLE_DOT11CURRENTTXPOWERLEVEL \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(3) | \ P80211DID_MKITEM(10) | 0x18000000) -#define DIDmib_dot11phy_dot11PhyDSSSTable \ +#define DIDMIB_DOT11PHY_DOT11PHYDSSSTABLE \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(5)) -#define DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel \ +#define DIDMIB_DOT11PHY_DOT11PHYDSSSTABLE_DOT11CURRENTCHANNEL \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(5) | \ P80211DID_MKITEM(1) | 0x10000000) -#define DIDmib_cat_lnx \ +#define DIDMIB_CAT_LNX \ P80211DID_MKSECTION(4) -#define DIDmib_lnx_lnxConfigTable \ +#define DIDMIB_LNX_LNXCONFIGTABLE \ (P80211DID_MKSECTION(4) | \ P80211DID_MKGROUP(1)) -#define DIDmib_lnx_lnxConfigTable_lnxRSNAIE \ +#define DIDMIB_LNX_LNXCONFIGTABLE_LNXRSNAIE \ (P80211DID_MKSECTION(4) | \ P80211DID_MKGROUP(1) | \ P80211DID_MKITEM(1) | 0x18000000) -#define DIDmib_cat_p2 \ +#define DIDMIB_CAT_P2 \ P80211DID_MKSECTION(5) -#define DIDmib_p2_p2Static \ +#define DIDMIB_P2_P2STATIC \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(2)) -#define DIDmib_p2_p2Static_p2CnfPortType \ +#define DIDMIB_P2_P2STATIC_P2CNFPORTTYPE \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(2) | \ P80211DID_MKITEM(1) | 0x18000000) -#define DIDmib_p2_p2NIC_p2PRISupRange \ +#define DIDMIB_P2_P2NIC_P2PRISUPRANGE \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(5) | \ P80211DID_MKITEM(6) | 0x10000000) -#define DIDmib_p2_p2MAC \ +#define DIDMIB_P2_P2MAC \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(6)) -#define DIDmib_p2_p2MAC_p2CurrentTxRate \ +#define DIDMIB_P2_P2MAC_P2CURRENTTXRATE \ (P80211DID_MKSECTION(5) | \ P80211DID_MKGROUP(6) | \ P80211DID_MKITEM(12) | 0x10000000) diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index ae98ac1dd434..aa125f3e10e0 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -638,25 +638,25 @@ static int p80211knetdev_set_mac_address(struct net_device *dev, void *addr) /* Set up a dot11req_mibset */ memset(&dot11req, 0, sizeof(dot11req)); - dot11req.msgcode = DIDmsg_dot11req_mibset; + dot11req.msgcode = DIDMSG_DOT11REQ_MIBSET; dot11req.msglen = sizeof(dot11req); memcpy(dot11req.devname, ((struct wlandevice *)dev->ml_priv)->name, WLAN_DEVNAMELEN_MAX - 1); /* Set up the mibattribute argument */ - mibattr->did = DIDmsg_dot11req_mibset_mibattribute; + mibattr->did = DIDMSG_DOT11REQ_MIBSET_MIBATTRIBUTE; mibattr->status = P80211ENUM_msgitem_status_data_ok; mibattr->len = sizeof(mibattr->data); - macaddr->did = DIDmib_dot11mac_dot11OperationTable_dot11MACAddress; + macaddr->did = DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11MACADDRESS; macaddr->status = P80211ENUM_msgitem_status_data_ok; macaddr->len = sizeof(macaddr->data); macaddr->data.len = ETH_ALEN; memcpy(&macaddr->data.data, new_addr->sa_data, ETH_ALEN); /* Set up the resultcode argument */ - resultcode->did = DIDmsg_dot11req_mibset_resultcode; + resultcode->did = DIDMSG_DOT11REQ_MIBSET_RESULTCODE; resultcode->status = P80211ENUM_msgitem_status_no_value; resultcode->len = sizeof(resultcode->data); resultcode->data = 0; diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c index c36d01469afc..4e30bc29175a 100644 --- a/drivers/staging/wlan-ng/p80211req.c +++ b/drivers/staging/wlan-ng/p80211req.c @@ -117,7 +117,7 @@ int p80211req_dorequest(struct wlandevice *wlandev, u8 *msgbuf) /* Check to make sure the MSD is running */ if (!((wlandev->msdstate == WLAN_MSD_HWPRESENT && - msg->msgcode == DIDmsg_lnxreq_ifstate) || + msg->msgcode == DIDMSG_LNXREQ_IFSTATE) || wlandev->msdstate == WLAN_MSD_RUNNING || wlandev->msdstate == WLAN_MSD_FWLOAD)) { return -ENODEV; @@ -125,7 +125,7 @@ int p80211req_dorequest(struct wlandevice *wlandev, u8 *msgbuf) /* Check Permissions */ if (!capable(CAP_NET_ADMIN) && - (msg->msgcode != DIDmsg_dot11req_mibget)) { + (msg->msgcode != DIDMSG_DOT11REQ_MIBGET)) { netdev_err(wlandev->netdev, "%s: only dot11req_mibget allowed for non-root.\n", wlandev->name); @@ -172,7 +172,7 @@ static void p80211req_handlemsg(struct wlandevice *wlandev, struct p80211msg *msg) { switch (msg->msgcode) { - case DIDmsg_lnxreq_hostwep:{ + case DIDMSG_LNXREQ_HOSTWEP:{ struct p80211msg_lnxreq_hostwep *req = (struct p80211msg_lnxreq_hostwep *)msg; wlandev->hostwep &= @@ -184,9 +184,9 @@ static void p80211req_handlemsg(struct wlandevice *wlandev, break; } - case DIDmsg_dot11req_mibget: - case DIDmsg_dot11req_mibset:{ - int isget = (msg->msgcode == DIDmsg_dot11req_mibget); + case DIDMSG_DOT11REQ_MIBGET: + case DIDMSG_DOT11REQ_MIBSET:{ + int isget = (msg->msgcode == DIDMSG_DOT11REQ_MIBGET); struct p80211msg_dot11req_mibget *mib_msg = (struct p80211msg_dot11req_mibget *)msg; p80211req_mibset_mibget(wlandev, mib_msg, isget); @@ -205,17 +205,18 @@ static void p80211req_mibset_mibget(struct wlandevice *wlandev, u8 *key = mibitem->data + sizeof(struct p80211pstrd); switch (mibitem->did) { - case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1): - case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(2): - case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(3): - case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(4): + + case didmib_dot11smt_dot11wepdefaultkeystable_key(1): + case didmib_dot11smt_dot11wepdefaultkeystable_key(2): + case didmib_dot11smt_dot11wepdefaultkeystable_key(3): + case didmib_dot11smt_dot11wepdefaultkeystable_key(4): if (!isget) wep_change_key(wlandev, P80211DID_ITEM(mibitem->did) - 1, key, pstr->len); break; - case DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID:{ + case DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11WEPDEFAULTKEYID:{ u32 *data = (u32 *)mibitem->data; if (isget) { @@ -226,14 +227,14 @@ static void p80211req_mibset_mibget(struct wlandevice *wlandev, } break; } - case DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked:{ + case DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11PRIVACYINVOKED:{ u32 *data = (u32 *)mibitem->data; p80211req_handle_action(wlandev, data, isget, HOSTWEP_PRIVACYINVOKED); break; } - case DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted:{ + case DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11EXCLUDEUNENCRYPTED:{ u32 *data = (u32 *)mibitem->data; p80211req_handle_action(wlandev, data, isget, diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index ddcaac648bd5..b13601cb02d3 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -294,17 +294,17 @@ static int prism2_fwapply(const struct ihex_binrec *rfptr, /* read the card's PRI-SUP */ memset(&getmsg, 0, sizeof(getmsg)); - getmsg.msgcode = DIDmsg_dot11req_mibget; + getmsg.msgcode = DIDMSG_DOT11REQ_MIBGET; getmsg.msglen = sizeof(getmsg); strcpy(getmsg.devname, wlandev->name); - getmsg.mibattribute.did = DIDmsg_dot11req_mibget_mibattribute; + getmsg.mibattribute.did = DIDMSG_DOT11REQ_MIBGET_MIBATTRIBUTE; getmsg.mibattribute.status = P80211ENUM_msgitem_status_data_ok; - getmsg.resultcode.did = DIDmsg_dot11req_mibget_resultcode; + getmsg.resultcode.did = DIDMSG_DOT11REQ_MIBGET_RESULTCODE; getmsg.resultcode.status = P80211ENUM_msgitem_status_no_value; item = (struct p80211itemd *)getmsg.mibattribute.data; - item->did = DIDmib_p2_p2NIC_p2PRISupRange; + item->did = DIDMIB_P2_P2NIC_P2PRISUPRANGE; item->status = P80211ENUM_msgitem_status_no_value; data = (u32 *)item->data; @@ -787,13 +787,13 @@ static int read_cardpda(struct pda *pda, struct wlandevice *wlandev) return -ENOMEM; /* set up the msg */ - msg->msgcode = DIDmsg_p2req_readpda; + msg->msgcode = DIDMSG_P2REQ_READPDA; msg->msglen = sizeof(msg); strcpy(msg->devname, wlandev->name); - msg->pda.did = DIDmsg_p2req_readpda_pda; + msg->pda.did = DIDMSG_P2REQ_READPDA_PDA; msg->pda.len = HFA384x_PDA_LEN_MAX; msg->pda.status = P80211ENUM_msgitem_status_no_value; - msg->resultcode.did = DIDmsg_p2req_readpda_resultcode; + msg->resultcode.did = DIDMSG_P2REQ_READPDA_RESULTCODE; msg->resultcode.len = sizeof(u32); msg->resultcode.status = P80211ENUM_msgitem_status_no_value; @@ -1021,11 +1021,11 @@ static int writeimage(struct wlandevice *wlandev, struct imgchunk *fchunk, /* Initialize the messages */ strcpy(rstmsg->devname, wlandev->name); - rstmsg->msgcode = DIDmsg_p2req_ramdl_state; + rstmsg->msgcode = DIDMSG_P2REQ_RAMDL_STATE; rstmsg->msglen = sizeof(*rstmsg); - rstmsg->enable.did = DIDmsg_p2req_ramdl_state_enable; - rstmsg->exeaddr.did = DIDmsg_p2req_ramdl_state_exeaddr; - rstmsg->resultcode.did = DIDmsg_p2req_ramdl_state_resultcode; + rstmsg->enable.did = DIDMSG_P2REQ_RAMDL_STATE_ENABLE; + rstmsg->exeaddr.did = DIDMSG_P2REQ_RAMDL_STATE_EXEADDR; + rstmsg->resultcode.did = DIDMSG_P2REQ_RAMDL_STATE_RESULTCODE; rstmsg->enable.status = P80211ENUM_msgitem_status_data_ok; rstmsg->exeaddr.status = P80211ENUM_msgitem_status_data_ok; rstmsg->resultcode.status = P80211ENUM_msgitem_status_no_value; @@ -1034,12 +1034,12 @@ static int writeimage(struct wlandevice *wlandev, struct imgchunk *fchunk, rstmsg->resultcode.len = sizeof(u32); strcpy(rwrmsg->devname, wlandev->name); - rwrmsg->msgcode = DIDmsg_p2req_ramdl_write; + rwrmsg->msgcode = DIDMSG_P2REQ_RAMDL_WRITE; rwrmsg->msglen = sizeof(*rwrmsg); - rwrmsg->addr.did = DIDmsg_p2req_ramdl_write_addr; - rwrmsg->len.did = DIDmsg_p2req_ramdl_write_len; - rwrmsg->data.did = DIDmsg_p2req_ramdl_write_data; - rwrmsg->resultcode.did = DIDmsg_p2req_ramdl_write_resultcode; + rwrmsg->addr.did = DIDMSG_P2REQ_RAMDL_WRITE_ADDR; + rwrmsg->len.did = DIDMSG_P2REQ_RAMDL_WRITE_LEN; + rwrmsg->data.did = DIDMSG_P2REQ_RAMDL_WRITE_DATA; + rwrmsg->resultcode.did = DIDMSG_P2REQ_RAMDL_WRITE_RESULTCODE; rwrmsg->addr.status = P80211ENUM_msgitem_status_data_ok; rwrmsg->len.status = P80211ENUM_msgitem_status_data_ok; rwrmsg->data.status = P80211ENUM_msgitem_status_data_ok; diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index e88baf715cec..6fd6fd932738 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -148,89 +148,89 @@ static int prism2mib_priv(struct mibrec *mib, static struct mibrec mibtab[] = { /* dot11smt MIB's */ - {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1), + {didmib_dot11smt_dot11wepdefaultkeystable_key(1), F_STA | F_WRITE, HFA384x_RID_CNFWEPDEFAULTKEY0, 0, 0, prism2mib_wepdefaultkey}, - {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(2), + {didmib_dot11smt_dot11wepdefaultkeystable_key(2), F_STA | F_WRITE, HFA384x_RID_CNFWEPDEFAULTKEY1, 0, 0, prism2mib_wepdefaultkey}, - {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(3), + {didmib_dot11smt_dot11wepdefaultkeystable_key(3), F_STA | F_WRITE, HFA384x_RID_CNFWEPDEFAULTKEY2, 0, 0, prism2mib_wepdefaultkey}, - {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(4), + {didmib_dot11smt_dot11wepdefaultkeystable_key(4), F_STA | F_WRITE, HFA384x_RID_CNFWEPDEFAULTKEY3, 0, 0, prism2mib_wepdefaultkey}, - {DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked, + {DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11PRIVACYINVOKED, F_STA | F_READ | F_WRITE, HFA384x_RID_CNFWEPFLAGS, HFA384x_WEPFLAGS_PRIVINVOKED, 0, prism2mib_privacyinvoked}, - {DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, + {DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11WEPDEFAULTKEYID, F_STA | F_READ | F_WRITE, HFA384x_RID_CNFWEPDEFAULTKEYID, 0, 0, prism2mib_uint32}, - {DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted, + {DIDMIB_DOT11SMT_DOT11PRIVACYTABLE_DOT11EXCLUDEUNENCRYPTED, F_STA | F_READ | F_WRITE, HFA384x_RID_CNFWEPFLAGS, HFA384x_WEPFLAGS_EXCLUDE, 0, prism2mib_excludeunencrypted}, /* dot11mac MIB's */ - {DIDmib_dot11mac_dot11OperationTable_dot11MACAddress, + {DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11MACADDRESS, F_STA | F_READ | F_WRITE, HFA384x_RID_CNFOWNMACADDR, HFA384x_RID_CNFOWNMACADDR_LEN, 0, prism2mib_bytearea2pstr}, - {DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold, + {DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11RTSTHRESHOLD, F_STA | F_READ | F_WRITE, HFA384x_RID_RTSTHRESH, 0, 0, prism2mib_uint32}, - {DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit, + {DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11SHORTRETRYLIMIT, F_STA | F_READ, HFA384x_RID_SHORTRETRYLIMIT, 0, 0, prism2mib_uint32}, - {DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit, + {DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11LONGRETRYLIMIT, F_STA | F_READ, HFA384x_RID_LONGRETRYLIMIT, 0, 0, prism2mib_uint32}, - {DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold, + {DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11FRAGMENTATIONTHRESHOLD, F_STA | F_READ | F_WRITE, HFA384x_RID_FRAGTHRESH, 0, 0, prism2mib_fragmentationthreshold}, - {DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime, + {DIDMIB_DOT11MAC_DOT11OPERATIONTABLE_DOT11MAXTRANSMITMSDULIFETIME, F_STA | F_READ, HFA384x_RID_MAXTXLIFETIME, 0, 0, prism2mib_uint32}, /* dot11phy MIB's */ - {DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel, + {DIDMIB_DOT11PHY_DOT11PHYDSSSTABLE_DOT11CURRENTCHANNEL, F_STA | F_READ, HFA384x_RID_CURRENTCHANNEL, 0, 0, prism2mib_uint32}, - {DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel, + {DIDMIB_DOT11PHY_DOT11PHYTXPOWERTABLE_DOT11CURRENTTXPOWERLEVEL, F_STA | F_READ | F_WRITE, HFA384x_RID_TXPOWERMAX, 0, 0, prism2mib_uint32}, /* p2Static MIB's */ - {DIDmib_p2_p2Static_p2CnfPortType, + {DIDMIB_P2_P2STATIC_P2CNFPORTTYPE, F_STA | F_READ | F_WRITE, HFA384x_RID_CNFPORTTYPE, 0, 0, prism2mib_uint32}, /* p2MAC MIB's */ - {DIDmib_p2_p2MAC_p2CurrentTxRate, + {DIDMIB_P2_P2MAC_P2CURRENTTXRATE, F_STA | F_READ, HFA384x_RID_CURRENTTXRATE, 0, 0, prism2mib_uint32}, /* And finally, lnx mibs */ - {DIDmib_lnx_lnxConfigTable_lnxRSNAIE, + {DIDMIB_LNX_LNXCONFIGTABLE_LNXRSNAIE, F_STA | F_READ | F_WRITE, HFA384x_RID_CNFWPADATA, 0, 0, prism2mib_priv}, @@ -301,7 +301,7 @@ int prism2mgmt_mibset_mibget(struct wlandevice *wlandev, void *msgp) ** this is a "mibset" so make make sure that the MIB may be written. */ - isget = (msg->msgcode == DIDmsg_dot11req_mibget); + isget = (msg->msgcode == DIDMSG_DOT11REQ_MIBGET); if (isget) { if (!(mib->flag & F_READ)) { @@ -707,7 +707,7 @@ static int prism2mib_priv(struct mibrec *mib, struct p80211pstrd *pstr = data; switch (mib->did) { - case DIDmib_lnx_lnxConfigTable_lnxRSNAIE:{ + case DIDMIB_LNX_LNXCONFIGTABLE_LNXRSNAIE:{ struct hfa384x_wpa_data wpa; if (isget) { diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 914970249680..537b49c1d6f1 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -288,55 +288,55 @@ static int prism2sta_mlmerequest(struct wlandevice *wlandev, int result = 0; switch (msg->msgcode) { - case DIDmsg_dot11req_mibget: + case DIDMSG_DOT11REQ_MIBGET: pr_debug("Received mibget request\n"); result = prism2mgmt_mibset_mibget(wlandev, msg); break; - case DIDmsg_dot11req_mibset: + case DIDMSG_DOT11REQ_MIBSET: pr_debug("Received mibset request\n"); result = prism2mgmt_mibset_mibget(wlandev, msg); break; - case DIDmsg_dot11req_scan: + case DIDMSG_DOT11REQ_SCAN: pr_debug("Received scan request\n"); result = prism2mgmt_scan(wlandev, msg); break; - case DIDmsg_dot11req_scan_results: + case DIDMSG_DOT11REQ_SCAN_RESULTS: pr_debug("Received scan_results request\n"); result = prism2mgmt_scan_results(wlandev, msg); break; - case DIDmsg_dot11req_start: + case DIDMSG_DOT11REQ_START: pr_debug("Received mlme start request\n"); result = prism2mgmt_start(wlandev, msg); break; /* * Prism2 specific messages */ - case DIDmsg_p2req_readpda: + case DIDMSG_P2REQ_READPDA: pr_debug("Received mlme readpda request\n"); result = prism2mgmt_readpda(wlandev, msg); break; - case DIDmsg_p2req_ramdl_state: + case DIDMSG_P2REQ_RAMDL_STATE: pr_debug("Received mlme ramdl_state request\n"); result = prism2mgmt_ramdl_state(wlandev, msg); break; - case DIDmsg_p2req_ramdl_write: + case DIDMSG_P2REQ_RAMDL_WRITE: pr_debug("Received mlme ramdl_write request\n"); result = prism2mgmt_ramdl_write(wlandev, msg); break; - case DIDmsg_p2req_flashdl_state: + case DIDMSG_P2REQ_FLASHDL_STATE: pr_debug("Received mlme flashdl_state request\n"); result = prism2mgmt_flashdl_state(wlandev, msg); break; - case DIDmsg_p2req_flashdl_write: + case DIDMSG_P2REQ_FLASHDL_WRITE: pr_debug("Received mlme flashdl_write request\n"); result = prism2mgmt_flashdl_write(wlandev, msg); break; /* * Linux specific messages */ - case DIDmsg_lnxreq_hostwep: + case DIDMSG_LNXREQ_HOSTWEP: break; /* ignore me. */ - case DIDmsg_lnxreq_ifstate: + case DIDMSG_LNXREQ_IFSTATE: { struct p80211msg_lnxreq_ifstate *ifstatemsg; @@ -351,15 +351,15 @@ static int prism2sta_mlmerequest(struct wlandevice *wlandev, result = 0; } break; - case DIDmsg_lnxreq_wlansniff: + case DIDMSG_LNXREQ_WLANSNIFF: pr_debug("Received mlme wlansniff request\n"); result = prism2mgmt_wlansniff(wlandev, msg); break; - case DIDmsg_lnxreq_autojoin: + case DIDMSG_LNXREQ_AUTOJOIN: pr_debug("Received mlme autojoin request\n"); result = prism2mgmt_autojoin(wlandev, msg); break; - case DIDmsg_lnxreq_commsquality:{ + case DIDMSG_LNXREQ_COMMSQUALITY:{ struct p80211msg_lnxreq_commsquality *qualmsg; pr_debug("Received commsquality request\n"); @@ -1949,8 +1949,8 @@ void prism2sta_commsqual_defer(struct work_struct *data) } /* Get the signal rate */ - msg.msgcode = DIDmsg_dot11req_mibget; - mibitem->did = DIDmib_p2_p2MAC_p2CurrentTxRate; + msg.msgcode = DIDMSG_DOT11REQ_MIBGET; + mibitem->did = DIDMIB_P2_P2MAC_P2CURRENTTXRATE; result = p80211req_dorequest(wlandev, (u8 *)&msg); if (result) { -- 2.11.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel