summaryrefslogtreecommitdiffstats
path: root/private/ntos/ndis/digi/pcimac/cm_prof.c
diff options
context:
space:
mode:
authorAdam <you@example.com>2020-05-17 05:51:50 +0200
committerAdam <you@example.com>2020-05-17 05:51:50 +0200
commite611b132f9b8abe35b362e5870b74bce94a1e58e (patch)
treea5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/ntos/ndis/digi/pcimac/cm_prof.c
downloadNT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip
Diffstat (limited to 'private/ntos/ndis/digi/pcimac/cm_prof.c')
-rw-r--r--private/ntos/ndis/digi/pcimac/cm_prof.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/private/ntos/ndis/digi/pcimac/cm_prof.c b/private/ntos/ndis/digi/pcimac/cm_prof.c
new file mode 100644
index 000000000..be6376c65
--- /dev/null
+++ b/private/ntos/ndis/digi/pcimac/cm_prof.c
@@ -0,0 +1,51 @@
+/*
+ * CM_PROF.C - profile related code
+ */
+
+#include <ndis.h>
+#include <ndiswan.h>
+#include <mytypes.h>
+#include <mydefs.h>
+#include <disp.h>
+#include <util.h>
+#include <opcodes.h>
+#include <adapter.h>
+#include <idd.h>
+#include <mtl.h>
+#include <cm.h>
+
+/* set profile in cm */
+INT
+cm_set_profile(VOID *cm_1, CM_PROF *prof)
+{
+ CM *cm = (CM*)cm_1;
+ D_LOG(D_ENTRY, ("cm_set_prof: entry, cm: 0x%lx, prof: 0x%lx", cm, prof));
+
+ /* connection must be idle to change profile! */
+ if ( cm->state != CM_ST_IDLE )
+ return(CM_E_BUSY);
+
+ /* set & return */
+ cm->oprof = *prof;
+
+ return(CM_E_SUCC);
+}
+
+/* get profile from cm */
+INT
+cm_get_profile(VOID *cm_1, CM_PROF *prof)
+{
+ CM *cm = (CM*)cm_1;
+ D_LOG(D_ENTRY, ("cm_get_prof: entry, cm: 0x%lx, prof: 0x%lx", cm, prof));
+
+ /* connection must has a profile */
+ if ( !cm->oprof.name[0] )
+ return(CM_E_NOSUCH);
+
+ /* set & return */
+ *prof = cm->dprof;
+
+ return(CM_E_SUCC);
+}
+
+