rpms/kernel/F-8 linux-2.6-ps3_gelic_wireless.patch, NONE, 1.1 kernel.spec, 1.365, 1.366

John W. Linville (linville) fedora-extras-commits at redhat.com
Thu Mar 6 16:23:15 UTC 2008


Author: linville

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19504

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-ps3_gelic_wireless.patch 
Log Message:
add ps3_gelic_wireless driver

linux-2.6-ps3_gelic_wireless.patch:

--- NEW FILE linux-2.6-ps3_gelic_wireless.patch ---
commit 4b74850dc3fb8a0941dde0f1bf7686803d1250cd
Author: Masakazu Mokuno <mokuno at sm.sony.co.jp>
Date:   Fri Feb 22 16:45:26 2008 +0900

    PS3: gelic: Link the wireless net_device structure to the corresponding device structure
    
    Link the net_device structure of the wireless part to the
    corresponding device structure.
    
    Without this, the sysfs node for this net_device would not have
    'device' link.
    
    Signed-off-by: Masakazu Mokuno <mokuno at sm.sony.co.jp>
    Acked-by: Dan Williams <dcbw at redhat.com>
    Signed-off-by: John W. Linville <linville at tuxdriver.com>
commit 09dde54c6a69d4f9ea1213923b93aeae7020f8b6
Author: Masakazu Mokuno <mokuno at sm.sony.co.jp>
Date:   Thu Feb 7 19:58:57 2008 +0900

    PS3: gelic: Add wireless support for PS3
    
    Signed-off-by: Masakazu Mokuno <mokuno at sm.sony.co.jp>
    Acked-by: Dan Williams <dcbw at redhat.com>
    Acked-by: John W. Linville <linville at tuxdriver.com>
    Signed-off-by: Jeff Garzik <jeff at garzik.org>

commit 589866f9f1cb14273b644993d362ec7845007f94
Author: Masakazu Mokuno <mokuno at sm.sony.co.jp>
Date:   Thu Feb 7 19:58:42 2008 +0900

    PS3: gelic: Add support for dual network interface
    
    Add support for dual network (net_device) interface so that ethernet
    and wireless can own separate ethX interfaces.
    
    V2
      - Fix the bug that bringing down and up the interface keeps rx
        disabled.
      - Make 'gelic_net_poll_controller()' extern , as David Woodhouse
        pointed out at the previous submission.
      - Fix weird usage of member names for the rx descriptor chain
    V1
      - Export functions which are convenient for both interfaces
      - Move irq allocation/release code to driver probe/remove handlers
        because interfaces share interrupts.
      - Allocate skbs by using dev_alloc_skb() instead of netdev_alloc_skb()
        as the interfaces share the hardware rx queue.
      - Add gelic_port struct in order to abstract dual interface handling
      - Change handlers for hardware queues so that they can handle dual
        {source,destination} interfaces.
      - Use new NAPI functions
    This is a prerequisite for the new PS3 wireless support.
    
    Signed-off-by: Jeff Garzik <jeff at garzik.org>

commit 01fed4c284def58b8a9ee0b915c3956b93c670b7
Author: Masakazu Mokuno <mokuno at sm.sony.co.jp>
Date:   Thu Feb 7 19:58:32 2008 +0900

    PS3: gelic: add support for port link status
    
    Add support for interrupt driven port link status detection.
    
    Signed-off-by: Masakazu Mokuno <mokuno at sm.sony.co.jp>
    Signed-off-by: Jeff Garzik <jeff at garzik.org>

commit 7bc56b92b025c13f8d3c9b049ed816db464fb0b5
Author: Masakazu Mokuno <mokuno at sm.sony.co.jp>
Date:   Thu Feb 7 19:58:20 2008 +0900

    PS3: gelic: remove duplicated ethtool handlers
    
    Remove some ethtool handlers, which duplicate functionality that was already
    provided by the common ethtool handlers.
    
    Signed-off-by: Masakazu Mokuno <mokuno at sm.sony.co.jp>
    Signed-off-by: Jeff Garzik <jeff at garzik.org>

commit 59e973277cf942a1eac6d83802d6c9d1f397566b
Author: Masakazu Mokuno <mokuno at sm.sony.co.jp>
Date:   Thu Feb 7 19:58:08 2008 +0900

    PS3: gelic: code cleanup
    
    Code cleanup:
     - Use appropriate prefixes for names instead of fixed 'gelic_net'
       so that objects of the functions, variables and constants can be estimated.
     - Remove definitions for IPSec offload to the gelic hardware.  This
       functionality is never supported on PS3.
     - Group constants with enum.
     - Use bitwise constants for interrupt status, instead of bit numbers to
       eliminate shift operations.
     - Style fixes.
    Signed-off-by: Masakazu Mokuno <mokuno at sm.sony.co.jp>
    Signed-off-by: Jeff Garzik <jeff at garzik.org>

