* [PATCH 2/5] Net: ath5k, switch to ioread/iowrite
[not found] <2713029743177393055@pripojeni.net>
@ 2007-08-28 15:59 ` Jiri Slaby
2007-08-28 16:00 ` [PATCH 3/5] Net: ath5k, use int as retval Jiri Slaby
` (2 subsequent siblings)
3 siblings, 0 replies; 32+ messages in thread
From: Jiri Slaby @ 2007-08-28 15:59 UTC (permalink / raw)
To: linville; +Cc: linux-kernel, linux-wireless, netdev
ath5k, switch to ioread/iowrite
Do not use readl/writel, since iomap retval is platform dependent and
needn't be virtual address awaited by readl/writel.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit 64b9d0578668fe8c7a43eadace673bc3e57fc22b
tree 4990ed95e4112d79830d306ab6ae7afb2235f190
parent f65aa1c7d680d1bcde1ae20749eeda6d3ec02652
author Jiri Slaby <jirislaby@gmail.com> Tue, 28 Aug 2007 16:06:28 +0200
committer Jiri Slaby <jirislaby@gmail.com> Tue, 28 Aug 2007 16:24:50 +0200
drivers/net/wireless/ath5k.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath5k.h b/drivers/net/wireless/ath5k.h
index 0bb62dc..26f1229 100644
--- a/drivers/net/wireless/ath5k.h
+++ b/drivers/net/wireless/ath5k.h
@@ -1018,12 +1018,12 @@ extern int ath5k_hw_set_txpower_limit(struct ath_hw *hal, unsigned int power);
static inline u32 ath5k_hw_reg_read(struct ath_hw *hal, u16 reg)
{
- return readl(hal->ah_sh + reg);
+ return ioread32(hal->ah_sh + reg);
}
static inline void ath5k_hw_reg_write(struct ath_hw *hal, u32 val, u16 reg)
{
- writel(val, hal->ah_sh + reg);
+ iowrite32(val, hal->ah_sh + reg);
}
#endif
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 3/5] Net: ath5k, use int as retval
[not found] <2713029743177393055@pripojeni.net>
2007-08-28 15:59 ` [PATCH 2/5] Net: ath5k, switch to ioread/iowrite Jiri Slaby
@ 2007-08-28 16:00 ` Jiri Slaby
2007-08-30 12:40 ` John W. Linville
2007-08-28 16:00 ` [PATCH 4/5] Net: ath5k, license is GPLv2 Jiri Slaby
2007-08-28 16:01 ` [PATCH 5/5] Net: ath5k, kconfig changes Jiri Slaby
3 siblings, 1 reply; 32+ messages in thread
From: Jiri Slaby @ 2007-08-28 16:00 UTC (permalink / raw)
To: linville; +Cc: linux-kernel, linux-wireless, netdev
ath5k, use int as retval
Convert some functions to return int and proper negative return value on
error as we are used to.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit ceeaf6b9aac9daaa41ec38fbba3d2c1972af4470
tree 44cd0736147325e35c32274eb53bd543fb1510a9
parent 64b9d0578668fe8c7a43eadace673bc3e57fc22b
author Jiri Slaby <jirislaby@gmail.com> Tue, 28 Aug 2007 16:10:36 +0200
committer Jiri Slaby <jirislaby@gmail.com> Tue, 28 Aug 2007 16:24:57 +0200
drivers/net/wireless/ath5k.h | 27 +++---
drivers/net/wireless/ath5k_base.c | 2
drivers/net/wireless/ath5k_hw.c | 169 +++++++++++++++++--------------------
3 files changed, 91 insertions(+), 107 deletions(-)
diff --git a/drivers/net/wireless/ath5k.h b/drivers/net/wireless/ath5k.h
index 26f1229..0c6f3f5 100644
--- a/drivers/net/wireless/ath5k.h
+++ b/drivers/net/wireless/ath5k.h
@@ -919,10 +919,10 @@ extern int ath5k_hw_stop_rx_dma(struct ath_hw *hal);
extern u32 ath5k_hw_get_rx_buf(struct ath_hw *hal);
extern void ath5k_hw_put_rx_buf(struct ath_hw *hal, u32 phys_addr);
extern int ath5k_hw_tx_start(struct ath_hw *hal, unsigned int queue);
-extern bool ath5k_hw_stop_tx_dma(struct ath_hw *hal, unsigned int queue);
+extern int ath5k_hw_stop_tx_dma(struct ath_hw *hal, unsigned int queue);
extern u32 ath5k_hw_get_tx_buf(struct ath_hw *hal, unsigned int queue);
extern int ath5k_hw_put_tx_buf(struct ath_hw *hal, unsigned int queue, u32 phys_addr);
-extern bool ath5k_hw_update_tx_triglevel(struct ath_hw *hal, bool increase);
+extern int ath5k_hw_update_tx_triglevel(struct ath_hw *hal, bool increase);
/* Interrupt handling */
extern bool ath5k_hw_is_intr_pending(struct ath_hw *hal);
extern int ath5k_hw_get_isr(struct ath_hw *hal, enum ath5k_int *interrupt_mask);
@@ -930,19 +930,19 @@ extern enum ath5k_int ath5k_hw_set_intr(struct ath_hw *hal, enum ath5k_int new_m
/* EEPROM access functions */
extern int ath5k_hw_set_regdomain(struct ath_hw *hal, u16 regdomain);
/* Protocol Control Unit Functions */
-extern void ath5k_hw_set_opmode(struct ath_hw *hal);
+extern int ath5k_hw_set_opmode(struct ath_hw *hal);
/* BSSID Functions */
extern void ath5k_hw_get_lladdr(struct ath_hw *hal, u8 *mac);
-extern bool ath5k_hw_set_lladdr(struct ath_hw *hal, const u8 *mac);
+extern int ath5k_hw_set_lladdr(struct ath_hw *hal, const u8 *mac);
extern void ath5k_hw_set_associd(struct ath_hw *hal, const u8 *bssid, u16 assoc_id);
-extern bool ath5k_hw_set_bssid_mask(struct ath_hw *hal, const u8 *mask);
+extern int ath5k_hw_set_bssid_mask(struct ath_hw *hal, const u8 *mask);
/* Receive start/stop functions */
extern void ath5k_hw_start_rx_pcu(struct ath_hw *hal);
extern void ath5k_hw_stop_pcu_recv(struct ath_hw *hal);
/* RX Filter functions */
extern void ath5k_hw_set_mcast_filter(struct ath_hw *hal, u32 filter0, u32 filter1);
-extern bool ath5k_hw_set_mcast_filterindex(struct ath_hw *hal, u32 index);
-extern bool ath5k_hw_clear_mcast_filter_idx(struct ath_hw *hal, u32 index);
+extern int ath5k_hw_set_mcast_filterindex(struct ath_hw *hal, u32 index);
+extern int ath5k_hw_clear_mcast_filter_idx(struct ath_hw *hal, u32 index);
extern u32 ath5k_hw_get_rx_filter(struct ath_hw *ah);
extern void ath5k_hw_set_rx_filter(struct ath_hw *ah, u32 filter);
/* Beacon related functions */
@@ -950,14 +950,14 @@ extern u32 ath5k_hw_get_tsf32(struct ath_hw *hal);
extern u64 ath5k_hw_get_tsf64(struct ath_hw *hal);
extern void ath5k_hw_reset_tsf(struct ath_hw *hal);
extern void ath5k_hw_init_beacon(struct ath_hw *hal, u32 next_beacon, u32 interval);
-extern void ath5k_hw_set_beacon_timers(struct ath_hw *hal, const struct ath5k_beacon_state *state);
+extern int ath5k_hw_set_beacon_timers(struct ath_hw *hal, const struct ath5k_beacon_state *state);
extern void ath5k_hw_reset_beacon(struct ath_hw *hal);
-extern bool ath5k_hw_wait_for_beacon(struct ath_hw *hal, unsigned long phys_addr);
+extern int ath5k_hw_wait_for_beacon(struct ath_hw *hal, unsigned long phys_addr);
extern void ath5k_hw_update_mib_counters(struct ath_hw *hal, struct ath5k_mib_stats *statistics);
/* ACK/CTS Timeouts */
-extern bool ath5k_hw_set_ack_timeout(struct ath_hw *hal, unsigned int timeout);
+extern int ath5k_hw_set_ack_timeout(struct ath_hw *hal, unsigned int timeout);
extern unsigned int ath5k_hw_get_ack_timeout(struct ath_hw *hal);
-extern bool ath5k_hw_set_cts_timeout(struct ath_hw *hal, unsigned int timeout);
+extern int ath5k_hw_set_cts_timeout(struct ath_hw *hal, unsigned int timeout);
extern unsigned int ath5k_hw_get_cts_timeout(struct ath_hw *hal);
/* Key table (WEP) functions */
extern int ath5k_hw_reset_key(struct ath_hw *hal, u16 entry);
@@ -971,7 +971,7 @@ extern int ath5k_hw_get_tx_queueprops(struct ath_hw *hal, int queue, struct ath5
extern void ath5k_hw_release_tx_queue(struct ath_hw *hal, unsigned int queue);
extern int ath5k_hw_reset_tx_queue(struct ath_hw *hal, unsigned int queue);
extern u32 ath5k_hw_num_tx_pending(struct ath_hw *hal, unsigned int queue);
-extern bool ath5k_hw_set_slot_time(struct ath_hw *hal, unsigned int slot_time);
+extern int ath5k_hw_set_slot_time(struct ath_hw *hal, unsigned int slot_time);
extern unsigned int ath5k_hw_get_slot_time(struct ath_hw *hal);
/* Hardware Descriptor Functions */
extern int ath5k_hw_setup_rx_desc(struct ath_hw *hal, struct ath_desc *desc, u32 size, unsigned int flags);
@@ -987,9 +987,6 @@ extern u16 ath5k_get_regdomain(struct ath_hw *hal);
/* Misc functions */
extern void ath5k_hw_dump_state(struct ath_hw *hal);
extern int ath5k_hw_get_capability(struct ath_hw *hal, enum ath5k_capability_type cap_type, u32 capability, u32 *result);
-bool ath5k_hw_query_pspoll_support(struct ath_hw *hal);
-bool ath5k_hw_enable_pspoll(struct ath_hw *hal, u8 *bssid, u16 assoc_id);
-bool ath5k_hw_disable_pspoll(struct ath_hw *hal);
/* Initial register settings functions */
diff --git a/drivers/net/wireless/ath5k_base.c b/drivers/net/wireless/ath5k_base.c
index 4bbccf9..5ee36b5 100644
--- a/drivers/net/wireless/ath5k_base.c
+++ b/drivers/net/wireless/ath5k_base.c
@@ -577,7 +577,7 @@ static void ath_beacon_send(struct ath_softc *sc)
* This should never fail since we check above that no frames
* are still pending on the queue.
*/
- if (unlikely(!ath5k_hw_stop_tx_dma(ah, sc->bhalq))) {
+ if (unlikely(ath5k_hw_stop_tx_dma(ah, sc->bhalq))) {
printk(KERN_WARNING "ath: beacon queue %u didn't stop?\n",
sc->bhalq);
/* NB: the HAL still stops DMA, so proceed */
diff --git a/drivers/net/wireless/ath5k_hw.c b/drivers/net/wireless/ath5k_hw.c
index d92da20..a15aa21 100644
--- a/drivers/net/wireless/ath5k_hw.c
+++ b/drivers/net/wireless/ath5k_hw.c
@@ -61,6 +61,9 @@ static int ath5k_hw_get_capabilities(struct ath_hw *);
static int ath5k_eeprom_init(struct ath_hw *);
static int ath5k_eeprom_read_mac(struct ath_hw *, u8 *);
+static int ath5k_hw_enable_pspoll(struct ath_hw *, u8 *, u16);
+static int ath5k_hw_disable_pspoll(struct ath_hw *);
+
/*
* Enable to overwrite the country code (use "00" for debug)
*/
@@ -1265,8 +1268,7 @@ int ath5k_hw_tx_start(struct ath_hw *hal, unsigned int queue)
* Stop DMA transmit for a specific queue
* (see also QCU/DCU functions)
*/
-bool
-ath5k_hw_stop_tx_dma(struct ath_hw *hal, unsigned int queue)
+int ath5k_hw_stop_tx_dma(struct ath_hw *hal, unsigned int queue)
{
unsigned int i = 100;
u32 tx_queue, pending;
@@ -1276,7 +1278,7 @@ ath5k_hw_stop_tx_dma(struct ath_hw *hal, unsigned int queue)
/* Return if queue is declared inactive */
if (hal->ah_txq[queue].tqi_type == AR5K_TX_QUEUE_INACTIVE)
- return false;
+ return -EIO;
if (hal->ah_version == AR5K_AR5210) {
tx_queue = ath5k_hw_reg_read(hal, AR5K_CR);
@@ -1295,7 +1297,7 @@ ath5k_hw_stop_tx_dma(struct ath_hw *hal, unsigned int queue)
ath5k_hw_reg_write(hal, 0, AR5K_BSR);
break;
default:
- return false;
+ return -EINVAL;
}
/* Stop queue */
@@ -1318,8 +1320,8 @@ ath5k_hw_stop_tx_dma(struct ath_hw *hal, unsigned int queue)
ath5k_hw_reg_write(hal, 0, AR5K_QCU_TXD);
}
- /* TODO: Check for success else return false */
- return true;
+ /* TODO: Check for success else return error */
+ return 0;
}
/*
@@ -1404,11 +1406,10 @@ int ath5k_hw_put_tx_buf(struct ath_hw *hal, unsigned int queue, u32 phys_addr)
/*
* Update tx trigger level
*/
-bool
-ath5k_hw_update_tx_triglevel(struct ath_hw *hal, bool increase)
+int ath5k_hw_update_tx_triglevel(struct ath_hw *hal, bool increase)
{
u32 trigger_level, imr;
- bool status = false;
+ int ret = -EIO;
AR5K_TRACE;
@@ -1437,7 +1438,7 @@ ath5k_hw_update_tx_triglevel(struct ath_hw *hal, bool increase)
AR5K_REG_WRITE_BITS(hal, AR5K_TXCFG,
AR5K_TXCFG_TXFULL, trigger_level);
- status = true;
+ ret = 0;
done:
/*
@@ -1445,7 +1446,7 @@ done:
*/
ath5k_hw_set_intr(hal, imr);
- return status;
+ return ret;
}
/*
@@ -2252,8 +2253,7 @@ static int ath5k_hw_get_capabilities(struct ath_hw *hal)
/*
* Set Operation mode
*/
-void
-ath5k_hw_set_opmode(struct ath_hw *hal)
+int ath5k_hw_set_opmode(struct ath_hw *hal)
{
u32 pcu_reg, beacon_reg, low_id, high_id;
@@ -2288,7 +2288,7 @@ ath5k_hw_set_opmode(struct ath_hw *hal)
break;
default:
- return;
+ return -EINVAL;
}
/*
@@ -2304,6 +2304,8 @@ ath5k_hw_set_opmode(struct ath_hw *hal)
*/
if (hal->ah_version == AR5K_AR5210)
ath5k_hw_reg_write(hal, beacon_reg, AR5K_BCR);
+
+ return 0;
}
/*
@@ -2322,8 +2324,7 @@ void ath5k_hw_get_lladdr(struct ath_hw *hal, u8 *mac)
/*
* Set station id
*/
-bool
-ath5k_hw_set_lladdr(struct ath_hw *hal, const u8 *mac)
+int ath5k_hw_set_lladdr(struct ath_hw *hal, const u8 *mac)
{
u32 low_id, high_id;
@@ -2337,14 +2338,13 @@ ath5k_hw_set_lladdr(struct ath_hw *hal, const u8 *mac)
ath5k_hw_reg_write(hal, low_id, AR5K_STA_ID0);
ath5k_hw_reg_write(hal, high_id, AR5K_STA_ID1);
- return true;
+ return 0;
}
/*
* Set BSSID
*/
-void
-ath5k_hw_set_associd(struct ath_hw *hal, const u8 *bssid, u16 assoc_id)
+void ath5k_hw_set_associd(struct ath_hw *hal, const u8 *bssid, u16 assoc_id)
{
u32 low_id, high_id;
u16 tim_offset = 0;
@@ -2381,8 +2381,7 @@ ath5k_hw_set_associd(struct ath_hw *hal, const u8 *bssid, u16 assoc_id)
/*
* Set BSSID mask on 5212
*/
-bool
-ath5k_hw_set_bssid_mask(struct ath_hw *hal, const u8 *mask)
+int ath5k_hw_set_bssid_mask(struct ath_hw *hal, const u8 *mask)
{
u32 low_id, high_id;
AR5K_TRACE;
@@ -2394,10 +2393,10 @@ ath5k_hw_set_bssid_mask(struct ath_hw *hal, const u8 *mask)
ath5k_hw_reg_write(hal, low_id, AR5K_BSS_IDM0);
ath5k_hw_reg_write(hal, high_id, AR5K_BSS_IDM1);
- return true;
+ return 0;
}
- return false;
+ return -EIO;
}
/*
@@ -2407,8 +2406,7 @@ ath5k_hw_set_bssid_mask(struct ath_hw *hal, const u8 *mask)
/*
* Start receive on PCU
*/
-void
-ath5k_hw_start_rx_pcu(struct ath_hw *hal)
+void ath5k_hw_start_rx_pcu(struct ath_hw *hal)
{
AR5K_TRACE;
AR5K_REG_DISABLE_BITS(hal, AR5K_DIAG_SW, AR5K_DIAG_SW_DIS_RX);
@@ -2417,8 +2415,7 @@ ath5k_hw_start_rx_pcu(struct ath_hw *hal)
/*
* Stop receive on PCU
*/
-void
-ath5k_hw_stop_pcu_recv(struct ath_hw *hal)
+void ath5k_hw_stop_pcu_recv(struct ath_hw *hal)
{
AR5K_TRACE;
AR5K_REG_ENABLE_BITS(hal, AR5K_DIAG_SW, AR5K_DIAG_SW_DIS_RX);
@@ -2431,8 +2428,7 @@ ath5k_hw_stop_pcu_recv(struct ath_hw *hal)
/*
* Set multicast filter
*/
-void
-ath5k_hw_set_mcast_filter(struct ath_hw *hal, u32 filter0, u32 filter1)
+void ath5k_hw_set_mcast_filter(struct ath_hw *hal, u32 filter0, u32 filter1)
{
AR5K_TRACE;
/* Set the multicat filter */
@@ -2443,46 +2439,43 @@ ath5k_hw_set_mcast_filter(struct ath_hw *hal, u32 filter0, u32 filter1)
/*
* Set multicast filter by index
*/
-bool
-ath5k_hw_set_mcast_filterindex(struct ath_hw *hal, u32 index)
+int ath5k_hw_set_mcast_filterindex(struct ath_hw *hal, u32 index)
{
AR5K_TRACE;
if (index >= 64)
- return false;
+ return -EINVAL;
else if (index >= 32)
AR5K_REG_ENABLE_BITS(hal, AR5K_MCAST_FILTER1,
(1 << (index - 32)));
else
AR5K_REG_ENABLE_BITS(hal, AR5K_MCAST_FILTER0, (1 << index));
- return true;
+ return 0;
}
/*
* Clear Multicast filter by index
*/
-bool
-ath5k_hw_clear_mcast_filter_idx(struct ath_hw *hal, u32 index)
+int ath5k_hw_clear_mcast_filter_idx(struct ath_hw *hal, u32 index)
{
AR5K_TRACE;
if (index >= 64)
- return false;
+ return -EINVAL;
else if (index >= 32)
AR5K_REG_DISABLE_BITS(hal, AR5K_MCAST_FILTER1,
(1 << (index - 32)));
else
AR5K_REG_DISABLE_BITS(hal, AR5K_MCAST_FILTER0, (1 << index));
- return true;
+ return 0;
}
/*
* Get current rx filter
*/
-u32
-ath5k_hw_get_rx_filter(struct ath_hw *ah)
+u32 ath5k_hw_get_rx_filter(struct ath_hw *ah)
{
u32 data, filter = 0;
@@ -2624,8 +2617,7 @@ void ath5k_hw_init_beacon(struct ath_hw *hal, u32 next_beacon, u32 interval)
/*
* Set beacon timers
*/
-void
-ath5k_hw_set_beacon_timers(struct ath_hw *hal,
+int ath5k_hw_set_beacon_timers(struct ath_hw *hal,
const struct ath5k_beacon_state *state)
{
u32 cfp_period, next_cfp, dtim, interval, next_beacon;
@@ -2645,7 +2637,7 @@ ath5k_hw_set_beacon_timers(struct ath_hw *hal,
AR5K_TRACE;
/* Return on an invalid beacon state */
if (state->bs_interval < 1)
- return;
+ return -EINVAL;
interval = state->bs_interval;
dtim = state->bs_dtim_period;
@@ -2725,7 +2717,7 @@ ath5k_hw_set_beacon_timers(struct ath_hw *hal,
dtim = state->bs_sleep_duration;
if (interval > dtim)
- return;
+ return -EINVAL;
next_beacon = interval == dtim ? state->bs_next_dtim :
state->bs_next_beacon;
@@ -2745,13 +2737,14 @@ ath5k_hw_set_beacon_timers(struct ath_hw *hal,
AR5K_REG_SM(interval, AR5K_SLEEP2_TIM_PER) |
AR5K_REG_SM(dtim, AR5K_SLEEP2_DTIM_PER), AR5K_SLEEP2);
}
+
+ return 0;
}
/*
* Reset beacon timers
*/
-void
-ath5k_hw_reset_beacon(struct ath_hw *hal)
+void ath5k_hw_reset_beacon(struct ath_hw *hal)
{
AR5K_TRACE;
/*
@@ -2771,11 +2764,10 @@ ath5k_hw_reset_beacon(struct ath_hw *hal)
* Wait for beacon queue to finish
* TODO: This function's name is misleading, rename
*/
-bool
-ath5k_hw_wait_for_beacon(struct ath_hw *hal, unsigned long phys_addr)
+int ath5k_hw_wait_for_beacon(struct ath_hw *hal, unsigned long phys_addr)
{
unsigned int i;
- bool ret;
+ int ret;
AR5K_TRACE;
@@ -2802,17 +2794,17 @@ ath5k_hw_wait_for_beacon(struct ath_hw *hal, unsigned long phys_addr)
ath5k_hw_reg_write(hal, AR5K_BCR_TQ1V | AR5K_BCR_BDMAE,
AR5K_BCR);
- return false;
+ return -EIO;
}
- ret = true;
+ ret = 0;
} else {
/*5211/5212*/
ret = ath5k_hw_register_timeout(hal,
AR5K_QUEUE_STATUS(AR5K_TX_QUEUE_ID_BEACON),
- AR5K_QCU_STS_FRMPENDCNT, 0, false) ? false : true;
+ AR5K_QCU_STS_FRMPENDCNT, 0, false);
if (AR5K_REG_READ_Q(hal, AR5K_QCU_TXE, AR5K_TX_QUEUE_ID_BEACON))
- return false;
+ return -EIO;
}
return ret;
@@ -2821,8 +2813,7 @@ ath5k_hw_wait_for_beacon(struct ath_hw *hal, unsigned long phys_addr)
/*
* Update mib counters (statistics)
*/
-void
-ath5k_hw_update_mib_counters(struct ath_hw *hal,
+void ath5k_hw_update_mib_counters(struct ath_hw *hal,
struct ath5k_mib_stats *statistics)
{
AR5K_TRACE;
@@ -2849,58 +2840,54 @@ ath5k_hw_update_mib_counters(struct ath_hw *hal,
/*
* Set ACK timeout on PCU
*/
-bool
-ath5k_hw_set_ack_timeout(struct ath_hw *hal, unsigned int timeout)
+int ath5k_hw_set_ack_timeout(struct ath_hw *hal, unsigned int timeout)
{
AR5K_TRACE;
if (ath5k_hw_clocktoh(AR5K_REG_MS(0xffffffff, AR5K_TIME_OUT_ACK),
hal->ah_turbo) <= timeout)
- return false;
+ return -EINVAL;
AR5K_REG_WRITE_BITS(hal, AR5K_TIME_OUT, AR5K_TIME_OUT_ACK,
ath5k_hw_htoclock(timeout, hal->ah_turbo));
- return true;
+ return 0;
}
/*
* Read the ACK timeout from PCU
*/
-unsigned int
-ath5k_hw_get_ack_timeout(struct ath_hw *hal)
+unsigned int ath5k_hw_get_ack_timeout(struct ath_hw *hal)
{
AR5K_TRACE;
- return (ath5k_hw_clocktoh(AR5K_REG_MS(ath5k_hw_reg_read(hal,
- AR5K_TIME_OUT), AR5K_TIME_OUT_ACK), hal->ah_turbo));
+ return ath5k_hw_clocktoh(AR5K_REG_MS(ath5k_hw_reg_read(hal,
+ AR5K_TIME_OUT), AR5K_TIME_OUT_ACK), hal->ah_turbo);
}
/*
* Set CTS timeout on PCU
*/
-bool
-ath5k_hw_set_cts_timeout(struct ath_hw *hal, unsigned int timeout)
+int ath5k_hw_set_cts_timeout(struct ath_hw *hal, unsigned int timeout)
{
AR5K_TRACE;
if (ath5k_hw_clocktoh(AR5K_REG_MS(0xffffffff, AR5K_TIME_OUT_CTS),
hal->ah_turbo) <= timeout)
- return false;
+ return -EINVAL;
AR5K_REG_WRITE_BITS(hal, AR5K_TIME_OUT, AR5K_TIME_OUT_CTS,
ath5k_hw_htoclock(timeout, hal->ah_turbo));
- return true;
+ return 0;
}
/*
* Read CTS timeout from PCU
*/
-unsigned int
-ath5k_hw_get_cts_timeout(struct ath_hw *hal)
+unsigned int ath5k_hw_get_cts_timeout(struct ath_hw *hal)
{
AR5K_TRACE;
- return (ath5k_hw_clocktoh(AR5K_REG_MS(ath5k_hw_reg_read(hal,
- AR5K_TIME_OUT), AR5K_TIME_OUT_CTS), hal->ah_turbo));
+ return ath5k_hw_clocktoh(AR5K_REG_MS(ath5k_hw_reg_read(hal,
+ AR5K_TIME_OUT), AR5K_TIME_OUT_CTS), hal->ah_turbo);
}
/*
@@ -3388,8 +3375,7 @@ int ath5k_hw_reset_tx_queue(struct ath_hw *hal, unsigned int queue)
* Get number of pending frames
* for a specific queue [5211+]
*/
-u32
-ath5k_hw_num_tx_pending(struct ath_hw *hal, unsigned int queue) {
+u32 ath5k_hw_num_tx_pending(struct ath_hw *hal, unsigned int queue) {
AR5K_TRACE;
AR5K_ASSERT_ENTRY(queue, hal->ah_capabilities.cap_queues.q_tx_num);
@@ -3407,12 +3393,11 @@ ath5k_hw_num_tx_pending(struct ath_hw *hal, unsigned int queue) {
/*
* Set slot time
*/
-bool
-ath5k_hw_set_slot_time(struct ath_hw *hal, unsigned int slot_time)
+int ath5k_hw_set_slot_time(struct ath_hw *hal, unsigned int slot_time)
{
AR5K_TRACE;
if (slot_time < AR5K_SLOT_TIME_9 || slot_time > AR5K_SLOT_TIME_MAX)
- return false;
+ return -EINVAL;
if (hal->ah_version == AR5K_AR5210)
ath5k_hw_reg_write(hal, ath5k_hw_htoclock(slot_time,
@@ -3420,19 +3405,18 @@ ath5k_hw_set_slot_time(struct ath_hw *hal, unsigned int slot_time)
else
ath5k_hw_reg_write(hal, slot_time, AR5K_DCU_GBL_IFS_SLOT);
- return true;
+ return 0;
}
/*
* Get slot time
*/
-unsigned int
-ath5k_hw_get_slot_time(struct ath_hw *hal)
+unsigned int ath5k_hw_get_slot_time(struct ath_hw *hal)
{
AR5K_TRACE;
if (hal->ah_version == AR5K_AR5210)
- return (ath5k_hw_clocktoh(ath5k_hw_reg_read(hal,
- AR5K_SLOT_TIME) & 0xffff, hal->ah_turbo));
+ return ath5k_hw_clocktoh(ath5k_hw_reg_read(hal,
+ AR5K_SLOT_TIME) & 0xffff, hal->ah_turbo);
else
return ath5k_hw_reg_read(hal, AR5K_DCU_GBL_IFS_SLOT) & 0xffff;
}
@@ -4358,38 +4342,41 @@ yes:
return 0;
}
-bool
-ath5k_hw_query_pspoll_support(struct ath_hw *hal)
+#if 0
+static bool ath5k_hw_query_pspoll_support(struct ath_hw *hal)
{
AR5K_TRACE;
+
if (hal->ah_version == AR5K_AR5210)
- return(true);
+ return true;
return false;
}
+#endif
-bool
-ath5k_hw_enable_pspoll(struct ath_hw *hal, u8 *bssid, u16 assoc_id)
+static int ath5k_hw_enable_pspoll(struct ath_hw *hal, u8 *bssid,
+ u16 assoc_id)
{
AR5K_TRACE;
+
if (hal->ah_version == AR5K_AR5210) {
AR5K_REG_DISABLE_BITS(hal, AR5K_STA_ID1,
AR5K_STA_ID1_NO_PSPOLL | AR5K_STA_ID1_DEFAULT_ANTENNA);
- return true;
+ return 0;
}
- return false;
+ return -EIO;
}
-bool
-ath5k_hw_disable_pspoll(struct ath_hw *hal)
+static int ath5k_hw_disable_pspoll(struct ath_hw *hal)
{
AR5K_TRACE;
+
if (hal->ah_version == AR5K_AR5210) {
AR5K_REG_ENABLE_BITS(hal, AR5K_STA_ID1,
AR5K_STA_ID1_NO_PSPOLL | AR5K_STA_ID1_DEFAULT_ANTENNA);
- return true;
+ return 0;
}
- return false;
+ return -EIO;
}
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 4/5] Net: ath5k, license is GPLv2
[not found] <2713029743177393055@pripojeni.net>
2007-08-28 15:59 ` [PATCH 2/5] Net: ath5k, switch to ioread/iowrite Jiri Slaby
2007-08-28 16:00 ` [PATCH 3/5] Net: ath5k, use int as retval Jiri Slaby
@ 2007-08-28 16:00 ` Jiri Slaby
2007-08-28 17:11 ` Christoph Hellwig
2007-08-29 9:59 ` Johannes Berg
2007-08-28 16:01 ` [PATCH 5/5] Net: ath5k, kconfig changes Jiri Slaby
3 siblings, 2 replies; 32+ messages in thread
From: Jiri Slaby @ 2007-08-28 16:00 UTC (permalink / raw)
To: linville; +Cc: linux-kernel, linux-wireless, netdev
ath5k, license is GPLv2
The files are available only under GPLv2 since now.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit 330c2ab9a53ddce27003218bd546034e8eeeff17
tree b24cecd991fbe3046d5c5269c61e0090427e4fd3
parent ceeaf6b9aac9daaa41ec38fbba3d2c1972af4470
author Jiri Slaby <jirislaby@gmail.com> Tue, 28 Aug 2007 16:27:51 +0200
committer Jiri Slaby <jirislaby@gmail.com> Tue, 28 Aug 2007 16:27:51 +0200
drivers/net/wireless/ath5k.h | 12 +-----------
drivers/net/wireless/ath5k_base.c | 22 +++-------------------
drivers/net/wireless/ath5k_base.h | 33 +--------------------------------
drivers/net/wireless/ath5k_hw.c | 13 +------------
drivers/net/wireless/ath5k_hw.h | 12 +-----------
drivers/net/wireless/ath5k_reg.h | 31 +------------------------------
drivers/net/wireless/ath5k_regdom.c | 4 +---
drivers/net/wireless/ath5k_regdom.h | 4 +---
8 files changed, 10 insertions(+), 121 deletions(-)
diff --git a/drivers/net/wireless/ath5k.h b/drivers/net/wireless/ath5k.h
index 0c6f3f5..c76b97b 100644
--- a/drivers/net/wireless/ath5k.h
+++ b/drivers/net/wireless/ath5k.h
@@ -2,17 +2,7 @@
* Copyright (c) 2004-2007 Reyk Floeter <reyk@openbsd.org>
* Copyright (c) 2006-2007 Nick Kossifidis <mickflemm@gmail.com>
*
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * This file is released under GPLv2
*/
#ifndef _ATH5K_H
diff --git a/drivers/net/wireless/ath5k_base.c b/drivers/net/wireless/ath5k_base.c
index 5ee36b5..8703988 100644
--- a/drivers/net/wireless/ath5k_base.c
+++ b/drivers/net/wireless/ath5k_base.c
@@ -4,25 +4,9 @@
* Copyright (c) 2007 Jiri Slaby <jirislaby@gmail.com>
* All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
- * redistribution must be conditioned upon including a substantially
- * similar Disclaimer requirement for further binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- * of any contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
+ * This file is released under GPLv2
*/
+
#define ATH_PCI_VERSION "0.9.5.0-BSD"
#include <linux/version.h>
@@ -2530,5 +2514,5 @@ module_exit(exit_ath_pci);
MODULE_AUTHOR("Jiri Slaby");
MODULE_DESCRIPTION("Support for Atheros 802.11 wireless LAN cards.");
MODULE_SUPPORTED_DEVICE("Atheros WLAN cards");
-MODULE_LICENSE("Dual BSD/GPL");
+MODULE_LICENSE("GPL v2");
MODULE_VERSION(ATH_PCI_VERSION " (EXPERIMENTAL)");
diff --git a/drivers/net/wireless/ath5k_base.h b/drivers/net/wireless/ath5k_base.h
index 15560ad..aa07dfb 100644
--- a/drivers/net/wireless/ath5k_base.h
+++ b/drivers/net/wireless/ath5k_base.h
@@ -2,38 +2,7 @@
* Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
* All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
- * redistribution must be conditioned upon including a substantially
- * similar Disclaimer requirement for further binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- * of any contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGES.
- *
- * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.20 2005/01/24 20:31:24 sam Exp $
+ * This file is released under GPLv2
*/
/*
diff --git a/drivers/net/wireless/ath5k_hw.c b/drivers/net/wireless/ath5k_hw.c
index a15aa21..3c44179 100644
--- a/drivers/net/wireless/ath5k_hw.c
+++ b/drivers/net/wireless/ath5k_hw.c
@@ -3,18 +3,7 @@
* Copyright (c) 2006-2007 Nick Kossifidis <mickflemm@gmail.com>
* Copyright (c) 2007 Jiri Slaby <jirislaby@gmail.com>
*
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
+ * This file is released under GPLv2
*/
/*
diff --git a/drivers/net/wireless/ath5k_hw.h b/drivers/net/wireless/ath5k_hw.h
index 55ae849..3d24d48 100644
--- a/drivers/net/wireless/ath5k_hw.h
+++ b/drivers/net/wireless/ath5k_hw.h
@@ -2,17 +2,7 @@
* Copyright (c) 2004-2007 Reyk Floeter <reyk@openbsd.org>
* Copyright (c) 2006-2007 Nick Kossifidis <mickflemm@gmail.com>
*
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * This file is released under GPLv2
*/
#include <linux/delay.h>
diff --git a/drivers/net/wireless/ath5k_reg.h b/drivers/net/wireless/ath5k_reg.h
index c6142d2..870efa1 100644
--- a/drivers/net/wireless/ath5k_reg.h
+++ b/drivers/net/wireless/ath5k_reg.h
@@ -2,36 +2,7 @@
* Copyright (c) 2007 Nick Kossifidis <mickflemm@gmail.com>
* All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
- * redistribution must be conditioned upon including a substantially
- * similar Disclaimer requirement for further binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- * of any contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGES.
+ * This file is released under GPLv2
*/
/*
diff --git a/drivers/net/wireless/ath5k_regdom.c b/drivers/net/wireless/ath5k_regdom.c
index c345da8..067c837 100644
--- a/drivers/net/wireless/ath5k_regdom.c
+++ b/drivers/net/wireless/ath5k_regdom.c
@@ -1,9 +1,7 @@
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
*
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
+ * This file is released under GPLv2
*/
/*
diff --git a/drivers/net/wireless/ath5k_regdom.h b/drivers/net/wireless/ath5k_regdom.h
index ebaeabe..d36bec6 100644
--- a/drivers/net/wireless/ath5k_regdom.h
+++ b/drivers/net/wireless/ath5k_regdom.h
@@ -1,9 +1,7 @@
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@openbsd.org>
*
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
+ * This file is released under GPLv2
*/
#ifndef _IEEE80211_REGDOMAIN_H_
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 5/5] Net: ath5k, kconfig changes
[not found] <2713029743177393055@pripojeni.net>
` (2 preceding siblings ...)
2007-08-28 16:00 ` [PATCH 4/5] Net: ath5k, license is GPLv2 Jiri Slaby
@ 2007-08-28 16:01 ` Jiri Slaby
2007-08-28 17:13 ` Christoph Hellwig
3 siblings, 1 reply; 32+ messages in thread
From: Jiri Slaby @ 2007-08-28 16:01 UTC (permalink / raw)
To: linville; +Cc: linux-kernel, linux-wireless, netdev
ath5k, kconfig changes
- build 5120, 5111 and 5112 optionally
- alter Kconfig text
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit 0902114e92b19bc080780f21f98807688244fc8f
tree d7b4a039e4d14ae73faf1b33907c38825d198461
parent 330c2ab9a53ddce27003218bd546034e8eeeff17
author Jiri Slaby <jirislaby@gmail.com> Tue, 28 Aug 2007 17:39:44 +0200
committer Jiri Slaby <jirislaby@gmail.com> Tue, 28 Aug 2007 17:39:44 +0200
drivers/net/wireless/Kconfig | 30 +++++++++++++++++++--------
drivers/net/wireless/ath5k_hw_inivals.c | 35 ++++++++++++++++++++++++++++---
drivers/net/wireless/ath5k_hw_phy.c | 24 +++++++++++++++++++++
3 files changed, 77 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 00b4fcd..a4608f9 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -856,18 +856,30 @@ config IWL3945
will be called iwl3945.ko.
config ATH5K
- tristate "Atheros 5xxx wireless cards support"
- depends on MAC80211
- depends on PCI
- default m
+ tristate "Atheros 5xxx PCI/Cardbus wireless cards"
+ depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
---help---
- This module adds support for atheros 5xxx (e.g. 5212) wireless
- cards. If you have this card in your PC, select this to be build.
+ Say Y here if you intend to attach an Atheros 5xxx
+ series Cardbus or PCI wireless Ethernet networking card to
+ your computer. This driver uses mac80211 stack.
- This driver uses the kernel's mac80211 subsystem.
+ To compile this driver as a module, choose M here: the module will be
+ called ath5k. If unsure, say M.
- If you choose to build a module, it'll be called ath5k. Say M if
- unsure.
+config ATH5K_AR5210
+ bool "Support AR5210"
+ depends on ATH5K
+ default y
+
+config ATH5K_AR5211
+ bool "Support AR5211"
+ depends on ATH5K
+ default y
+
+config ATH5K_AR5212
+ bool "Support AR5212"
+ depends on ATH5K
+ default y
source "drivers/net/wireless/hostap/Kconfig"
source "drivers/net/wireless/bcm43xx/Kconfig"
diff --git a/drivers/net/wireless/ath5k_hw_inivals.c b/drivers/net/wireless/ath5k_hw_inivals.c
index 062e03d..0531ad3 100644
--- a/drivers/net/wireless/ath5k_hw_inivals.c
+++ b/drivers/net/wireless/ath5k_hw_inivals.c
@@ -38,6 +38,7 @@ struct ath5k_ini_mode {
u32 mode_value[5];
};
+#ifdef CONFIG_ATH5K_AR5210
/* Initial register settings for AR5210 */
static const struct ath5k_ini ar5210_ini[] = {
/* PCU and MAC registers */
@@ -249,7 +250,9 @@ static const struct ath5k_ini ar5210_ini[] = {
{ AR5K_PHY(52), 0x00000014 },
{ AR5K_PHY_ACT, AR5K_PHY_ACT_ENABLE },
};
+#endif
+#ifdef CONFIG_ATH5K_AR5211
/* Initial register settings for AR5211 */
static const struct ath5k_ini ar5211_ini[] = {
{ AR5K_RXDP, 0x00000000 },
@@ -448,7 +451,9 @@ static const struct ath5k_ini_mode ar5211_ini_mode[] = {
{ AR5K_RF_BUFFER_CONTROL_4,
{ 0x00000010, 0x00000014, 0x00000010, 0x00000010, 0x00000010 } },
};
+#endif
+#ifdef CONFIG_ATH5K_AR5212
/* Initial register settings for AR5212 */
static const struct ath5k_ini ar5212_ini[] = {
{ AR5K_RXDP, 0x00000000 },
@@ -842,12 +847,14 @@ static const struct ath5k_ini_mode ar5212_rf5112_ini_mode[] = {
{ AR5K_PHY_GAIN_2GHZ,
{ 0x642c0140, 0x642c0140, 0x6442c160, 0x6442c160, 0x6442c160 } },
};
+#endif
/*
* Initial BaseBand Gain settings for RF5111/5112 (only AR5210 comes with
* RF5110 so initial BB Gain settings are included in AR5K_AR5210_INI)
*/
+#if defined(CONFIG_ATH5K_AR5211) || defined (CONFIG_ATH5K_AR5212)
/* RF5111 Initial BaseBand Gain settings */
static const struct ath5k_ini rf5111_ini_bbgain[] = {
{ AR5K_BB_GAIN(0), 0x00000000 },
@@ -915,7 +922,9 @@ static const struct ath5k_ini rf5111_ini_bbgain[] = {
{ AR5K_BB_GAIN(62), 0x00000002 },
{ AR5K_BB_GAIN(63), 0x00000016 },
};
+#endif
+#ifdef CONFIG_ATH5K_AR5212
/* RF 5112 Initial BaseBand Gain settings */
static const struct ath5k_ini rf5112_ini_bbgain[] = {
{ AR5K_BB_GAIN(0), 0x00000000 },
@@ -983,7 +992,10 @@ static const struct ath5k_ini rf5112_ini_bbgain[] = {
{ AR5K_BB_GAIN(62), 0x00000010 },
{ AR5K_BB_GAIN(63), 0x0000001a },
};
+#endif
+#if defined(CONFIG_ATH5K_AR5210) || defined(CONFIG_ATH5K_AR5211) \
+ || defined(CONFIG_ATH5K_AR5212)
/*
* Write initial register dump
*/
@@ -1014,7 +1026,12 @@ static void ath5k_hw_ini_registers(struct ath_hw *hal, unsigned int size,
}
}
}
+#endif
+#if defined(CONFIG_ATH5K_AR5211) || defined(CONFIG_ATH5K_AR5212)
+/*
+ * Write initial mode-specific register dump
+ */
static void ath5k_hw_ini_mode_registers(struct ath_hw *hal,
unsigned int size, const struct ath5k_ini_mode *ini_mode,
u8 mode)
@@ -1028,6 +1045,7 @@ static void ath5k_hw_ini_mode_registers(struct ath_hw *hal,
}
}
+#endif
int ath5k_hw_write_initvals(struct ath_hw *hal, u8 mode, bool change_channel)
{
@@ -1035,6 +1053,7 @@ int ath5k_hw_write_initvals(struct ath_hw *hal, u8 mode, bool change_channel)
* Write initial mode-specific settings
*/
/*For 5212*/
+#ifdef CONFIG_ATH5K_AR5212
if (hal->ah_version == AR5K_AR5212) {
ath5k_hw_ini_mode_registers(hal, ARRAY_SIZE(ar5212_ini_mode),
ar5212_ini_mode, mode);
@@ -1047,16 +1066,19 @@ int ath5k_hw_write_initvals(struct ath_hw *hal, u8 mode, bool change_channel)
ARRAY_SIZE(ar5212_rf5112_ini_mode),
ar5212_rf5112_ini_mode, mode);
}
+#endif
+#ifdef CONFIG_ATH5K_AR5211
/*For 5211*/
if (hal->ah_version == AR5K_AR5211)
ath5k_hw_ini_mode_registers(hal, ARRAY_SIZE(ar5211_ini_mode),
ar5211_ini_mode, mode);
+#endif
/* For 5210 mode settings check out ath5k_hw_reset_tx_queue */
/*
* Write initial settings common for all modes
*/
- /*For 5212*/
+#ifdef CONFIG_ATH5K_AR5212
if (hal->ah_version == AR5K_AR5212) {
ath5k_hw_ini_registers(hal, ARRAY_SIZE(ar5212_ini),
ar5212_ini, change_channel);
@@ -1075,16 +1097,23 @@ int ath5k_hw_write_initvals(struct ath_hw *hal, u8 mode, bool change_channel)
ARRAY_SIZE(rf5111_ini_bbgain),
rf5111_ini_bbgain, change_channel);
}
- } else if (hal->ah_version == AR5K_AR5211) {
+ }
+#endif
+#ifdef CONFIG_ATH5K_AR5211
+ if (hal->ah_version == AR5K_AR5211) {
ath5k_hw_ini_registers(hal, ARRAY_SIZE(ar5211_ini),
ar5211_ini, change_channel);
/* AR5211 only comes with 5111 */
ath5k_hw_ini_registers(hal, ARRAY_SIZE(rf5111_ini_bbgain),
rf5111_ini_bbgain, change_channel);
- } else if (hal->ah_version == AR5K_AR5210) {
+ }
+#endif
+#ifdef CONFIG_ATH5K_AR5210
+ if (hal->ah_version == AR5K_AR5210) {
ath5k_hw_ini_registers(hal, ARRAY_SIZE(ar5210_ini),
ar5210_ini, change_channel);
}
+#endif
return 0;
}
diff --git a/drivers/net/wireless/ath5k_hw_phy.c b/drivers/net/wireless/ath5k_hw_phy.c
index 899b79e..510bf86 100644
--- a/drivers/net/wireless/ath5k_hw_phy.c
+++ b/drivers/net/wireless/ath5k_hw_phy.c
@@ -35,6 +35,7 @@ struct ath5k_gain_opt {
const struct ath5k_gain_opt_step go_step[AR5K_GAIN_STEP_COUNT];
};
+#if defined(CONFIG_ATH5K_AR5211) || defined(CONFIG_ATH5K_AR5212)
/* RF5111 mode-specific init registers */
static const struct ath5k_ini_rf rfregs_5111[] = {
{ 0, 0x989c,
@@ -214,8 +215,10 @@ static const struct ath5k_gain_opt rfgain_opt_5111 = {
{ { 2, 1, 1, 0 }, -6 }
}
};
+#endif
/* RF5112 mode-specific init registers */
+#ifdef CONFIG_ATH5K_AR5212
static const struct ath5k_ini_rf rfregs_5112[] = {
{ 1, 0x98d4,
/* mode a/XR mode aTurbo mode b mode g mode gTurbo */
@@ -529,6 +532,7 @@ static const struct ath5k_gain_opt rfgain_opt_5112 = {
{ { 0, 1, 0, 1, 1, 0, 1 }, -16 },
}
};
+#endif
/*
* Used to modify RF Banks before writing them to AR5K_RF_BUFFER
@@ -661,12 +665,16 @@ static s32 ath5k_hw_rfregs_gain_adjust(struct ath_hw *hal)
int ret = 0;
switch (hal->ah_radio) {
+#if defined(CONFIG_ATH5K_AR5211) || defined(CONFIG_ATH5K_AR5212)
case AR5K_RF5111:
go = &rfgain_opt_5111;
break;
+#endif
+#if defined(CONFIG_ATH5K_AR5212)
case AR5K_RF5112:
go = &rfgain_opt_5112;
break;
+#endif
default:
return 0;
}
@@ -715,6 +723,7 @@ done:
return ret;
}
+#if defined(CONFIG_ATH5K_AR5211) || defined(CONFIG_ATH5K_AR5212)
/*
* Read EEPROM Calibration data, modify RF Banks and Initialize RF5111
*/
@@ -815,7 +824,9 @@ static int ath5k_hw_rf5111_rfregs(struct ath_hw *hal,
return 0;
}
+#endif
+#ifdef CONFIG_ATH5K_AR5212
/*
* Read EEPROM Calibration data, modify RF Banks and Initialize RF5112
*/
@@ -910,6 +921,7 @@ static int ath5k_hw_rf5112_rfregs(struct ath_hw *hal,
return 0;
}
+#endif
/*
* Initialize RF
@@ -921,10 +933,13 @@ int ath5k_hw_rfregs(struct ath_hw *hal, struct ieee80211_channel *channel,
int ret;
switch (hal->ah_radio) {
+#if defined(CONFIG_ATH5K_AR5211) || defined(CONFIG_ATH5K_AR5212)
case AR5K_RF5111:
hal->ah_rf_banks_size = sizeof(rfregs_5111);
func = ath5k_hw_rf5111_rfregs;
break;
+#endif
+#ifdef CONFIG_ATH5K_AR5212
case AR5K_RF5112:
if (hal->ah_radio_5ghz_revision >= AR5K_SREV_RAD_5112A)
hal->ah_rf_banks_size = sizeof(rfregs_5112a);
@@ -932,6 +947,7 @@ int ath5k_hw_rfregs(struct ath_hw *hal, struct ieee80211_channel *channel,
hal->ah_rf_banks_size = sizeof(rfregs_5112);
func = ath5k_hw_rf5112_rfregs;
break;
+#endif
default:
return -EINVAL;
}
@@ -958,14 +974,18 @@ int ath5k_hw_rfgain(struct ath_hw *hal, unsigned int freq)
unsigned int i, size;
switch (hal->ah_radio) {
+#if defined(CONFIG_ATH5K_AR5211) || defined(CONFIG_ATH5K_AR5212)
case AR5K_RF5111:
ath5k_rfg = rfgain_5111;
size = ARRAY_SIZE(rfgain_5111);
break;
+#endif
+#ifdef CONFIG_ATH5K_AR5212
case AR5K_RF5112:
ath5k_rfg = rfgain_5112;
size = ARRAY_SIZE(rfgain_5112);
break;
+#endif
default:
return -EINVAL;
}
@@ -1031,6 +1051,7 @@ int ath5k_hw_set_rfgain_opt(struct ath_hw *hal)
{
/* Initialize the gain optimization values */
switch (hal->ah_radio) {
+#if defined(CONFIG_ATH5K_AR5211) || defined(CONFIG_ATH5K_AR5212)
case AR5K_RF5111:
hal->ah_gain.g_step_idx = rfgain_opt_5111.go_default;
hal->ah_gain.g_step =
@@ -1039,6 +1060,8 @@ int ath5k_hw_set_rfgain_opt(struct ath_hw *hal)
hal->ah_gain.g_high = 35;
hal->ah_gain.g_active = 1;
break;
+#endif
+#ifdef CONFIG_ATH5K_AR5212
case AR5K_RF5112:
hal->ah_gain.g_step_idx = rfgain_opt_5112.go_default;
hal->ah_gain.g_step =
@@ -1047,6 +1070,7 @@ int ath5k_hw_set_rfgain_opt(struct ath_hw *hal)
hal->ah_gain.g_high = 85;
hal->ah_gain.g_active = 1;
break;
+#endif
default:
return -EINVAL;
}
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-28 16:00 ` [PATCH 4/5] Net: ath5k, license is GPLv2 Jiri Slaby
@ 2007-08-28 17:11 ` Christoph Hellwig
2007-08-28 20:11 ` Luis R. Rodriguez
2007-08-29 17:29 ` Valdis.Kletnieks
2007-08-29 9:59 ` Johannes Berg
1 sibling, 2 replies; 32+ messages in thread
From: Christoph Hellwig @ 2007-08-28 17:11 UTC (permalink / raw)
To: Jiri Slaby; +Cc: linville, linux-kernel, linux-wireless, netdev
On Tue, Aug 28, 2007 at 12:00:50PM -0400, Jiri Slaby wrote:
> ath5k, license is GPLv2
>
> The files are available only under GPLv2 since now.
Is this really a good idea? Most of the reverse-engineering was
done by the OpenBSD folks, and it would certainly be helpful to
work together with them on new hardware revisions, etc..
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 5/5] Net: ath5k, kconfig changes
2007-08-28 16:01 ` [PATCH 5/5] Net: ath5k, kconfig changes Jiri Slaby
@ 2007-08-28 17:13 ` Christoph Hellwig
2007-08-30 1:38 ` Nick Kossifidis
0 siblings, 1 reply; 32+ messages in thread
From: Christoph Hellwig @ 2007-08-28 17:13 UTC (permalink / raw)
To: Jiri Slaby; +Cc: linville, linux-kernel, linux-wireless, netdev
On Tue, Aug 28, 2007 at 12:01:30PM -0400, Jiri Slaby wrote:
> +config ATH5K_AR5210
> + bool "Support AR5210"
> + depends on ATH5K
> + default y
> +
> +config ATH5K_AR5211
> + bool "Support AR5211"
> + depends on ATH5K
> + default y
> +
> +config ATH5K_AR5212
> + bool "Support AR5212"
> + depends on ATH5K
> + default y
Please don't add more default statements.
Also this whole patch seems rather pointless. It saves only
very little and turns the driver into a complete ifdef maze.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-28 17:11 ` Christoph Hellwig
@ 2007-08-28 20:11 ` Luis R. Rodriguez
2007-08-29 17:29 ` Valdis.Kletnieks
1 sibling, 0 replies; 32+ messages in thread
From: Luis R. Rodriguez @ 2007-08-28 20:11 UTC (permalink / raw)
To: Christoph Hellwig, Jiri Slaby, linville, linux-kernel,
linux-wireless, netdev
On 8/28/07, Christoph Hellwig <hch@infradead.org> wrote:
> On Tue, Aug 28, 2007 at 12:00:50PM -0400, Jiri Slaby wrote:
> > ath5k, license is GPLv2
> >
> > The files are available only under GPLv2 since now.
>
> Is this really a good idea? Most of the reverse-engineering was
> done by the OpenBSD folks, and it would certainly be helpful to
> work together with them on new hardware revisions, etc..
Technically the best we can do is to leave the license as dual
licensed, but keep in that technically that means nothing and is just
for show, the GPL is what would apply as its derivative work and is
the most restrictive license. This applies to any other driver in the
kernel right now with a dual license tag.
Luis
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-28 16:00 ` [PATCH 4/5] Net: ath5k, license is GPLv2 Jiri Slaby
2007-08-28 17:11 ` Christoph Hellwig
@ 2007-08-29 9:59 ` Johannes Berg
2007-08-29 10:35 ` Jiri Slaby
1 sibling, 1 reply; 32+ messages in thread
From: Johannes Berg @ 2007-08-29 9:59 UTC (permalink / raw)
To: Jiri Slaby; +Cc: linville, linux-kernel, linux-wireless, netdev
[-- Attachment #1: Type: text/plain, Size: 1325 bytes --]
On Tue, 2007-08-28 at 12:00 -0400, Jiri Slaby wrote:
> The files are available only under GPLv2 since now.
Since the BSD people are already getting upset about (for various
reasons among which seem to be a clear non-understanding) I'd suggest
changing it to:
+ * Parts of this file were originally licenced under the BSD licence:
+ *
> * Permission to use, copy, modify, and distribute this software for any
> * purpose with or without fee is hereby granted, provided that the above
> * copyright notice and this permission notice appear in all copies.
> *
> * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
> * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
> * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
> * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
> * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
> * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
> * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Further changes to this file since the moment this notice was extended
+ * are now distributed under the terms of the GPL version two as published
+ * by the Free Software Foundation <yaddaya>
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-29 9:59 ` Johannes Berg
@ 2007-08-29 10:35 ` Jiri Slaby
2007-08-29 13:13 ` Xavier Bestel
0 siblings, 1 reply; 32+ messages in thread
From: Jiri Slaby @ 2007-08-29 10:35 UTC (permalink / raw)
To: Johannes Berg; +Cc: linville, linux-kernel, linux-wireless, netdev
On 8/29/07, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2007-08-28 at 12:00 -0400, Jiri Slaby wrote:
>
> > The files are available only under GPLv2 since now.
>
> Since the BSD people are already getting upset about (for various
> reasons among which seem to be a clear non-understanding) I'd suggest
> changing it to:
yes, please. Can somebody do it, I'm away from my box.
> + * Parts of this file were originally licenced under the BSD licence:
> + *
> > * Permission to use, copy, modify, and distribute this software for any
> > * purpose with or without fee is hereby granted, provided that the above
> > * copyright notice and this permission notice appear in all copies.
> > *
> > * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
> WARRANTIES
> > * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
> > * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
> > * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
> > * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
> > * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
> > * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> + *
> + * Further changes to this file since the moment this notice was extended
> + * are now distributed under the terms of the GPL version two as published
> + * by the Free Software Foundation <yaddaya>
>
> johannes
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-29 10:35 ` Jiri Slaby
@ 2007-08-29 13:13 ` Xavier Bestel
2007-08-30 11:59 ` Johannes Berg
0 siblings, 1 reply; 32+ messages in thread
From: Xavier Bestel @ 2007-08-29 13:13 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Johannes Berg, linville, linux-kernel, linux-wireless, netdev
On Wed, 2007-08-29 at 08:35 -0200, Jiri Slaby wrote:
> On 8/29/07, Johannes Berg <johannes@sipsolutions.net> wrote:
> > On Tue, 2007-08-28 at 12:00 -0400, Jiri Slaby wrote:
> >
> > > The files are available only under GPLv2 since now.
> >
> > Since the BSD people are already getting upset about (for various
> > reasons among which seem to be a clear non-understanding) I'd suggest
> > changing it to:
>
> yes, please. Can somebody do it, I'm away from my box.
>
> > + * Parts of this file were originally licenced under the BSD licence:
> > + *
> > > * Permission to use, copy, modify, and distribute this software for any
> > > * purpose with or without fee is hereby granted, provided that the above
> > > * copyright notice and this permission notice appear in all copies.
> > > *
> > > * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
> > WARRANTIES
> > > * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
> > > * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
> > > * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
> > > * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
> > > * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
> > > * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> > + *
> > + * Further changes to this file since the moment this notice was extended
> > + * are now distributed under the terms of the GPL version two as published
> > + * by the Free Software Foundation <yaddaya>
> >
> > johannes
How about asking for changes to be dual-licenced too ?
Xav
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-28 17:11 ` Christoph Hellwig
2007-08-28 20:11 ` Luis R. Rodriguez
@ 2007-08-29 17:29 ` Valdis.Kletnieks
2007-08-29 18:01 ` Jon Smirl
1 sibling, 1 reply; 32+ messages in thread
From: Valdis.Kletnieks @ 2007-08-29 17:29 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jiri Slaby, linville, linux-kernel, linux-wireless, netdev
[-- Attachment #1: Type: text/plain, Size: 679 bytes --]
On Tue, 28 Aug 2007 18:11:55 BST, Christoph Hellwig said:
> On Tue, Aug 28, 2007 at 12:00:50PM -0400, Jiri Slaby wrote:
> > ath5k, license is GPLv2
> >
> > The files are available only under GPLv2 since now.
>
> Is this really a good idea? Most of the reverse-engineering was
> done by the OpenBSD folks, and it would certainly be helpful to
> work together with them on new hardware revisions, etc..
The heck with "good idea" - it's unclear to me if Jiri is even *allowed*
to remove the BSD/other license. Jiri can release *his* code as GPLv2
only, but I suspect the files as a whole really should be dual BSD/GPLv2,
due to the numerous other stakeholders in those files.
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-29 17:29 ` Valdis.Kletnieks
@ 2007-08-29 18:01 ` Jon Smirl
2007-08-29 18:28 ` Alan Cox
0 siblings, 1 reply; 32+ messages in thread
From: Jon Smirl @ 2007-08-29 18:01 UTC (permalink / raw)
To: Valdis.Kletnieks@vt.edu
Cc: Christoph Hellwig, Jiri Slaby, linville, linux-kernel,
linux-wireless, netdev
On 8/29/07, Valdis.Kletnieks@vt.edu <Valdis.Kletnieks@vt.edu> wrote:
> The heck with "good idea" - it's unclear to me if Jiri is even *allowed*
> to remove the BSD/other license. Jiri can release *his* code as GPLv2
> only, but I suspect the files as a whole really should be dual BSD/GPLv2,
> due to the numerous other stakeholders in those files.
This mess has been occurring in the kernel for years. The DRM graphics
drivers are used in both BSD and Linux. It is quite easy to contribute
something to this code via LKML and think you are doing it under the
GPL. Doesn't a patch against the kernel have to be GPL? When these
patches get pulled back into BSD and distributed with it, did BSD get
infected with the GPL? AFAIK this has never been legally sorted out.
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-29 18:01 ` Jon Smirl
@ 2007-08-29 18:28 ` Alan Cox
2007-08-29 19:33 ` Jon Smirl
0 siblings, 1 reply; 32+ messages in thread
From: Alan Cox @ 2007-08-29 18:28 UTC (permalink / raw)
To: Jon Smirl
Cc: Valdis.Kletnieks@vt.edu, Christoph Hellwig, Jiri Slaby, linville,
linux-kernel, linux-wireless, netdev
> > to remove the BSD/other license. Jiri can release *his* code as GPLv2
> > only, but I suspect the files as a whole really should be dual BSD/GPLv2,
> > due to the numerous other stakeholders in those files.
>
> This mess has been occurring in the kernel for years. The DRM graphics
> drivers are used in both BSD and Linux. It is quite easy to contribute
> something to this code via LKML and think you are doing it under the
> GPL. Doesn't a patch against the kernel have to be GPL? When these
> patches get pulled back into BSD and distributed with it, did BSD get
> infected with the GPL? AFAIK this has never been legally sorted out.
I'm not aware anyone has felt it needed "sorting out". Its not exactly
complicated.
BSD non advertising is compatible with GPL
The GPL says:
"when you distribute the same sections as part of a whole which
is a work based on the Program, the distribution of the whole
must be on the terms of this License, "
The BSD license doesn't conflict with that
The GPL (and copyright law also say)
"If identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to ..."
All a bit irrelevant anyway as Ath5K code (not the .h file) say:
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
So Jiri is choosing to distribute it under the GPL, and with his changes
GPL only.
So whats the problem ?
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-29 18:28 ` Alan Cox
@ 2007-08-29 19:33 ` Jon Smirl
2007-08-29 19:37 ` Michael Buesch
` (2 more replies)
0 siblings, 3 replies; 32+ messages in thread
From: Jon Smirl @ 2007-08-29 19:33 UTC (permalink / raw)
To: Alan Cox
Cc: Valdis.Kletnieks@vt.edu, Christoph Hellwig, Jiri Slaby, linville,
linux-kernel, linux-wireless, netdev
On 8/29/07, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> > > to remove the BSD/other license. Jiri can release *his* code as GPLv2
> > > only, but I suspect the files as a whole really should be dual BSD/GPLv2,
> > > due to the numerous other stakeholders in those files.
> >
> > This mess has been occurring in the kernel for years. The DRM graphics
> > drivers are used in both BSD and Linux. It is quite easy to contribute
> > something to this code via LKML and think you are doing it under the
> > GPL. Doesn't a patch against the kernel have to be GPL? When these
> > patches get pulled back into BSD and distributed with it, did BSD get
> > infected with the GPL? AFAIK this has never been legally sorted out.
>
> I'm not aware anyone has felt it needed "sorting out". Its not exactly
> complicated.
>
> BSD non advertising is compatible with GPL
>
> The GPL says:
> "when you distribute the same sections as part of a whole which
> is a work based on the Program, the distribution of the whole
> must be on the terms of this License, "
>
> The BSD license doesn't conflict with that
>
> The GPL (and copyright law also say)
>
> "If identifiable sections of that work are not derived from the Program,
> and can be reasonably considered independent and separate works in
> themselves, then this License, and its terms, do not apply to ..."
>
> All a bit irrelevant anyway as Ath5K code (not the .h file) say:
>
> * Alternatively, this software may be distributed under the terms of the
> * GNU General Public License ("GPL") version 2 as published by the Free
> * Software Foundation.
>
> So Jiri is choosing to distribute it under the GPL, and with his changes
> GPL only.
>
> So whats the problem ?
BSD code can definitely be brought into a GPL project as you describe.
The problem is the other direction.
Aren't patches made against the kernel GPL'd if the author doesn't
explicitly grant them more liberal BSD license in addition?
The problem then comes in taking the patches that were only made
available against GPL code and reshipping them under the BSD license
without the author explicitly agreeing to this.
What if a patch spans both code that is pure GPL and code imported
from BSD, how do you license it?
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-29 19:33 ` Jon Smirl
@ 2007-08-29 19:37 ` Michael Buesch
2007-08-30 8:26 ` Jarek Poplawski
2007-08-29 19:45 ` Alan Cox
2007-08-30 13:02 ` David Newall
2 siblings, 1 reply; 32+ messages in thread
From: Michael Buesch @ 2007-08-29 19:37 UTC (permalink / raw)
To: Jon Smirl
Cc: Alan Cox, Valdis.Kletnieks@vt.edu, Christoph Hellwig, Jiri Slaby,
linville, linux-kernel, linux-wireless, netdev
On Wednesday 29 August 2007 21:33:43 Jon Smirl wrote:
> What if a patch spans both code that is pure GPL and code imported
> from BSD, how do you license it?
I think it's a valid assumption, if we say that the author
of the patch read the license header of a file and agreed with it.
So the patch is licensed to whatever the fileheader says. And if
there's none, it's licensed with the COPYING terms.
If a patch author likes some other license conditions, he must
explicitely add them with the patch to the file, saying that this
and that part have these and those conditions. Of course they must
be compatible with the original license.
--
Greetings Michael.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-29 19:33 ` Jon Smirl
2007-08-29 19:37 ` Michael Buesch
@ 2007-08-29 19:45 ` Alan Cox
2007-08-30 13:45 ` Jarek Poplawski
2007-08-30 13:02 ` David Newall
2 siblings, 1 reply; 32+ messages in thread
From: Alan Cox @ 2007-08-29 19:45 UTC (permalink / raw)
To: Jon Smirl
Cc: Valdis.Kletnieks@vt.edu, Christoph Hellwig, Jiri Slaby, linville,
linux-kernel, linux-wireless, netdev
> Aren't patches made against the kernel GPL'd if the author doesn't
> explicitly grant them more liberal BSD license in addition?
That would be the normal assumption.
> The problem then comes in taking the patches that were only made
> available against GPL code and reshipping them under the BSD license
> without the author explicitly agreeing to this.
>
> What if a patch spans both code that is pure GPL and code imported
> from BSD, how do you license it?
See the acpi codebase for a worked example.
Alan
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 5/5] Net: ath5k, kconfig changes
2007-08-28 17:13 ` Christoph Hellwig
@ 2007-08-30 1:38 ` Nick Kossifidis
2007-08-30 12:35 ` Christoph Hellwig
2007-08-30 12:36 ` John W. Linville
0 siblings, 2 replies; 32+ messages in thread
From: Nick Kossifidis @ 2007-08-30 1:38 UTC (permalink / raw)
To: Christoph Hellwig, Jiri Slaby, linville, linux-kernel,
linux-wireless, netdev
2007/8/28, Christoph Hellwig <hch@infradead.org>:
> On Tue, Aug 28, 2007 at 12:01:30PM -0400, Jiri Slaby wrote:
> > +config ATH5K_AR5210
> > + bool "Support AR5210"
> > + depends on ATH5K
> > + default y
> > +
> > +config ATH5K_AR5211
> > + bool "Support AR5211"
> > + depends on ATH5K
> > + default y
> > +
> > +config ATH5K_AR5212
> > + bool "Support AR5212"
> > + depends on ATH5K
> > + default y
>
> Please don't add more default statements.
>
> Also this whole patch seems rather pointless. It saves only
> very little and turns the driver into a complete ifdef maze.
It saves big chunks of code (not only initial register settings
arrays) and we'll extend it's use more inside ath5k_hw.c Trust me this
is a very useful step, eg. check out descriptor processing / setup or
PHY functions (calibrate/channel set etc). For example AR5210 mac chip
only comes with RF5110 phy chip so we can get rid of RF5111/RF5112
code, AR5211 comes with RF5111 so we can get rid of RF5110 and RF5112
code and AR5212 comes with RF5111 or RF5112 so we get rid of RF5110.
This thing also saves lots of checks during runtime (some of them
happen verry frequently, eg. durring descriptor processing). Also most
people will use 5212 code only, 5211 cards are on some old laptops and
5210, well i couldn't even find a 5210 for actual testing :P
--
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-29 19:37 ` Michael Buesch
@ 2007-08-30 8:26 ` Jarek Poplawski
2007-08-30 8:32 ` Jarek Poplawski
0 siblings, 1 reply; 32+ messages in thread
From: Jarek Poplawski @ 2007-08-30 8:26 UTC (permalink / raw)
To: netdev
Cc: Jon Smirl, Valdis.Kletnieks@vt.edu, Christoph Hellwig, Jiri Slaby,
linville, linux-kernel, linux-wireless, Alan Cox
On 29-08-2007 21:37, Michael Buesch wrote:
> On Wednesday 29 August 2007 21:33:43 Jon Smirl wrote:
>> What if a patch spans both code that is pure GPL and code imported
>> from BSD, how do you license it?
>
> I think it's a valid assumption, if we say that the author
> of the patch read the license header of a file and agreed with it.
> So the patch is licensed to whatever the fileheader says. And if
> there's none, it's licensed with the COPYING terms.
> If a patch author likes some other license conditions, he must
> explicitely add them with the patch to the file, saying that this
> and that part have these and those conditions. Of course they must
> be compatible with the original license.
>
I didn't track this thread from the beginning, so maybe I repeat
somebody's ideas (probably like above), but IMHO: do we have to be
so selfish/pedantic? Can't we sometimes 'donate' a little bit to our
'older' bsd cousins or half-brothers? I think, it could be like this:
- if our changes are minor and authors of these changes don't mind
the file could stay BSD licensed only; plus we ask BSD to let it be
dual licensed (but no big hassle);
- otherwise, we should always distinctly mark all GPL parts.
Regards,
Jarek P.
PS: there is probably some mess with gmail addresses in this thread.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-30 8:26 ` Jarek Poplawski
@ 2007-08-30 8:32 ` Jarek Poplawski
0 siblings, 0 replies; 32+ messages in thread
From: Jarek Poplawski @ 2007-08-30 8:32 UTC (permalink / raw)
To: netdev
Cc: Jon Smirl, Valdis.Kletnieks@vt.edu, Christoph Hellwig, Jiri Slaby,
linville, linux-kernel, linux-wireless, Alan Cox
On Thu, Aug 30, 2007 at 10:26:52AM +0200, Jarek Poplawski wrote:
...
> PS: there is probably some mess with gmail addresses in this thread.
...or maybe it's OK... Sorry.
Jarek P.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-29 13:13 ` Xavier Bestel
@ 2007-08-30 11:59 ` Johannes Berg
0 siblings, 0 replies; 32+ messages in thread
From: Johannes Berg @ 2007-08-30 11:59 UTC (permalink / raw)
To: Xavier Bestel; +Cc: Jiri Slaby, linville, linux-kernel, linux-wireless, netdev
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
On Wed, 2007-08-29 at 15:13 +0200, Xavier Bestel wrote:
> How about asking for changes to be dual-licenced too ?
In theory, that could work, but in practice relying on functions that
the Linux kernel offers in GPLv2-only headers etc. will make the result
GPLv2 anyway, and disentangling it would be a nightmare.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 5/5] Net: ath5k, kconfig changes
2007-08-30 1:38 ` Nick Kossifidis
@ 2007-08-30 12:35 ` Christoph Hellwig
2007-08-30 12:36 ` John W. Linville
1 sibling, 0 replies; 32+ messages in thread
From: Christoph Hellwig @ 2007-08-30 12:35 UTC (permalink / raw)
To: Nick Kossifidis
Cc: Christoph Hellwig, Jiri Slaby, linville, linux-kernel,
linux-wireless, netdev
On Thu, Aug 30, 2007 at 04:38:09AM +0300, Nick Kossifidis wrote:
> It saves big chunks of code (not only initial register settings
> arrays) and we'll extend it's use more inside ath5k_hw.c Trust me this
> is a very useful step, eg. check out descriptor processing / setup or
> PHY functions (calibrate/channel set etc). For example AR5210 mac chip
> only comes with RF5110 phy chip so we can get rid of RF5111/RF5112
> code, AR5211 comes with RF5111 so we can get rid of RF5110 and RF5112
> code and AR5212 comes with RF5111 or RF5112 so we get rid of RF5110.
> This thing also saves lots of checks during runtime (some of them
> happen verry frequently, eg. durring descriptor processing). Also most
> people will use 5212 code only, 5211 cards are on some old laptops and
> 5210, well i couldn't even find a 5210 for actual testing :P
If you're doing these checks in a hotpath something is badly wrong with
your architecture.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 5/5] Net: ath5k, kconfig changes
2007-08-30 1:38 ` Nick Kossifidis
2007-08-30 12:35 ` Christoph Hellwig
@ 2007-08-30 12:36 ` John W. Linville
2007-08-30 22:18 ` Nick Kossifidis
2007-08-31 11:58 ` Dan Williams
1 sibling, 2 replies; 32+ messages in thread
From: John W. Linville @ 2007-08-30 12:36 UTC (permalink / raw)
To: Nick Kossifidis
Cc: Christoph Hellwig, Jiri Slaby, linux-kernel, linux-wireless,
netdev
On Thu, Aug 30, 2007 at 04:38:09AM +0300, Nick Kossifidis wrote:
> 2007/8/28, Christoph Hellwig <hch@infradead.org>:
> > Also this whole patch seems rather pointless. It saves only
> > very little and turns the driver into a complete ifdef maze.
> Also most
> people will use 5212 code only, 5211 cards are on some old laptops and
> 5210, well i couldn't even find a 5210 for actual testing :P
FWIW, I'd bet dollars to donuts that distros will enable them all
together.
Is saving code space the only reason to turn these off? How much
space do you save?
Is there some way you can isolate and/or limit the number of ifdef
blocks further? If so, we might consider a version of this patch
that depends on EMBEDDED or somesuch...?
John
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 3/5] Net: ath5k, use int as retval
2007-08-28 16:00 ` [PATCH 3/5] Net: ath5k, use int as retval Jiri Slaby
@ 2007-08-30 12:40 ` John W. Linville
2007-09-01 20:08 ` Jiri Slaby
0 siblings, 1 reply; 32+ messages in thread
From: John W. Linville @ 2007-08-30 12:40 UTC (permalink / raw)
To: Jiri Slaby; +Cc: linux-kernel, linux-wireless, netdev
On Tue, Aug 28, 2007 at 12:00:09PM -0400, Jiri Slaby wrote:
> ath5k, use int as retval
>
> Convert some functions to return int and proper negative return value on
> error as we are used to.
Since I didn't apply 1/5, this one didn't apply either. It seems
fine overall, so if you rediff I'll be happy to apply.
John
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-29 19:33 ` Jon Smirl
2007-08-29 19:37 ` Michael Buesch
2007-08-29 19:45 ` Alan Cox
@ 2007-08-30 13:02 ` David Newall
2 siblings, 0 replies; 32+ messages in thread
From: David Newall @ 2007-08-30 13:02 UTC (permalink / raw)
To: Jon Smirl; +Cc: linux-kernel, linux-wireless, netdev
Is it actually necessary to change the license? With the dual-license,
you can keep a single code-base for both BSD and Linux platforms, which
seems terribly important to me. It'd be awful to lose that. It would
be a maintenance nightmare for BSD. Is it even possible--in real life,
I mean--to accept GPLed patches into a BSD project? Nightmare, I tell you!
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/5] Net: ath5k, license is GPLv2
2007-08-29 19:45 ` Alan Cox
@ 2007-08-30 13:45 ` Jarek Poplawski
0 siblings, 0 replies; 32+ messages in thread
From: Jarek Poplawski @ 2007-08-30 13:45 UTC (permalink / raw)
To: Johannes Berg
Cc: Jiri Slaby, linville, linux-kernel, linux-wireless, netdev,
Xavier Bestel, Jiri Slaby
On 30-08-2007 13:59, Johannes Berg wrote:
> On Wed, 2007-08-29 at 15:13 +0200, Xavier Bestel wrote:
>
>> How about asking for changes to be dual-licenced too ?
>
> In theory, that could work, but in practice relying on functions that
> the Linux kernel offers in GPLv2-only headers etc. will make the result
> GPLv2 anyway, and disentangling it would be a nightmare.
>
Why?
Very good point, but, in my opinion, it should be still resonable for
both sides: it simply means such changes are mostly unusable for the
other side, but nobody is going to waste time for marking all these
places, or care about suing if accidentally the changes, after some
adaptation, are usable for the other side. Unless you think or know
that "#include xyz" or "print_linux_way()" should add more than these
(maybe unusable) words or lines only?
Jarek P.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 5/5] Net: ath5k, kconfig changes
2007-08-30 12:36 ` John W. Linville
@ 2007-08-30 22:18 ` Nick Kossifidis
2007-09-01 5:58 ` Nick Kossifidis
2007-08-31 11:58 ` Dan Williams
1 sibling, 1 reply; 32+ messages in thread
From: Nick Kossifidis @ 2007-08-30 22:18 UTC (permalink / raw)
To: John W. Linville
Cc: Christoph Hellwig, Jiri Slaby, linux-kernel, linux-wireless,
netdev
2007/8/30, John W. Linville <linville@tuxdriver.com>:
> On Thu, Aug 30, 2007 at 04:38:09AM +0300, Nick Kossifidis wrote:
> > 2007/8/28, Christoph Hellwig <hch@infradead.org>:
>
> > > Also this whole patch seems rather pointless. It saves only
> > > very little and turns the driver into a complete ifdef maze.
>
> > Also most
> > people will use 5212 code only, 5211 cards are on some old laptops and
> > 5210, well i couldn't even find a 5210 for actual testing :P
>
> FWIW, I'd bet dollars to donuts that distros will enable them all
> together.
>
> Is saving code space the only reason to turn these off? How much
> space do you save?
>
> Is there some way you can isolate and/or limit the number of ifdef
> blocks further? If so, we might consider a version of this patch
> that depends on EMBEDDED or somesuch...?
>
> John
O.K. as a first step i'll limit 5210 code only then, just an option
like "support older 5210 chipsets" which is going to be off by default
instead of 3 options. It's not just saving space, it's also saving
some runtime checks. It's not really a gain in performance though,
most checks are done during initialization and dfs setup, i just
thought it would be usefull to save as much cpu as possible.
--
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 5/5] Net: ath5k, kconfig changes
2007-08-30 12:36 ` John W. Linville
2007-08-30 22:18 ` Nick Kossifidis
@ 2007-08-31 11:58 ` Dan Williams
2007-08-31 13:30 ` Jeff Garzik
1 sibling, 1 reply; 32+ messages in thread
From: Dan Williams @ 2007-08-31 11:58 UTC (permalink / raw)
To: John W. Linville
Cc: Nick Kossifidis, Christoph Hellwig, Jiri Slaby, linux-kernel,
linux-wireless, netdev
On Thu, 2007-08-30 at 08:36 -0400, John W. Linville wrote:
> On Thu, Aug 30, 2007 at 04:38:09AM +0300, Nick Kossifidis wrote:
> > 2007/8/28, Christoph Hellwig <hch@infradead.org>:
>
> > > Also this whole patch seems rather pointless. It saves only
> > > very little and turns the driver into a complete ifdef maze.
>
> > Also most
> > people will use 5212 code only, 5211 cards are on some old laptops and
> > 5210, well i couldn't even find a 5210 for actual testing :P
>
> FWIW, I'd bet dollars to donuts that distros will enable them all
> together.
I would certainly _hope_ that distros enable everything -that is in the
kernel- that they can get their hands on, otherwise when you stick a
card in, it doesn't just work.
Dan
> Is saving code space the only reason to turn these off? How much
> space do you save?
>
> Is there some way you can isolate and/or limit the number of ifdef
> blocks further? If so, we might consider a version of this patch
> that depends on EMBEDDED or somesuch...?
>
> John
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 5/5] Net: ath5k, kconfig changes
2007-08-31 11:58 ` Dan Williams
@ 2007-08-31 13:30 ` Jeff Garzik
2007-08-31 14:32 ` Dan Williams
0 siblings, 1 reply; 32+ messages in thread
From: Jeff Garzik @ 2007-08-31 13:30 UTC (permalink / raw)
To: Dan Williams
Cc: John W. Linville, Nick Kossifidis, Christoph Hellwig, Jiri Slaby,
linux-kernel, linux-wireless, netdev
Dan Williams wrote:
> On Thu, 2007-08-30 at 08:36 -0400, John W. Linville wrote:
>> On Thu, Aug 30, 2007 at 04:38:09AM +0300, Nick Kossifidis wrote:
>>> 2007/8/28, Christoph Hellwig <hch@infradead.org>:
>>>> Also this whole patch seems rather pointless. It saves only
>>>> very little and turns the driver into a complete ifdef maze.
>>> Also most
>>> people will use 5212 code only, 5211 cards are on some old laptops and
>>> 5210, well i couldn't even find a 5210 for actual testing :P
>> FWIW, I'd bet dollars to donuts that distros will enable them all
>> together.
>
> I would certainly _hope_ that distros enable everything -that is in the
> kernel- that they can get their hands on, otherwise when you stick a
> card in, it doesn't just work.
Distros definitely -do not- do this. Plenty of ancient ISA drivers are
disabled at build time, for example, in many distros.
Jeff
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 5/5] Net: ath5k, kconfig changes
2007-08-31 13:30 ` Jeff Garzik
@ 2007-08-31 14:32 ` Dan Williams
0 siblings, 0 replies; 32+ messages in thread
From: Dan Williams @ 2007-08-31 14:32 UTC (permalink / raw)
To: Jeff Garzik
Cc: John W. Linville, Nick Kossifidis, Christoph Hellwig, Jiri Slaby,
linux-kernel, linux-wireless, netdev
On Fri, 2007-08-31 at 09:30 -0400, Jeff Garzik wrote:
> Dan Williams wrote:
> > On Thu, 2007-08-30 at 08:36 -0400, John W. Linville wrote:
> >> On Thu, Aug 30, 2007 at 04:38:09AM +0300, Nick Kossifidis wrote:
> >>> 2007/8/28, Christoph Hellwig <hch@infradead.org>:
> >>>> Also this whole patch seems rather pointless. It saves only
> >>>> very little and turns the driver into a complete ifdef maze.
> >>> Also most
> >>> people will use 5212 code only, 5211 cards are on some old laptops and
> >>> 5210, well i couldn't even find a 5210 for actual testing :P
> >> FWIW, I'd bet dollars to donuts that distros will enable them all
> >> together.
> >
> > I would certainly _hope_ that distros enable everything -that is in the
> > kernel- that they can get their hands on, otherwise when you stick a
> > card in, it doesn't just work.
>
> Distros definitely -do not- do this. Plenty of ancient ISA drivers are
> disabled at build time, for example, in many distros.
Ok, so let me qualify to "within reason". All 802.11-compliant wireless
cards would fall within the "within reason" IMHO, but, for example,
older non 802.11 wireless cards (early Aironet products for example)
probably don't. ISA clearly does not for mainstream distros.
Dan
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 5/5] Net: ath5k, kconfig changes
2007-08-30 22:18 ` Nick Kossifidis
@ 2007-09-01 5:58 ` Nick Kossifidis
0 siblings, 0 replies; 32+ messages in thread
From: Nick Kossifidis @ 2007-09-01 5:58 UTC (permalink / raw)
To: John W. Linville
Cc: Christoph Hellwig, Jiri Slaby, linux-kernel, linux-wireless,
netdev
2007/8/31, Nick Kossifidis <mickflemm@gmail.com>:
> 2007/8/30, John W. Linville <linville@tuxdriver.com>:
> > On Thu, Aug 30, 2007 at 04:38:09AM +0300, Nick Kossifidis wrote:
> > > 2007/8/28, Christoph Hellwig <hch@infradead.org>:
> >
> > > > Also this whole patch seems rather pointless. It saves only
> > > > very little and turns the driver into a complete ifdef maze.
> >
> > > Also most
> > > people will use 5212 code only, 5211 cards are on some old laptops and
> > > 5210, well i couldn't even find a 5210 for actual testing :P
> >
> > FWIW, I'd bet dollars to donuts that distros will enable them all
> > together.
> >
> > Is saving code space the only reason to turn these off? How much
> > space do you save?
> >
> > Is there some way you can isolate and/or limit the number of ifdef
> > blocks further? If so, we might consider a version of this patch
> > that depends on EMBEDDED or somesuch...?
> >
> > John
>
> O.K. as a first step i'll limit 5210 code only then, just an option
> like "support older 5210 chipsets" which is going to be off by default
> instead of 3 options. It's not just saving space, it's also saving
> some runtime checks. It's not really a gain in performance though,
> most checks are done during initialization and dfs setup, i just
> thought it would be usefull to save as much cpu as possible.
>
Well after some thought i removed them all, there is no real gain from
this in most cases (that ppl will use newer 5212 chips and
combatibles).
--
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 3/5] Net: ath5k, use int as retval
2007-08-30 12:40 ` John W. Linville
@ 2007-09-01 20:08 ` Jiri Slaby
2007-09-02 15:55 ` Nick Kossifidis
0 siblings, 1 reply; 32+ messages in thread
From: Jiri Slaby @ 2007-09-01 20:08 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, linux-wireless, netdev
John W. Linville napsal(a):
> On Tue, Aug 28, 2007 at 12:00:09PM -0400, Jiri Slaby wrote:
>> ath5k, use int as retval
>>
>> Convert some functions to return int and proper negative return value on
>> error as we are used to.
>
> Since I didn't apply 1/5, this one didn't apply either. It seems
> fine overall, so if you rediff I'll be happy to apply.
Ok, I'll do it, thanks,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 3/5] Net: ath5k, use int as retval
2007-09-01 20:08 ` Jiri Slaby
@ 2007-09-02 15:55 ` Nick Kossifidis
0 siblings, 0 replies; 32+ messages in thread
From: Nick Kossifidis @ 2007-09-02 15:55 UTC (permalink / raw)
To: Jiri Slaby; +Cc: John W. Linville, linux-kernel, linux-wireless, netdev
2007/9/1, Jiri Slaby <jirislaby@gmail.com>:
> John W. Linville napsal(a):
> > On Tue, Aug 28, 2007 at 12:00:09PM -0400, Jiri Slaby wrote:
> >> ath5k, use int as retval
> >>
> >> Convert some functions to return int and proper negative return value on
> >> error as we are used to.
> >
> > Since I didn't apply 1/5, this one didn't apply either. It seems
> > fine overall, so if you rediff I'll be happy to apply.
>
> Ok, I'll do it, thanks,
Can somebody commit my resent changes from madwifi-svn (cleanups,
kconfig, remove_hw_ from filenames etc) ? I don't have git repository
;-(
--
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2007-09-02 15:55 UTC | newest]
Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <2713029743177393055@pripojeni.net>
2007-08-28 15:59 ` [PATCH 2/5] Net: ath5k, switch to ioread/iowrite Jiri Slaby
2007-08-28 16:00 ` [PATCH 3/5] Net: ath5k, use int as retval Jiri Slaby
2007-08-30 12:40 ` John W. Linville
2007-09-01 20:08 ` Jiri Slaby
2007-09-02 15:55 ` Nick Kossifidis
2007-08-28 16:00 ` [PATCH 4/5] Net: ath5k, license is GPLv2 Jiri Slaby
2007-08-28 17:11 ` Christoph Hellwig
2007-08-28 20:11 ` Luis R. Rodriguez
2007-08-29 17:29 ` Valdis.Kletnieks
2007-08-29 18:01 ` Jon Smirl
2007-08-29 18:28 ` Alan Cox
2007-08-29 19:33 ` Jon Smirl
2007-08-29 19:37 ` Michael Buesch
2007-08-30 8:26 ` Jarek Poplawski
2007-08-30 8:32 ` Jarek Poplawski
2007-08-29 19:45 ` Alan Cox
2007-08-30 13:45 ` Jarek Poplawski
2007-08-30 13:02 ` David Newall
2007-08-29 9:59 ` Johannes Berg
2007-08-29 10:35 ` Jiri Slaby
2007-08-29 13:13 ` Xavier Bestel
2007-08-30 11:59 ` Johannes Berg
2007-08-28 16:01 ` [PATCH 5/5] Net: ath5k, kconfig changes Jiri Slaby
2007-08-28 17:13 ` Christoph Hellwig
2007-08-30 1:38 ` Nick Kossifidis
2007-08-30 12:35 ` Christoph Hellwig
2007-08-30 12:36 ` John W. Linville
2007-08-30 22:18 ` Nick Kossifidis
2007-09-01 5:58 ` Nick Kossifidis
2007-08-31 11:58 ` Dan Williams
2007-08-31 13:30 ` Jeff Garzik
2007-08-31 14:32 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox