Skip to content

Commit

Permalink
[PATCH] mac80211: remove crypto algorithm typedef
Browse files Browse the repository at this point in the history
The typedef is not required, we can just use "enum ieee80211_key_alg"
instead of "ieee80211_key_alg"

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Michael Wu <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
jmberg authored and David S. Miller committed Oct 10, 2007
1 parent f97df02 commit ea49c35
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -7293,7 +7293,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
return rc;
}

static int iwl_mac_set_key(struct ieee80211_hw *hw, set_key_cmd cmd,
static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
const u8 *local_addr, const u8 *addr,
struct ieee80211_key_conf *key)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -7690,7 +7690,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
return rc;
}

static int iwl_mac_set_key(struct ieee80211_hw *hw, set_key_cmd cmd,
static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
const u8 *local_addr, const u8 *addr,
struct ieee80211_key_conf *key)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/iwlwifi.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ struct iwl_tid_data {
};

struct iwl_hw_key {
ieee80211_key_alg alg;
enum ieee80211_key_alg alg;
int keylen;
u8 key[32];
};
Expand Down
12 changes: 6 additions & 6 deletions include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -551,12 +551,12 @@ struct ieee80211_if_conf {
* @ALG_TKIP: TKIP
* @ALG_CCMP: CCMP (AES)
*/
typedef enum ieee80211_key_alg {
enum ieee80211_key_alg {
ALG_NONE,
ALG_WEP,
ALG_TKIP,
ALG_CCMP,
} ieee80211_key_alg;
};


/**
Expand Down Expand Up @@ -596,7 +596,7 @@ enum ieee80211_key_flags {
* @key: key material
*/
struct ieee80211_key_conf {
ieee80211_key_alg alg;
enum ieee80211_key_alg alg;
u8 hw_key_idx;
u8 flags;
s8 keyidx;
Expand All @@ -616,9 +616,9 @@ struct ieee80211_key_conf {
* @SET_KEY: a key is set
* @DISABLE_KEY: a key must be disabled
*/
typedef enum set_key_cmd {
enum set_key_cmd {
SET_KEY, DISABLE_KEY,
} set_key_cmd;
};


/**
Expand Down Expand Up @@ -1014,7 +1014,7 @@ struct ieee80211_ops {
unsigned int *total_flags,
int mc_count, struct dev_addr_list *mc_list);
int (*set_tim)(struct ieee80211_hw *hw, int aid, int set);
int (*set_key)(struct ieee80211_hw *hw, set_key_cmd cmd,
int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd,
const u8 *local_address, const u8 *address,
struct ieee80211_key_conf *key);
int (*set_ieee8021x)(struct ieee80211_hw *hw, int use_ieee8021x);
Expand Down
2 changes: 1 addition & 1 deletion net/mac80211/ieee80211_key.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ struct ieee80211_key {

struct ieee80211_key *ieee80211_key_alloc(struct ieee80211_sub_if_data *sdata,
struct sta_info *sta,
ieee80211_key_alg alg,
enum ieee80211_key_alg alg,
int idx,
size_t key_len,
const u8 *key_data);
Expand Down
2 changes: 1 addition & 1 deletion net/mac80211/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)

struct ieee80211_key *ieee80211_key_alloc(struct ieee80211_sub_if_data *sdata,
struct sta_info *sta,
ieee80211_key_alg alg,
enum ieee80211_key_alg alg,
int idx,
size_t key_len,
const u8 *key_data)
Expand Down

0 comments on commit ea49c35

Please sign in to comment.