commit 100e1d891902e432951e88bffba0dc49005a216c
Author: Masakazu Mokuno <mokuno at sm.sony.co.jp>
Date:   Thu Feb 7 19:57:54 2008 +0900

    PS3: gelic: Add endianness macros
    
    Mark the members of the structure for DMA descriptors with proper endian
    annotations and use the appropriate accessor macros.
    As the gelic driver works only on PS3, all these macros will be
    expanded to null.
    
    Signed-off-by: Masakazu Mokuno <mokuno at sm.sony.co.jp>
    Signed-off-by: Jeff Garzik <jeff at garzik.org>

commit b94e1d47684b0bee6088d848e29154697ea4c4bd
Author: Masakazu Mokuno <mokuno at sm.sony.co.jp>
Date:   Thu Feb 7 19:57:41 2008 +0900

    PS3: gelic: Fix the wrong dev_id passed
    
    The device id for lv1_net_set_interrupt_status_indicator() is wrong.
    This path would be invoked only in the case of an initialization failure.
    
    Signed-off-by: Masakazu Mokuno <mokuno at sm.sony.co.jp>
    Signed-off-by: Jeff Garzik <jeff at garzik.org>

diff -up linux-2.6.24.noarch/drivers/net/Makefile.orig linux-2.6.24.noarch/drivers/net/Makefile
--- linux-2.6.24.noarch/drivers/net/Makefile.orig	2008-03-06 11:12:01.000000000 -0500
+++ linux-2.6.24.noarch/drivers/net/Makefile	2008-03-06 11:13:12.000000000 -0500
@@ -67,7 +67,8 @@ obj-$(CONFIG_BNX2) += bnx2.o
 spidernet-y += spider_net.o spider_net_ethtool.o
 obj-$(CONFIG_SPIDER_NET) += spidernet.o sungem_phy.o
 obj-$(CONFIG_GELIC_NET) += ps3_gelic.o
-ps3_gelic-objs += ps3_gelic_net.o
+gelic_wireless-$(CONFIG_GELIC_WIRELESS) += ps3_gelic_wireless.o
+ps3_gelic-objs += ps3_gelic_net.o $(gelic_wireless-y)
 obj-$(CONFIG_TC35815) += tc35815.o
 obj-$(CONFIG_SKGE) += skge.o
 obj-$(CONFIG_SKY2) += sky2.o
diff -up /dev/null linux-2.6.24.noarch/drivers/net/ps3_gelic_wireless.c
--- /dev/null	2008-03-05 20:34:43.806375470 -0500
+++ linux-2.6.24.noarch/drivers/net/ps3_gelic_wireless.c	2008-03-06 11:13:20.000000000 -0500
@@ -0,0 +1,2754 @@
+/*
+ *  PS3 gelic network driver.
+ *
+ * Copyright (C) 2007 Sony Computer Entertainment Inc.
+ * Copyright 2007 Sony Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#undef DEBUG
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+
+#include <linux/etherdevice.h>
+#include <linux/ethtool.h>
+#include <linux/if_vlan.h>
+
+#include <linux/in.h>
+#include <linux/ip.h>
+#include <linux/tcp.h>
+#include <linux/wireless.h>
+#include <linux/ctype.h>
+#include <linux/string.h>
+#include <net/iw_handler.h>
+#include <net/ieee80211.h>
+
+#include <linux/dma-mapping.h>
+#include <net/checksum.h>
+#include <asm/firmware.h>
+#include <asm/ps3.h>
+#include <asm/lv1call.h>
+
+#include "ps3_gelic_net.h"
+#include "ps3_gelic_wireless.h"
+
+
+static int gelic_wl_start_scan(struct gelic_wl_info *wl, int always_scan);
+static int gelic_wl_try_associate(struct net_device *netdev);
+
+/*
+ * tables
+ */
+
+/* 802.11b/g channel to freq in MHz */
+static const int channel_freq[] = {
+	2412, 2417, 2422, 2427, 2432,
+	2437, 2442, 2447, 2452, 2457,
+	2462, 2467, 2472, 2484
+};
[...5353 lines suppressed...]
+};
+
+enum gelic_eurus_scan_sec_type {
+	GELIC_EURUS_SCAN_SEC_NONE	= 0x0000,
+	GELIC_EURUS_SCAN_SEC_WEP	= 0x0100,
+	GELIC_EURUS_SCAN_SEC_WPA	= 0x0200,
+	GELIC_EURUS_SCAN_SEC_WPA2	= 0x0400,
+	GELIC_EURUS_SCAN_SEC_MASK	= 0x0f00,
+};
+
+enum gelic_eurus_scan_sec_wep_type {
+	GELIC_EURUS_SCAN_SEC_WEP_UNKNOWN	= 0x0000,
+	GELIC_EURUS_SCAN_SEC_WEP_40		= 0x0001,
+	GELIC_EURUS_SCAN_SEC_WEP_104		= 0x0002,
+	GELIC_EURUS_SCAN_SEC_WEP_MASK		= 0x0003,
+};
+
+enum gelic_eurus_scan_sec_wpa_type {
+	GELIC_EURUS_SCAN_SEC_WPA_UNKNOWN	= 0x0000,
+	GELIC_EURUS_SCAN_SEC_WPA_TKIP		= 0x0001,
+	GELIC_EURUS_SCAN_SEC_WPA_AES		= 0x0002,
+	GELIC_EURUS_SCAN_SEC_WPA_MASK		= 0x0003,
+};
+
+/*
+ * hw BSS information structure returned from GELIC_EURUS_CMD_GET_SCAN
+ */
+struct gelic_eurus_scan_info {
+	/* all fields are big endian */
+	__be16 size;
+	__be16 rssi; /* percentage */
+	__be16 channel; /* channel number */
+	__be16 beacon_period; /* FIXME: in msec unit */
+	__be16 capability;
+	__be16 security;
+	u8  bssid[8]; /* last ETH_ALEN are valid. bssid[0],[1] are unused */
+	u8  essid[32]; /* IW_ESSID_MAX_SIZE */
+	u8  rate[16]; /* first MAX_RATES_LENGTH(12) are valid */
+	u8  ext_rate[16]; /* first MAX_RATES_EX_LENGTH(16) are valid */
+	__be32 reserved1;
+	__be32 reserved2;
+	__be32 reserved3;
+	__be32 reserved4;
+	u8 elements[0]; /* ie */
+} __attribute__ ((packed));
+
+/* the hypervisor returns bbs up to 16 */
+#define GELIC_EURUS_MAX_SCAN  (16)
+struct gelic_wl_scan_info {
+	struct list_head list;
+	struct gelic_eurus_scan_info *hwinfo;
+
+	int valid; /* set 1 if this entry was in latest scanned list
+		     * from Eurus */
+	unsigned int eurus_index; /* index in the Eurus list */
+	unsigned long last_scanned; /* acquired time */
+
+	unsigned int rate_len;
+	unsigned int rate_ext_len;
+	unsigned int essid_len;
+};
+
+/* for GELIC_EURUS_CMD_GET_RSSI */
+struct gelic_eurus_rssi_info {
+	/* big endian */
+	__be16 rssi;
+} __attribute__ ((packed));
+
+
+/* for 'stat' member of gelic_wl_info */
+enum gelic_wl_info_status_bit {
+	GELIC_WL_STAT_CONFIGURED,
+	GELIC_WL_STAT_CH_INFO,   /* ch info aquired */
+	GELIC_WL_STAT_ESSID_SET, /* ESSID specified by userspace */
+	GELIC_WL_STAT_BSSID_SET, /* BSSID specified by userspace */
+	GELIC_WL_STAT_WPA_PSK_SET, /* PMK specified by userspace */
+	GELIC_WL_STAT_WPA_LEVEL_SET, /* WEP or WPA[2] selected */
+};
+
+/* for 'scan_stat' member of gelic_wl_info */
+enum gelic_wl_scan_state {
+	/* just initialized or get last scan result failed */
+	GELIC_WL_SCAN_STAT_INIT,
+	/* scan request issued, accepted or chip is scanning */
+	GELIC_WL_SCAN_STAT_SCANNING,
+	/* scan results retrieved */
+	GELIC_WL_SCAN_STAT_GOT_LIST,
+};
+
+/* for 'cipher_method' */
+enum gelic_wl_cipher_method {
+	GELIC_WL_CIPHER_NONE,
+	GELIC_WL_CIPHER_WEP,
+	GELIC_WL_CIPHER_TKIP,
+	GELIC_WL_CIPHER_AES,
+};
+
+/* for 'wpa_level' */
+enum gelic_wl_wpa_level {
+	GELIC_WL_WPA_LEVEL_NONE,
+	GELIC_WL_WPA_LEVEL_WPA,
+	GELIC_WL_WPA_LEVEL_WPA2,
+};
+
+/* for 'assoc_stat' */
+enum gelic_wl_assoc_state {
+	GELIC_WL_ASSOC_STAT_DISCONN,
+	GELIC_WL_ASSOC_STAT_ASSOCIATING,
+	GELIC_WL_ASSOC_STAT_ASSOCIATED,
+};
+/* part of private data alloc_etherdev() allocated */
+#define GELIC_WEP_KEYS 4
+struct gelic_wl_info {
+	/* bss list */
+	struct semaphore scan_lock;
+	struct list_head network_list;
+	struct list_head network_free_list;
+	struct gelic_wl_scan_info *networks;
+
+	unsigned long scan_age; /* last scanned time */
+	enum gelic_wl_scan_state scan_stat;
+	struct completion scan_done;
+
+	/* eurus command queue */
+	struct workqueue_struct *eurus_cmd_queue;
+	struct completion cmd_done_intr;
+
+	/* eurus event handling */
+	struct workqueue_struct *event_queue;
+	struct delayed_work event_work;
+
+	/* wl status bits */
+	unsigned long stat;
+	enum gelic_eurus_auth_method auth_method; /* open/shared */
+	enum gelic_wl_cipher_method group_cipher_method;
+	enum gelic_wl_cipher_method pairwise_cipher_method;
+	enum gelic_wl_wpa_level wpa_level; /* wpa/wpa2 */
+
+	/* association handling */
+	struct semaphore assoc_stat_lock;
+	struct delayed_work assoc_work;
+	enum gelic_wl_assoc_state assoc_stat;
+	struct completion assoc_done;
+
+	spinlock_t lock;
+	u16 ch_info; /* available channels. bit0 = ch1 */
+	/* WEP keys */
+	u8 key[GELIC_WEP_KEYS][IW_ENCODING_TOKEN_MAX];
+	unsigned long key_enabled;
+	unsigned int key_len[GELIC_WEP_KEYS];
+	unsigned int current_key;
+	/* WWPA PSK */
+	u8 psk[GELIC_WL_EURUS_PSK_MAX_LEN];
+	enum gelic_eurus_wpa_psk_type psk_type;
+	unsigned int psk_len;
+
+	u8 essid[IW_ESSID_MAX_SIZE];
+	u8 bssid[ETH_ALEN]; /* userland requested */
+	u8 active_bssid[ETH_ALEN]; /* associated bssid */
+	unsigned int essid_len;
+
+	/* buffer for hypervisor IO */
+	void *buf;
+
+	struct iw_public_data wireless_data;
+	struct iw_statistics iwstat;
+};
+
+#define GELIC_WL_BSS_MAX_ENT 32
+#define GELIC_WL_ASSOC_RETRY 50
+static inline struct gelic_port *wl_port(struct gelic_wl_info *wl)
+{
+	return container_of((void *)wl, struct gelic_port, priv);
+}
+static inline struct gelic_wl_info *port_wl(struct gelic_port *port)
+{
+	return port_priv(port);
+}
+
+struct gelic_eurus_cmd {
+	struct work_struct work;
+	struct gelic_wl_info *wl;
+	unsigned int cmd; /* command code */
+	u64 tag;
+	u64 size;
+	void *buffer;
+	unsigned int buf_size;
+	struct completion done;
+	int status;
+	u64 cmd_status;
+};
+
+/* private ioctls to pass PSK */
+#define GELIC_WL_PRIV_SET_PSK		(SIOCIWFIRSTPRIV + 0)
+#define GELIC_WL_PRIV_GET_PSK		(SIOCIWFIRSTPRIV + 1)
+
+extern int gelic_wl_driver_probe(struct gelic_card *card);
+extern int gelic_wl_driver_remove(struct gelic_card *card);
+extern void gelic_wl_interrupt(struct net_device *netdev, u64 status);
+#endif /* _GELIC_WIRELESS_H */


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.365
retrieving revision 1.366
diff -u -r1.365 -r1.366
--- kernel.spec	6 Mar 2008 05:18:18 -0000	1.365
+++ kernel.spec	6 Mar 2008 16:22:39 -0000	1.366
@@ -662,6 +662,7 @@
 Patch683: linux-2.6-wireless-pending-too.patch
 Patch690: linux-2.6-at76.patch
 Patch691: linux-2.6-rndis_wlan.patch
+Patch692: linxu-2.6-ps3_gelic_wirelss.patch
 Patch700: linux-2.6-cfg80211-extras.patch
 Patch701: linux-2.6-zd1211rw-module-alias.patch
 Patch720: linux-2.6-e1000-bad-csum-allow.patch
@@ -1237,6 +1238,7 @@
 # Add misc wireless bits from upstream wireless tree
 ApplyPatch linux-2.6-at76.patch
 ApplyPatch linux-2.6-rndis_wlan.patch
+ApplyPatch linux-2.6-ps3_gelic_wireless.patch
 
 # Restore ability to add/remove virtual i/fs to mac80211 devices
 ApplyPatch linux-2.6-cfg80211-extras.patch
@@ -1915,6 +1917,9 @@
 
 
 %changelog
+* Thu Mar 06 2008 John W. Linville <linville at redhat.com> 2.6.24.3-20
+- add ps3_gelic_wirless driver
+
 * Thu Mar 06 2008 Dave Airlie <airlied at redhat.com> 2.6.24.3-19
 - fixup agp/drm patches for F8 kernel
 




More information about the fedora-extras-commits mailing list