aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-5000.c
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2008-04-24 14:55:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-07 15:02:25 -0400
commitd4100dd985dcc13cc7bd1712ce10dea51b7c8261 (patch)
tree332fcad2c6703dc48d5b1884def12a64e7e4b064 /drivers/net/wireless/iwlwifi/iwl-5000.c
parentfcf623df17197adf10e22ddeba90c56504edce0f (diff)
iwlwifi-5000: add iwl 5000 shared memory handlers
This patch fills the needed handlers for shared memory for iwl 5000 family Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 8bccd9056bfb..8e2a6a5749a1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -291,6 +291,29 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
291 291
292 return 0; 292 return 0;
293} 293}
294
295static int iwl5000_alloc_shared_mem(struct iwl_priv *priv)
296{
297 priv->shared_virt = pci_alloc_consistent(priv->pci_dev,
298 sizeof(struct iwl5000_shared),
299 &priv->shared_phys);
300 if (!priv->shared_virt)
301 return -ENOMEM;
302
303 memset(priv->shared_virt, 0, sizeof(struct iwl5000_shared));
304
305 return 0;
306}
307
308static void iwl5000_free_shared_mem(struct iwl_priv *priv)
309{
310 if (priv->shared_virt)
311 pci_free_consistent(priv->pci_dev,
312 sizeof(struct iwl5000_shared),
313 priv->shared_virt,
314 priv->shared_phys);
315}
316
294static struct iwl_hcmd_ops iwl5000_hcmd = { 317static struct iwl_hcmd_ops iwl5000_hcmd = {
295}; 318};
296 319
@@ -303,6 +326,8 @@ static struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = {
303 326
304static struct iwl_lib_ops iwl5000_lib = { 327static struct iwl_lib_ops iwl5000_lib = {
305 .set_hw_params = iwl5000_hw_set_hw_params, 328 .set_hw_params = iwl5000_hw_set_hw_params,
329 .alloc_shared_mem = iwl5000_alloc_shared_mem,
330 .free_shared_mem = iwl5000_free_shared_mem,
306 .apm_ops = { 331 .apm_ops = {
307 .init = iwl5000_apm_init, 332 .init = iwl5000_apm_init,
308 .set_pwr_src = iwl4965_set_pwr_src, 333 .set_pwr_src = iwl4965_set_pwr_src,