Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149884
b: refs/heads/master
c: 1878f77
h: refs/heads/master
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Apr 22, 2009
1 parent c168963 commit 9e0afdf
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f769c36bd71ebe8d7a5f83764f0428d36ebced35
refs/heads/master: 1878f77e13b9d720b78c4f818b94bfd4a7f596e5
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ar9170/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ config AR9170_USB
tristate "Atheros AR9170 802.11n USB support"
depends on USB && MAC80211 && WLAN_80211 && EXPERIMENTAL
select FW_LOADER
select ATH_COMMON
help
This is a driver for the Atheros "otus" 802.11n USB devices.

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/ar9170/ar9170.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
#include "eeprom.h"
#include "hw.h"

#include "../ath/regd.h"

#define PAYLOAD_MAX (AR9170_MAX_CMD_LEN/4 - 1)

enum ar9170_bw {
Expand Down Expand Up @@ -151,6 +153,7 @@ struct ar9170 {

/* EEPROM */
struct ar9170_eeprom eeprom;
struct ath_regulatory regulatory;

/* global tx status for unregistered Stations. */
struct sk_buff_head global_tx_status;
Expand Down
18 changes: 18 additions & 0 deletions trunk/drivers/net/wireless/ar9170/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1620,12 +1620,24 @@ static int ar9170_read_eeprom(struct ar9170 *ar)
else
ar->hw->channel_change_time = 80 * 1000;

ar->regulatory.current_rd = le16_to_cpu(ar->eeprom.reg_domain[0]);
ar->regulatory.current_rd_ext = le16_to_cpu(ar->eeprom.reg_domain[1]);

/* second part of wiphy init */
SET_IEEE80211_PERM_ADDR(ar->hw, addr);

return bands ? 0 : -EINVAL;
}

static int ar9170_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct ar9170 *ar = hw->priv;

return ath_reg_notifier_apply(wiphy, request, &ar->regulatory);
}

int ar9170_register(struct ar9170 *ar, struct device *pdev)
{
int err;
Expand All @@ -1635,10 +1647,16 @@ int ar9170_register(struct ar9170 *ar, struct device *pdev)
if (err)
goto err_out;

err = ath_regd_init(&ar->regulatory, ar->hw->wiphy,
ar9170_reg_notifier);

err = ieee80211_register_hw(ar->hw);
if (err)
goto err_out;

if (!ath_is_world_regd(&ar->regulatory))
regulatory_hint(ar->hw->wiphy, ar->regulatory.alpha2);

err = ar9170_init_leds(ar);
if (err)
goto err_unreg;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/ath/Kconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config ATH_COMMON
tristate "Atheros Wireless Cards Shared Support"
depends on ATH5K || ATH9K
depends on ATH5K || ATH9K || AR9170_USB

0 comments on commit 9e0afdf

Please sign in to comment.