pull request: wireless-next-2.6 2011-03-15
Subsystems (7)
Dave,
One last non-fix pull for 2.6.39 -- hooray!
Not a lot here, since we just had a pull towards the end of last week. There are a handfule of ath9k bits, a couple of wl1251 patches, a couple of mac80211 bits, etc. Nothing too troublesome. :-)
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 0c0217b016ba8a970a6f6ab62ad0d858f39881ca:
net: dcbnl: Add IEEE app selector value definitions (2011-03-14 17:02:43 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git for-davem
Dan Carpenter (1):
libertas: fix write past end of array in mesh_id_get()
Felix Fietkau (7):
ath9k: remove support for the FIF_PROMISC_IN_BSS filter flag
ath9k_hw: fix REG_SET_BIT and REG_CLR_BIT for multiple bits
ath9k: fix stopping tx dma on reset
ath9k: fix the .flush driver op implementation
ath9k: improve reliability of beacon transmission and stuck beacon handling
mac80211: fix channel type recalculation with HT and non-HT interfaces
ath9k: fix aggregation related interoperability issues
Grazvydas Ignotas (2):
wl1251: remove wl1251_ps_set_elp function
wl1251: fix elp_work race condition
Helmut Schaa (1):
mac80211: Shortcut minstrel_ht rate setup for non-MRR capable devices
Jason Young (1):
mac80211: do not enable ps if 802.1x controlled port is unblocked
Johannes Berg (1):
iwlagn: support off-channel TX
John W. Linville (4):
wireless: add support for ethtool_ops->{get,set}_ringparam
mac80211: implement support for cfg80211_ops->{get,set}_ringparam
ath5k: implement ieee80211_ops->{get,set}_ringparam
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next-2.6 into for-davemVivek Natarajan (3):
ath9k_hw: Improve idle power consumption for AR9485.
ath9k_hw: Fix PLL initialization for AR9485.
ath9k_hw: Increase the wait count for nf load.
drivers/net/wireless/ath/ath5k/base.c | 3 +- drivers/net/wireless/ath/ath5k/base.h | 1 + drivers/net/wireless/ath/ath5k/mac80211-ops.c | 43 +++++++ drivers/net/wireless/ath/ath9k/ar9485_initvals.h | 2 + drivers/net/wireless/ath/ath9k/ath9k.h | 1 - drivers/net/wireless/ath/ath9k/beacon.c | 13 +-- drivers/net/wireless/ath/ath9k/calib.c | 4 +- drivers/net/wireless/ath/ath9k/hw.c | 4 +- drivers/net/wireless/ath/ath9k/hw.h | 4 +- drivers/net/wireless/ath/ath9k/mac.c | 91 ++++++--------- drivers/net/wireless/ath/ath9k/mac.h | 3 +- drivers/net/wireless/ath/ath9k/main.c | 56 ++++------ drivers/net/wireless/ath/ath9k/recv.c | 4 +- drivers/net/wireless/ath/ath9k/xmit.c | 44 +++---- drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 135 ++++++++++++++++----- drivers/net/wireless/iwlwifi/iwl-agn.c | 87 ++++++++++++++ drivers/net/wireless/iwlwifi/iwl-commands.h | 8 +- drivers/net/wireless/iwlwifi/iwl-core.h | 6 + drivers/net/wireless/iwlwifi/iwl-dev.h | 12 ++- drivers/net/wireless/iwlwifi/iwl-scan.c | 41 ++++--- drivers/net/wireless/libertas/mesh.c | 11 +- drivers/net/wireless/wl1251/ps.c | 41 +------ include/net/cfg80211.h | 8 ++ include/net/mac80211.h | 7 + net/mac80211/cfg.c | 21 ++++ net/mac80211/chan.c | 3 + net/mac80211/driver-ops.h | 26 ++++ net/mac80211/driver-trace.h | 52 ++++++++ net/mac80211/mlme.c | 37 +++++- net/mac80211/rc80211_minstrel_ht.c | 41 ++++++- net/wireless/ethtool.c | 33 ++++++ 31 files changed, 597 insertions(+), 245 deletions(-)
drivers/net/wireless/ath/ath5k/base.c +2 -1
@@ -943,6 +943,7 @@ ath5k_txq_setup(struct ath5k_softc *sc,spin_lock_init (&txq->lock); txq->setup = true; txq->txq_len =0 ; + txq->txq_max =ATH5K_TXQ_LEN_MAX ; txq->txq_poll_mark = false; txq->txq_stuck =0 ; }
@@ -1534,7 +1535,7 @@ ath5k_tx_queue(struct ieee80211_hw *hw, struct sk_buff *skb, goto drop_packet; } -if (txq->txq_len >=ATH5K_TXQ_LEN_MAX ) +if (txq->txq_len >= txq->txq_max)ieee80211_stop_queue (hw, txq->qnum);spin_lock_irqsave (&sc->txbuflock, flags);
drivers/net/wireless/ath/ath5k/base.h +1 -0
@@ -86,6 +86,7 @@ struct ath5k_txq {spinlock_t lock;/* lock on q and link */ bool setup;int txq_len;/* number of queued buffers */ +int txq_max;/* max allowed num of queued buffers */ bool txq_poll_mark;unsigned int txq_stuck;/* informational counter */ };
drivers/net/wireless/ath/ath5k/mac80211-ops.c +43 -0
53 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar9485_initvals.h +2 -0
@@ -667,6 +667,7 @@ static const u32 ar9485_1_0_pcie_phy_clkreq_enable_L1[][2] = {static const u32 ar9485_1_0_soc_preamble[][2 ] = {/* Addr allmodes */ + {0x00004090 ,0x00aa10aa }, {0x000040a4 ,0x00a0c9c9 }, {0x00007048 ,0x00000004 }, };
@@ -1708,6 +1709,7 @@ static const u32 ar9485_1_1_pcie_phy_clkreq_disable_L1[][2] = {static const u32 ar9485_1_1_soc_preamble[][2 ] = {/* Addr allmodes */ {0x00004014 ,0xba280400 }, + {0x00004090 ,0x00aa10aa }, {0x000040a4 ,0x00a0c9c9 }, {0x00007010 ,0x00000022 }, {0x00007020 ,0x00000000 },
drivers/net/wireless/ath/ath9k/ath9k.h +0 -1
@@ -189,7 +189,6 @@ struct ath_txq {u32 axq_ampdu_depth;bool stopped;bool axq_tx_inprogress; -bool txq_flush_inprogress;struct list_head axq_acq;struct list_head txq_fifo[ATH_TXFIFO_DEPTH ];struct list_head txq_fifo_pending;
drivers/net/wireless/ath/ath9k/beacon.c +2 -11
@@ -373,6 +373,7 @@ void ath_beacon_tasklet(unsigned long data)ath_dbg (common,ATH_DBG_BSTUCK ,"missed %u consecutive beacons\n" , sc->beacon.bmisscnt); +ath9k_hw_stop_dma_queue (ah, sc->beacon.beaconq);ath9k_hw_bstuck_nfcal (ah); }else if (sc->beacon.bmisscnt >=BSTUCK_THRESH ) { ath_dbg(common, ATH_DBG_BSTUCK,
@@ -450,16 +451,6 @@ void ath_beacon_tasklet(unsigned long data) sc->beacon.updateslot =OK ; }if (bfaddr !=0 ) { -/* -* Stop any current dma and put the new frame(s) on the queue. -* This should never fail since we check above that no frames -* are still pending on the queue. -*/ -if (!ath9k_hw_stoptxdma (ah, sc->beacon.beaconq)) { -ath_err (common,"beacon queue %u did not stop?\n" , - sc->beacon.beaconq); - } -/* NB: cabq traffic should already be queued and primed */ ath9k_hw_puttxbuf (ah, sc->beacon.beaconq, bfaddr);ath9k_hw_txstart (ah, sc->beacon.beaconq);
@@ -780,7 +771,7 @@ void ath9k_set_beaconing_status(struct ath_softc *sc, bool status) ah->imask &= ~ATH9K_INT_SWBA ;ath9k_hw_set_interrupts (ah, ah->imask);tasklet_kill (&sc->bcon_tasklet); -ath9k_hw_stoptxdma (ah, sc->beacon.beaconq); +ath9k_hw_stop_dma_queue (ah, sc->beacon.beaconq); }ath9k_ps_restore (sc); }
drivers/net/wireless/ath/ath9k/calib.c +2 -2
@@ -262,7 +262,7 @@ void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)* since 250us often results in NF load timeout and causes deaf * condition during stress testing 12/12/2009 */ -for (j =0 ; j <1000 ; j++) { +for (j =0 ; j <10000 ; j++) {if ((REG_READ (ah,AR_PHY_AGC_CONTROL ) &AR_PHY_AGC_CONTROL_NF ) ==0 )break ;
@@ -278,7 +278,7 @@ void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)* here, the baseband nf cal will just be capped by our present * noisefloor until the next calibration timer. */ -if (j ==1000 ) { +if (j ==10000 ) {ath_dbg (common,ATH_DBG_ANY ,"Timeout while waiting for nf to load: AR_PHY_AGC_CONTROL=0x%x\n" ,REG_READ (ah,AR_PHY_AGC_CONTROL ));
drivers/net/wireless/ath/ath9k/hw.c +2 -2
@@ -701,7 +701,7 @@ static void ath9k_hw_init_pll(struct ath_hw *ah, AR_CH0_DPLL3_PHASE_SHIFT, DPLL3_PHASE_SHIFT_VAL);REG_WRITE (ah,AR_RTC_PLL_CONTROL ,0x1142c ); -udelay (100 ); +udelay (1000 );REG_WRITE (ah,AR_RTC_PLL_CONTROL2 ,0x886666 );
@@ -713,7 +713,7 @@ static void ath9k_hw_init_pll(struct ath_hw *ah,REG_RMW_FIELD (ah,AR_CH0_BB_DPLL3 ,AR_CH0_DPLL3_PHASE_SHIFT ,DPLL3_PHASE_SHIFT_VAL );REG_WRITE (ah,AR_RTC_PLL_CONTROL ,0x142c ); -udelay (110 ); +udelay (1000 ); } pll =ath9k_hw_compute_pll_control (ah, chan);
drivers/net/wireless/ath/ath9k/hw.h +2 -2
@@ -95,9 +95,9 @@#define REG_READ_FIELD (_a, _r, _f) \ (((REG_READ(_a, _r) & _f) >> _f##_S))#define REG_SET_BIT (_a, _r, _f) \ - REG_WRITE(_a, _r, REG_READ(_a, _r) | _f) + REG_WRITE(_a, _r, REG_READ(_a, _r) | (_f))#define REG_CLR_BIT (_a, _r, _f) \ - REG_WRITE(_a, _r, REG_READ(_a, _r) & ~_f) + REG_WRITE(_a, _r, REG_READ(_a, _r) & ~(_f))#define DO_DELAY (x) do { \ if ((++(x) % 64) == 0) \
drivers/net/wireless/ath/ath9k/mac.c +32 -57
116 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/mac.h +2 -1
@@ -676,7 +676,8 @@ void ath9k_hw_txstart(struct ath_hw *ah, u32 q);void ath9k_hw_cleartxdesc (struct ath_hw *ah,void *ds);u32 ath9k_hw_numtxpending (struct ath_hw *ah,u32 q);bool ath9k_hw_updatetxtriglevel (struct ath_hw *ah,bool bIncTrigLevel); -bool ath9k_hw_stoptxdma (struct ath_hw *ah,u32 q); +bool ath9k_hw_stop_dma_queue (struct ath_hw *ah,u32 q); +void ath9k_hw_abort_tx_dma (struct ath_hw *ah);void ath9k_hw_gettxintrtxqs (struct ath_hw *ah,u32 *txqs);bool ath9k_hw_set_txq_props (struct ath_hw *ah,int q,const struct ath9k_tx_queue_info *qinfo);
drivers/net/wireless/ath/ath9k/main.c +21 -35
77 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/recv.c +1 -3
@@ -413,9 +413,7 @@ u32 ath_calcrxfilter(struct ath_softc *sc)* mode interface or when in monitor mode. AP mode does not need this * since it receives all in-BSS frames anyway. */ -if (((sc->sc_ah->opmode !=NL80211_IFTYPE_AP ) && - (sc->rx.rxfilter &FIF_PROMISC_IN_BSS )) || - (sc->sc_ah->is_monitoring)) +if (sc->sc_ah->is_monitoring) rfilt |=ATH9K_RX_FILTER_PROM ;if (sc->rx.rxfilter &FIF_CONTROL )
drivers/net/wireless/ath/ath9k/xmit.c +20 -24
76 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl-agn-lib.c +103 -32
193 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl-agn.c +87 -0
99 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl-commands.h +7 -1
@@ -2964,9 +2964,15 @@ struct iwl3945_scan_cmd {u8 data[0 ]; } __packed; +enum iwl_scan_flags { +/* BIT(0) currently unused */ +IWL_SCAN_FLAGS_ACTION_FRAME_TX =BIT (1 ), +/* bits 2-7 reserved */ +}; +struct iwl_scan_cmd {__le16 len; -u8 reserved0; +u8 scan_flags;/* scan flags: see enum iwl_scan_flags */ u8 channel_count;/* # channels in channel list */ __le16 quiet_time;/* dwell only this # millisecs on quiet channel * (only for active scan) */
drivers/net/wireless/iwlwifi/iwl-core.h +6 -0
@@ -63,6 +63,8 @@#ifndef __iwl_core_h__#define __iwl_core_h__ +#include "iwl-dev.h" +/************************ * forward declarations * ************************/
@@ -551,6 +553,10 @@ u16 iwl_get_passive_dwell_time(struct iwl_priv *priv, struct ieee80211_vif *vif);void iwl_setup_scan_deferred_work (struct iwl_priv *priv);void iwl_cancel_scan_deferred_work (struct iwl_priv *priv); +int __must_check iwl_scan_initiate (struct iwl_priv *priv, +struct ieee80211_vif *vif, +enum iwl_scan_type scan_type, +enum ieee80211_band band);/* For faster active scanning, scan will move to the next channel if fewer than * PLCP_QUIET_THRESH packets are heard on this channel within
drivers/net/wireless/iwlwifi/iwl-dev.h +11 -1
@@ -1230,6 +1230,12 @@ struct iwl_rxon_context { } ht; }; +enum iwl_scan_type { +IWL_SCAN_NORMAL , +IWL_SCAN_RADIO_RESET , +IWL_SCAN_OFFCH_TX , +}; +struct iwl_priv {/* ieee device used by generic ieee processing code */
@@ -1290,7 +1296,7 @@ struct iwl_priv {enum ieee80211_band scan_band;struct cfg80211_scan_request *scan_request;struct ieee80211_vif *scan_vif; -bool is_internal_short_scan; +enum iwl_scan_type scan_type;u8 scan_tx_ant[IEEE80211_NUM_BANDS ];u8 mgmt_tx_ant;
@@ -1504,6 +1510,10 @@ struct iwl_priv {struct delayed_work hw_roc_work;enum nl80211_channel_type hw_roc_chantype;int hw_roc_duration; + +struct sk_buff *offchan_tx_skb; +int offchan_tx_timeout; + struct ieee80211_channel *offchan_tx_chan; } _agn;#endif };
drivers/net/wireless/iwlwifi/iwl-scan.c +24 -17
112 lines not on this page · raw message
drivers/net/wireless/libertas/mesh.c +4 -7
@@ -918,7 +918,6 @@ static ssize_t mesh_id_get(struct device *dev, struct device_attribute *attr, char *buf) {struct mrvl_mesh_defaults defs; -int maxlen;int ret; ret =mesh_get_default_parameters (dev, &defs);
@@ -931,13 +930,11 @@ static ssize_t mesh_id_get(struct device *dev, struct device_attribute *attr, defs.meshie.val.mesh_id_len =IEEE80211_MAX_SSID_LEN ; } -/* SSID not null terminated: reserve room for \0 + \n */ - maxlen = defs.meshie.val.mesh_id_len +2 ; - maxlen = (PAGE_SIZE > maxlen) ? maxlen :PAGE_SIZE ; +memcpy (buf, defs.meshie.val.mesh_id, defs.meshie.val.mesh_id_len); + buf[defs.meshie.val.mesh_id_len] ='\n' ; + buf[defs.meshie.val.mesh_id_len +1 ] ='\0' ; - defs.meshie.val.mesh_id[defs.meshie.val.mesh_id_len] ='\0' ; - -return snprintf (buf, maxlen,"%s\n" , defs.meshie.val.mesh_id); +return defs.meshie.val.mesh_id_len +1 ; }/**
drivers/net/wireless/wl1251/ps.c +6 -35
71 lines not on this page · raw message
include/net/cfg80211.h +8 -0
@@ -1197,6 +1197,10 @@ struct cfg80211_pmksa {* (also see nl80211.h @NL80211_ATTR_WIPHY_ANTENNA_TX). * * @get_antenna: Get current antenna configuration from device (tx_ant, rx_ant). +* +* @set_ringparam: Set tx and rx ring sizes. +* +* @get_ringparam: Get tx and rx ring current and maximum sizes. */ struct cfg80211_ops {int (*suspend)(struct wiphy *wiphy);
@@ -1364,6 +1368,10 @@ struct cfg80211_ops {int (*set_antenna)(struct wiphy *wiphy,u32 tx_ant,u32 rx_ant);int (*get_antenna)(struct wiphy *wiphy,u32 *tx_ant,u32 *rx_ant); + +int (*set_ringparam)(struct wiphy *wiphy,u32 tx,u32 rx); +void (*get_ringparam)(struct wiphy *wiphy, +u32 *tx,u32 *tx_max,u32 *rx,u32 *rx_max); };/*
include/net/mac80211.h +7 -0
@@ -1804,6 +1804,10 @@ enum ieee80211_ampdu_mlme_action {* return value is 1, then the @remain_on_channel will be used with a * regular transmission (if supported.) * @offchannel_tx_cancel_wait: cancel wait associated with offchannel TX +* +* @set_ringparam: Set tx and rx ring sizes. +* +* @get_ringparam: Get tx and rx ring current and maximum sizes. */ struct ieee80211_ops {void (*tx)(struct ieee80211_hw *hw,struct sk_buff *skb);
@@ -1888,6 +1892,9 @@ struct ieee80211_ops {enum nl80211_channel_type channel_type, unsigned int wait);int (*offchannel_tx_cancel_wait)(struct ieee80211_hw *hw); +int (*set_ringparam)(struct ieee80211_hw *hw,u32 tx,u32 rx); +void (*get_ringparam)(struct ieee80211_hw *hw, +u32 *tx,u32 *tx_max,u32 *rx,u32 *rx_max); };/**
net/mac80211/cfg.c +21 -0
@@ -834,6 +834,10 @@ static int ieee80211_change_station(struct wiphy *wiphy,rcu_read_unlock (); +if (sdata->vif.type ==NL80211_IFTYPE_STATION && + params->sta_flags_mask &BIT (NL80211_STA_FLAG_AUTHORIZED )) +ieee80211_recalc_ps (local,-1 ); +return 0 ; }
@@ -2008,6 +2012,21 @@ static int ieee80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant)return drv_get_antenna (local, tx_ant, rx_ant); } +static int ieee80211_set_ringparam (struct wiphy *wiphy,u32 tx,u32 rx) +{ +struct ieee80211_local *local =wiphy_priv (wiphy); + +return drv_set_ringparam (local, tx, rx); +} + +static void ieee80211_get_ringparam (struct wiphy *wiphy, +u32 *tx,u32 *tx_max,u32 *rx,u32 *rx_max) +{ +struct ieee80211_local *local =wiphy_priv (wiphy); + +drv_get_ringparam (local, tx, tx_max, rx, rx_max); +} +struct cfg80211_ops mac80211_config_ops = { .add_virtual_intf = ieee80211_add_iface, .del_virtual_intf = ieee80211_del_iface,
@@ -2065,4 +2084,6 @@ struct cfg80211_ops mac80211_config_ops = { .mgmt_frame_register = ieee80211_mgmt_frame_register, .set_antenna = ieee80211_set_antenna, .get_antenna = ieee80211_get_antenna, + .set_ringparam = ieee80211_set_ringparam, + .get_ringparam = ieee80211_get_ringparam, };
net/mac80211/chan.c +3 -0
@@ -77,6 +77,9 @@ bool ieee80211_set_channel_type(struct ieee80211_local *local,switch (tmp->vif.bss_conf.channel_type) {case NL80211_CHAN_NO_HT :case NL80211_CHAN_HT20 : +if (superchan > tmp->vif.bss_conf.channel_type) +break ; + superchan = tmp->vif.bss_conf.channel_type;break ;case NL80211_CHAN_HT40PLUS :
net/mac80211/driver-ops.h +26 -0
@@ -526,4 +526,30 @@ static inline int drv_offchannel_tx_cancel_wait(struct ieee80211_local *local)return ret; } +static inline int drv_set_ringparam (struct ieee80211_local *local, +u32 tx,u32 rx) +{ +int ret = -ENOTSUPP ; + +might_sleep (); + +trace_drv_set_ringparam (local, tx, rx); +if (local->ops->set_ringparam) + ret = local->ops->set_ringparam (&local->hw, tx, rx); +trace_drv_return_int (local, ret); + +return ret; +} + +static inline void drv_get_ringparam (struct ieee80211_local *local, +u32 *tx,u32 *tx_max,u32 *rx,u32 *rx_max) +{ +might_sleep (); + +trace_drv_get_ringparam (local, tx, tx_max, rx, rx_max); +if (local->ops->get_ringparam) + local->ops->get_ringparam (&local->hw, tx, tx_max, rx, rx_max); +trace_drv_return_void (local); +} +#endif /* __MAC80211_DRIVER_OPS */
net/mac80211/driver-trace.h +52 -0
58 lines not on this page · raw message
net/mac80211/mlme.c +32 -5
@@ -613,6 +613,37 @@ static void ieee80211_change_ps(struct ieee80211_local *local) } } +static bool ieee80211_powersave_allowed (struct ieee80211_sub_if_data *sdata) +{ +struct ieee80211_if_managed *mgd = &sdata->u.mgd; +struct sta_info *sta =NULL ; +u32 sta_flags =0 ; + +if (!mgd->powersave) +return false; + +if (!mgd->associated) +return false; + +if (!mgd->associated->beacon_ies) +return false; + +if (mgd->flags & (IEEE80211_STA_BEACON_POLL | +IEEE80211_STA_CONNECTION_POLL )) +return false; + +rcu_read_lock (); + sta =sta_info_get (sdata, mgd->bssid); +if (sta) + sta_flags =get_sta_flags (sta); +rcu_read_unlock (); + +if (!(sta_flags &WLAN_STA_AUTHORIZED )) +return false; + +return true; +} +/* need to hold RTNL or interface lock */ void ieee80211_recalc_ps (struct ieee80211_local *local,s32 latency) {
@@ -647,11 +678,7 @@ void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency) count++; } -if (count ==1 && found->u.mgd.powersave && - found->u.mgd.associated && - found->u.mgd.associated->beacon_ies && - !(found->u.mgd.flags & (IEEE80211_STA_BEACON_POLL | -IEEE80211_STA_CONNECTION_POLL ))) { +if (count ==1 &&ieee80211_powersave_allowed (found)) {struct ieee80211_conf *conf = &local->hw.conf;s32 beaconint_us;
net/mac80211/rc80211_minstrel_ht.c +34 -7
53 lines not on this page · raw message
net/wireless/ethtool.c +33 -0
@@ -1,5 +1,6 @@#include <linux/utsname.h> #include <net/cfg80211.h> +#include "core.h" #include "ethtool.h" static void cfg80211_get_drvinfo(struct net_device *dev,
@@ -37,9 +38,41 @@ static void cfg80211_get_regs(struct net_device *dev, struct ethtool_regs *regs, regs->len =0 ; } +static void cfg80211_get_ringparam (struct net_device *dev, +struct ethtool_ringparam *rp) +{ +struct wireless_dev *wdev = dev->ieee80211_ptr; +struct cfg80211_registered_device *rdev =wiphy_to_dev (wdev->wiphy); + +memset (rp,0 ,sizeof (*rp)); + +if (rdev->ops->get_ringparam) + rdev->ops->get_ringparam (wdev->wiphy, + &rp->tx_pending, &rp->tx_max_pending, + &rp->rx_pending, &rp->rx_max_pending); +} + +static int cfg80211_set_ringparam (struct net_device *dev, +struct ethtool_ringparam *rp) +{ +struct wireless_dev *wdev = dev->ieee80211_ptr; +struct cfg80211_registered_device *rdev =wiphy_to_dev (wdev->wiphy); + +if (rp->rx_mini_pending !=0 || rp->rx_jumbo_pending !=0 ) +return -EINVAL ; + +if (rdev->ops->set_ringparam) +return rdev->ops->set_ringparam (wdev->wiphy, + rp->tx_pending, rp->rx_pending); + +return -ENOTSUPP ; +} +const struct ethtool_ops cfg80211_ethtool_ops = { .get_drvinfo = cfg80211_get_drvinfo, .get_regs_len = cfg80211_get_regs_len, .get_regs = cfg80211_get_regs, .get_link = ethtool_op_get_link, + .get_ringparam = cfg80211_get_ringparam, + .set_ringparam = cfg80211_set_ringparam, };
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
David Miller
maintainerFrom: "John W. Linville" <[email protected]>
Date: Tue, 15 Mar 2011 15:31:22 -0400
Quoted 7 lines
One last non-fix pull for 2.6.39 -- hooray!
Not a lot here, since we just had a pull towards the end of last week. There are a handfule of ath9k bits, a couple of wl1251 patches, a couple of mac80211 bits, etc. Nothing too troublesome. :-)
Please let me know if there are problems!
Pulled, thanks a lot John.